From 88b02a2f4c2a01e817ac895803e47fe24039886c Mon Sep 17 00:00:00 2001 From: RecursivePineapple Date: Wed, 26 Jun 2024 21:20:22 -0400 Subject: [PATCH] mostly working --- README.md | 10 + assets/reactor_chamber_side.xcf | Bin 0 -> 9998 bytes assets/reactor_chamber_top.xcf | Bin 0 -> 8769 bytes assets/reactor_core_side.xcf | Bin 0 -> 8646 bytes assets/reactor_core_side_active.xcf | Bin 0 -> 26776 bytes assets/thermal_sensor.xcf | Bin 7021 -> 7790 bytes dependencies.gradle | 2 + scripts/update_protos.sh | 6 + .../nuclear_horizons/CommonProxy.java | 5 +- .../networking/PacketDispatcher.java | 57 +- .../reactors/blocks/BlockList.java | 10 + .../reactors/blocks/FluidBlock.java | 23 +- .../reactors/blocks/ReactorChamber.java | 19 + .../reactors/blocks/ReactorCore.java | 22 +- .../reactors/blocks/ReactorSimulator.java | 33 + .../components/IComponentAdapter.java | 6 + .../components/adapters/FuelRodAdapter.java | 4 +- .../adapters/HeatAbsorberAdapter.java | 7 +- .../components/adapters/HeatMoverAdapter.java | 23 +- .../reactors/items/BasicFuelRodItem.java | 54 +- .../reactors/items/BasicHeatAbsorberItem.java | 3 +- .../items/BasicHeatExchangerItem.java | 11 +- .../reactors/items/BasicHeatVentItem.java | 15 +- .../items/BasicNeutronReflectorItem.java | 11 +- .../reactors/items/HeatUtils.java | 7 +- .../reactors/items/IBasicFuelRod.java | 3 + .../reactors/tile/TileAccessHatch.java | 18 +- .../reactors/tile/TileReactorChamber.java | 18 +- .../reactors/tile/TileReactorCore.java | 31 +- .../reactors/tile/TileReactorSimulator.java | 791 +++ .../tile/simulator/BigintStorage.java | 68 + .../simulator/SimulationComponentResult.java | 18 + .../tile/simulator/SimulationConfig.java | 517 ++ .../simulator/SimulationConfigProto.proto | 64 + .../tile/simulator/SimulationItems.java | 57 + .../tile/simulator/SimulationResult.java | 175 + .../reactors/tile/simulator/Simulator.java | 446 ++ .../tile/simulator/SimulatorProtos.java | 5980 +++++++++++++++++ .../assets/nuclear_horizons/lang/en_US.lang | 90 + .../textures/blocks/reactor_chamber.png | Bin 2678 -> 0 bytes .../textures/blocks/reactor_chamber_side.png | Bin 0 -> 1483 bytes .../textures/blocks/reactor_chamber_top.png | Bin 0 -> 1580 bytes .../textures/blocks/reactor_core_side.png | Bin 0 -> 1581 bytes .../blocks/reactor_core_side_active.png | Bin 0 -> 2864 bytes .../reactor_core_side_active.png.mcmeta | 11 + .../textures/blocks/thermal_sensor.png | Bin 1611 -> 1829 bytes 46 files changed, 8524 insertions(+), 91 deletions(-) create mode 100644 assets/reactor_chamber_side.xcf create mode 100644 assets/reactor_chamber_top.xcf create mode 100644 assets/reactor_core_side.xcf create mode 100644 assets/reactor_core_side_active.xcf create mode 100755 scripts/update_protos.sh create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/blocks/ReactorSimulator.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorSimulator.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/BigintStorage.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationComponentResult.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfig.java create mode 100755 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfigProto.proto create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationItems.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationResult.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/Simulator.java create mode 100644 src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulatorProtos.java delete mode 100644 src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber.png create mode 100644 src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber_side.png create mode 100644 src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber_top.png create mode 100644 src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_core_side.png create mode 100644 src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_core_side_active.png create mode 100644 src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_core_side_active.png.mcmeta diff --git a/README.md b/README.md index 44d0ef5..29cd955 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,13 @@ If you would like to help, send a me message on discord (my username is recursiv # Issues If you find an issue and would like to report it, you can either open an issue here or send me a message on discord. + +# TODO +- Breeder rods +- Explosions & other overheat effects +- UI Polishing +- New textures +- Make vents state their total cooling capacity in sim results +- Test on MP +- Component automation configuration in the simulator +- A decent looking TESR thermal sensor for EU reactors (or hook into nuclear control somehow) diff --git a/assets/reactor_chamber_side.xcf b/assets/reactor_chamber_side.xcf new file mode 100644 index 0000000000000000000000000000000000000000..420920cf838464097802947dd2b300578547a1de GIT binary patch literal 9998 zcmds-OK%%lcE_u36-mjKEVpI3C*xUg^62y|8tDE6gT^d^EG7w%jV+SJhs>9(mnm7a z4FrxxWId>Wq#8(oECOVi09o0{E+1eFA-f>RB0x52q|-B-QE`mzT>c8>|fx-uO|YT-+$%OE>Eqwe;`({*V7iB-gcSeYsdI zzgKP4?+H(||L)!OjmJyn^!n;j{oW6*yj!U*tS+rK((mf&y+*ZEOuw&xKKKFR(pQK- zNb4UFKU!ZaF4R}5=?~s#_4tidym;^7N_`_;Us7(D|m@kXx{gv1d4zZ26;#%~K9 z@?!q2F?zgvV2@tvFGmz}Ivz20_4i*PgQfm)#D8l1nUQ*S%Lt#PUWCu)jL8?bjMR&_ z8Q(DyFMfmZUBh~DoAEuvWLT`t7bfF6Hj_}3*rlN7;(44m@xn4D;7@4(7GAM|PQFMO z$uH4Y;M*@!h7ErT+Jd&AuNi}9FJ4R%F?@F2FtInEJvIK;(8!;I{CR3Gd=BzGkne$f z59E6w-vjv`$oD|buvnXWAm0P|^GT>l>_Gl}E}qAE6MG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G1|cT}R3#S41Qb(fc|lIc8)KjnMW|J`^dzcpqi!(^T>yUVX? z&5fP)mvBF-bBiSjU0;v?`I`P%g2}n%@fY8rL-cqwm789CaNCPJidn`ThBe_A5?ROc zE)P2VilUXbywd{@P9z5@Z`AQvH$K29?#y{+$M#ONttVC(s7}f|k>BS!9qt|M-a$eM zgONu#vlIJP$Mnt4vES+VdU$?EoL-0YV8ch`j=lpt>H4m9jBb=T{%AqR|Rs-?u4j z5)g-zF;Xn!?qAT$N&XmrygM^S&VGO2AM}e~51u@f)R1TJV@!F+!2*3?&Jx zbFK?1C~#^cw0uio!b?kFAIYI8q@oBy0#N>^mJN45^AFPSRJh8aQ%BlA4)>H=`kLF~96mKOjeP6f=YW z5UJog6l}?m1SHL&cuYtCDkyNsgkNoxK$e;d4$g92y-|4OBrGL}!mgD1grga$VHII< zg+h+nUnQF*nd?Yh&TnK5q^?O=6hMix+aauLL2pu*cyKaS|qzWhlu z+R~di1~1`5Kc!n@gp0Xo#MY^ZJW#0Mm~uo^UHS`;c63Gn66l8h9FA`5=Eu{obW*ZL z{wA{}eJ29_$OsmB29VI*bUA_f;~$|Jo{3TIIP52WCI!Gm1=JWzDJ;e(30N>AfsZFGhlPcUWAc{v#tKKQ`6>!K z6Hc&GZb~UNH^WqPCDox3{$0|Oe$)MjiKgMDT~f(A!IY;X8h2U7OGDloKJLFI)*&8c zEkl~`V@sUMiy(2Oy8k663~5Z+B-ZH4n$dd=S0{v8T4aval^2ts9LC!NK9$qP(ZA{Fs1 z&*ou~^%naM24=G>?a0J8a~{k@EgLP*Qy0ez&}5~%sl#r{r$N#P#~=G2E&YU8Dk`;< z%F9Ff6_27$G1+giBR;^T_2jXz=`7u~9JzGcP%3#sXgMBuKb3q`C4Dd7>-jB#lF$IU Uay(#uN1hBTxYDJ1Ya8+Z0LgMGlK=n! literal 0 HcmV?d00001 diff --git a/assets/reactor_core_side.xcf b/assets/reactor_core_side.xcf new file mode 100644 index 0000000000000000000000000000000000000000..99e3d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??$YD5c;-Qo5okXTxs87zUc5;{nZISROn-*j#l{FZy3d z1g`ILU~!pnCIdgnNPa>J>Z+;+=04DC*49avwuPX>iifE-7%Je0+#oA5z%Y+K=y36-k_=FJw01 z$Qem$X5iikhL}bDyhr^AIgq26;r)k5C9YQzTLhATq&XCelfl186c_|yS1Uy!OU)$? z&T>7yP*~+8EF}p1o|O8CqZz586`*m!fE=~Ih!#sS*PeQu-^iMfdIoNlcR`5)e=<-# zf@UTIDoFbODMj*o)Rg!lTARKmmPuU}fJT!fqp+lr@F*chwYnC3sb}ChDxr>nKIkR! z@ka8K5t%^U$weY21LaRi{Wzja`|^=yw4^sNOuV@F-K1`bOH51zmn@wM$b$jp9a4^f zs!M-i(F#s*KmtAAoxsqPZhkENS|=rQ5vgNvR#Fi%Eupilp3xJC9s4<#SSd@>V zV2K$Cd>FSJ8YU(V$y?eREetW|i@@*3oWxGKDW%lh@RPxXREI|RcS%qBP4^!vnueEl zNk-2ELv}|n>M@OnhCDS~%zuNgS6Gy}fHdFRmN=FNL1aqx{!3H_K@TPXzz`s;6U;-LLJlKw?4a9u+QfEDO`)VMBml$fz!hUN_1u&jo6JAk_VWsL^9wl&tkL4e3Nx22C&hSb_DTe&c=*}Wuaw1^)NgQ zO;);_x~!)B8bpn7__qHUrJoQ>MWvQfdD)a-uoZQR(Rzy>{s~-KPqu|cXX&ox$fetc rQppaX<=F6UGWw~C`d;4a`7eQz&;Yt}Y%sSgJHzxYbg5oiiSWMx9hgGs literal 0 HcmV?d00001 diff --git a/assets/reactor_core_side_active.xcf b/assets/reactor_core_side_active.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f98a99002816b127f9b0e35be424db37dd5e0800 GIT binary patch literal 26776 zcmeI5TXS1icIR>S0Z367J0by)Al)`SlbN`y;;DAkyrj}y8CR-nk`w__Zcmj(0w6$% z06`KLUM0Uo>K1XMQzF$5seFUX!+eB%fP92`$ke<{*K|CR+mc!&cmdA*{`(xzbh%aCsYjYn+DwfK%>HBvI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G*U7pPcmrE#MX23UVWXYV91P6A~T z0vo^tILc>;2a>M(pSx^yLiFuoy#b*hYgPe zfJkSOf}Rm;X&nkvf^e$g1J_oN}tF|1*&*~W;SP?LI%IQS0Rb*p8pJAL|CL?^wCRG;wb#tLY1U=4I>If7mjiD5e81h^*Lwof{+t_XrfW6p%_f!oebe?x zFCg#lw_EM~mI@id+%Rx~-D@{tV(ckRM4M(8lem&^cVLCT)iV1(Z&F7jV_G2ax2TFB ziSx_-cJq@@Xv3h{`Qs}JJL4?9g&?$axG}d=0&v^3m_yUHsH*wg&eLjviVVl-GmS+c0pYadL}&#zn2S0owJ`M7nKpLNVVW<1 zqYdg>Uq}qMkC^}i_FIi11dZ6mkEEy8D2>riP`X-oBG@e>U9<y3`(uSL=>5mD-kK^rDy|*t>7(7ub3<{j zuJ@&SQuF54mlHgNU@=V|ba3kF2J1sZ}jmXKarJqR+=3zWmHpDK>i@D;s; zLAcGA3pjrGGEM6lYN-zY{=ToLz;C}I5Gh704A{u3K&VsEQ2W1svTt=#2)6QZkR%9q zA2@$vIcA@TkAk17*TQ1`2HXnHV1A|u({z!|Apj1y^^DRNXM>NwvhbHq5f+I^n^*Q> zB9_Lx_#GW6oqa7w3chARbo9IBXa%)>1Yf6)RdzMi@urSs{z7V8c03X@{`nh`No4e_r(0y}qQu7ej!A1z?e5 zgEi{f8EzA0R2l5Z!Hyj4Nc+(EZSTl4yCWa)R}u%;kGfMBT&;X@-#EBh`G;34x|1AS zKMwZDV2}LjEBe9pBj?+}^&`Jm46Yyf?QC%UsNXFI?*Inx0Cc7B|Jgf$!S&{L<#rJ`fqoBaJg6w{}&bKAU*&9 literal 0 HcmV?d00001 diff --git a/assets/thermal_sensor.xcf b/assets/thermal_sensor.xcf index 344a771eef617737b7e9be24970a445293bf57b8..f76af2959ae3ab76be029fcdd8406caacf4f110c 100644 GIT binary patch delta 3169 zcmZ8jS!^5E6}@~jW63rwnKmWIsv9&x5g>7cBAfT5zxga`$ByMuXjzseN?c~h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eR`7B9K9&q9)V%pfp3EOL z#TuG4(Uv=4oE?3!kuFuzl&>JBWInrvwd00p(efF5=l!)uVk#R=$n9!aWIBdXsc@^q z@)Pq&=d>K*a)Rk-cMUxw!v;wTs2{B|DPz}?X@c-64`>hE>p`>aA;X-ZJ-pJ>DBIKE zp6r)8_8!99dX z9kmrQ@S)JplKDIxOD-_aMN*xD1EI_{<^fvEvi5BM$0Bz#}B! zO>j-%V$TGgw2-NY&a{)jhR8Mm$43$0A!@h9K5&TGx7y&I^`^$6;LslPyh?mt4AA99o!3KqZEL92$4bDcp8RJ8#3S{xQAT?^M>JGL#&}m18unj z#@XPWiHsISWso#5^z1|6p1B3MSKquLT7*m7J_Foac_gN?(FAbs6Ai))pTN3GznUt~1FzdoQ{M!--@A%Kzy}$SmW?jn!>i%aJ=aow- zDsN0!Wd>}qYA{%^9#k)WeE2#axnmq^nOM+RZjx%V*RZo-eSVZ`!cXI0^dKqye desc, boolean advancedItemTooltips) { super.addInformation(itemStack, player, desc, advancedItemTooltips); - desc.add(String.format("Stored Heat: %,d / %,d", itemStack.getItemDamage(), this.maxHeat)); + desc.add(I18n.format("nh_tooltip.durability", itemStack.getItemDamage(), this.maxHeat)); } } diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatExchangerItem.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatExchangerItem.java index 68cdb04..1e5a7d9 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatExchangerItem.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatExchangerItem.java @@ -12,6 +12,7 @@ import com.recursive_pineapple.nuclear_horizons.reactors.components.IReactorGrid; import com.recursive_pineapple.nuclear_horizons.reactors.components.adapters.HeatMoverAdapter; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -86,21 +87,21 @@ public void addInformation(ItemStack itemStack, EntityPlayer player, List 0) { - desc.add(String.format("Stored Heat: %,d / %,d", this.getStoredHeat(itemStack), this.maxHeat)); + desc.add(I18n.format("nh_tooltip.durability", this.getStoredHeat(itemStack), this.maxHeat)); } if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { - desc.add("Every two seconds, this component will:"); + desc.add(I18n.format("nh_tooltip.prelude")); if(this.maxHeatFromReactor > 0) { - desc.add(String.format("Transfer up to %d HU between the reactor and itself.", this.maxHeatFromReactor)); + desc.add(I18n.format("nh_tooltip.mover.reactor_xfer", this.maxHeatFromReactor)); } if(this.maxHeatFromNeighbour > 0) { - desc.add(String.format("Transfer up to %d HU between its neighbours and itself.", this.maxHeatFromNeighbour)); + desc.add(I18n.format("nh_tooltip.exchanger.comp_xfer", this.maxHeatFromNeighbour)); } } else { - desc.add("Hold Shift for more info."); + desc.add(I18n.format("nh_tooltip.more_info")); } } } diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatVentItem.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatVentItem.java index 539d1ac..670ea4c 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatVentItem.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicHeatVentItem.java @@ -12,6 +12,7 @@ import com.recursive_pineapple.nuclear_horizons.reactors.components.IReactorGrid; import com.recursive_pineapple.nuclear_horizons.reactors.components.adapters.HeatMoverAdapter; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -97,22 +98,26 @@ public void addInformation(ItemStack itemStack, EntityPlayer player, List 0) { - desc.add(String.format("Stored Heat: %,d / %,d", this.getStoredHeat(itemStack), this.maxHeat)); + desc.add(I18n.format("nh_tooltip.stored_heat", this.getStoredHeat(itemStack), this.maxHeat)); } if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { - desc.add("Every two seconds, this component will:"); + desc.add(I18n.format("nh_tooltip.prelude")); if(this.maxHeatFromReactor > 0) { - desc.add(String.format("Transfer up to %d HU from the reactor to itself.", this.maxHeatFromReactor)); + desc.add(I18n.format("nh_tooltip.mover.reactor_xfer", this.maxHeatFromReactor)); } if(this.maxHeatToAir > 0) { - desc.add(String.format("Dissipate up to %d HU from itself.", this.maxHeatToAir)); + desc.add(I18n.format("nh_tooltip.vent.void_self", this.maxHeatToAir)); } if(this.maxNeighbourToAir > 0) { - desc.add(String.format("Dissipate up to %d HU from its neighbours.", this.maxNeighbourToAir)); + desc.add(I18n.format("nh_tooltip.vent.void_adj", this.maxNeighbourToAir)); + } + + if(this.maxHeatToAir > 0) { + desc.add(I18n.format("nh_tooltip.vent.fluid_disclaimer")); } } else { desc.add("Hold Shift for more info."); diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicNeutronReflectorItem.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicNeutronReflectorItem.java index 72f66d2..8518804 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicNeutronReflectorItem.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/BasicNeutronReflectorItem.java @@ -13,6 +13,7 @@ import com.recursive_pineapple.nuclear_horizons.reactors.components.IReactorGrid; import com.recursive_pineapple.nuclear_horizons.reactors.components.adapters.NeutronReflectorAdapter; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -71,12 +72,12 @@ public void applyDamage(@Nonnull ItemStack itemStack, int damage) { public void addInformation(ItemStack itemStack, EntityPlayer player, List desc, boolean advancedItemTooltips) { super.addInformation(itemStack, player, desc, advancedItemTooltips); - if(!advancedItemTooltips) { - if(this.maxHealth > 0) { - desc.add(String.format("Durability: %,d / %,d", this.getRemainingHealth(itemStack), this.maxHealth)); - } else { - desc.add("Invulnerable"); + if(this.maxHealth > 0) { + if(!advancedItemTooltips || itemStack.getItemDamage() == 0) { + desc.add(I18n.format("nh_tooltip.durability", this.getRemainingHealth(itemStack), this.maxHealth)); } + } else { + desc.add(I18n.format("nh_tooltip.undestructable")); } } } diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/HeatUtils.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/HeatUtils.java index 305b8db..b43925f 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/HeatUtils.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/HeatUtils.java @@ -5,7 +5,7 @@ public class HeatUtils { private HeatUtils() { } public static int getTransferAmount(int sourceHeat, int destHeat, int max) { - // pos = source > dest: pull, neg = source < dest: push + // positive = source > dest: pull, negative = source < dest: push int delta = sourceHeat - destHeat; int signum = delta < 0 ? -1 : 1; @@ -21,10 +21,9 @@ public static int getTransferAmount(int sourceHeat, int destHeat, int max) { } public static int getConsumableHeat(int maxHeat, int currentHeat, int addedHeat) { - // if we have 50 heat and we subtract 25, we should be able to consume 25 heat - // 50 - 75 = 50 - // 25, 50 + 50 = 25 + // 50 stored - 75 removed = 50 removed + // 25 out of 50 + 50 added = 25 added if(addedHeat > 0) { int remaining = maxHeat - currentHeat; diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/IBasicFuelRod.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/IBasicFuelRod.java index 2d26ea5..321afe9 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/IBasicFuelRod.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/items/IBasicFuelRod.java @@ -1,6 +1,7 @@ package com.recursive_pineapple.nuclear_horizons.reactors.items; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.item.ItemStack; @@ -14,4 +15,6 @@ public interface IBasicFuelRod { public int getRemainingHealth(@Nonnull ItemStack itemStack); public void applyDamage(@Nonnull ItemStack itemStack, int damage); + public @Nullable ItemStack getProduct(@Nonnull ItemStack itemStack); + } diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileAccessHatch.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileAccessHatch.java index 692066f..7d2dd87 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileAccessHatch.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileAccessHatch.java @@ -2,6 +2,8 @@ import javax.annotation.Nullable; +import com.recursive_pineapple.nuclear_horizons.reactors.blocks.BlockList; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -135,24 +137,12 @@ public void setInventorySlotContents(int index, ItemStack stack) { @Override public String getInventoryName() { - var reactor = getReactor(); - - if(reactor != null) { - return reactor.getInventoryName(); - } else { - return "Reactor Access Hatch"; - } + return BlockList.REACTOR_ACCESS_HATCH_NAME; } @Override public boolean hasCustomInventoryName() { - var reactor = getReactor(); - - if(reactor != null) { - return reactor.hasCustomInventoryName(); - } else { - return false; - } + return false; } @Override diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorChamber.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorChamber.java index 39bb951..1645f93 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorChamber.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorChamber.java @@ -2,6 +2,8 @@ import javax.annotation.Nullable; +import com.recursive_pineapple.nuclear_horizons.reactors.blocks.BlockList; + import gregtech.api.interfaces.tileentity.IEnergyConnected; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -162,24 +164,12 @@ public void setInventorySlotContents(int index, ItemStack stack) { @Override public String getInventoryName() { - var reactor = getReactor(); - - if(reactor != null) { - return reactor.getInventoryName(); - } else { - return "Reactor Access Hatch"; - } + return BlockList.REACTOR_CHAMBER_NAME; } @Override public boolean hasCustomInventoryName() { - var reactor = getReactor(); - - if(reactor != null) { - return reactor.hasCustomInventoryName(); - } else { - return false; - } + return false; } @Override diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorCore.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorCore.java index 63a3ce8..ffa8dec 100644 --- a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorCore.java +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorCore.java @@ -38,6 +38,7 @@ import gregtech.api.logic.interfaces.PowerLogicHost; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -56,8 +57,8 @@ public class TileReactorCore extends TileEntity implements IInventory, IReactorGrid, ITileWithModularUI, IEnergyConnected { - private static final int ROW_COUNT = 6; - private static final int COL_COUNT = 9; + public static final int ROW_COUNT = 6; + public static final int COL_COUNT = 9; private static final int REACTOR_TICK_SPEED = 20; private static final int REACTOR_STRUCTURE_CHECK_PERIOD = 10 * 20; @@ -217,7 +218,7 @@ public ModularWindow createWindow(UIBuildContext buildContext) { .setAlignment(CrossAxisAlignment.CENTER) .widgets( padding(7, 7), - new TextWidget("Nuclear Reactor").setSize(150, 16), + new TextWidget(I18n.format("nh_gui.reactor.title")).setSize(150, 16), new Row() .setAlignment(MainAxisAlignment.CENTER, CrossAxisAlignment.CENTER) .widgets( @@ -240,21 +241,21 @@ public ModularWindow createWindow(UIBuildContext buildContext) { .setAlignment(MainAxisAlignment.START) .widgets( padding(7 + 16, 16), - new TextWidget("Inventory").setSize(50, 16) + new TextWidget(I18n.format("nh_gui.reactor.player_inv")).setSize(50, 16) ) ) .addChild( new Row() .setAlignment(MainAxisAlignment.END) .widgets( - TextWidget.dynamicString(() -> String.format("HU: %,d", this.storedHeat)) + TextWidget.dynamicString(() -> I18n.format("nh_gui.reactor.stored_hu", this.storedHeat)) + .setSize(50, 16), + TextWidget.dynamicString(() -> ( + !isFluid + ? I18n.format("nh_gui.reactor.eu_output", this.addedEU / 20) + : I18n.format("nh_gui.reactor.hu_output", this.addedHeat) + )) .setSize(50, 16), - TextWidget.dynamicString(() -> String.format("EU/t: %,d", this.addedEU / 20)) - .setSizeProvider((s, w, p) -> isFluid ? new Size(0, 0) : new Size(50, 16)) - .setEnabled(w -> !isFluid), - TextWidget.dynamicString(() -> String.format("HU/s: %,d", this.addedHeat)) - .setSizeProvider((s, w, p) -> !isFluid ? new Size(0, 0) : new Size(50, 16)) - .setEnabled(w -> isFluid), padding(7 + 16, 16) ) ) @@ -400,6 +401,8 @@ public void updateEntity() { this.tickCounter++; if(this.tickCounter % REACTOR_TICK_SPEED == 0) { + boolean wasActive = isActive; + this.isActive = worldObj.getBlockPowerInput(xCoord, yCoord, zCoord) > 0; for(var dir : DirectionUtil.values()) { @@ -432,6 +435,10 @@ public void updateEntity() { this.doEUTick(); } + if(wasActive != isActive) { + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, isActive ? 1 : 0, 3); + } + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @@ -673,7 +680,7 @@ public void setInventorySlotContents(int index, ItemStack stack) { @Override public String getInventoryName() { - return "gui.reactor.name"; + return BlockList.REACTOR_CORE_NAME; } @Override diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorSimulator.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorSimulator.java new file mode 100644 index 0000000..88d278b --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/TileReactorSimulator.java @@ -0,0 +1,791 @@ +package com.recursive_pineapple.nuclear_horizons.reactors.tile; + +import static com.recursive_pineapple.nuclear_horizons.reactors.tile.TileReactorCore.COL_COUNT; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Objects; +import java.util.function.BooleanSupplier; +import java.util.function.Consumer; +import java.util.function.DoubleConsumer; +import java.util.function.DoubleSupplier; +import java.util.function.Supplier; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.gtnewhorizons.modularui.api.ModularUITextures; +import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture; +import com.gtnewhorizons.modularui.api.math.Alignment; +import com.gtnewhorizons.modularui.api.math.Color; +import com.gtnewhorizons.modularui.api.math.CrossAxisAlignment; +import com.gtnewhorizons.modularui.api.math.MainAxisAlignment; +import com.gtnewhorizons.modularui.api.math.Size; +import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.api.screen.UIBuildContext; +import com.gtnewhorizons.modularui.api.widget.Widget; +import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; +import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; +import com.gtnewhorizons.modularui.common.widget.Column; +import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; +import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; +import com.gtnewhorizons.modularui.common.widget.Row; +import com.gtnewhorizons.modularui.common.widget.SlotGroup; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; +import com.gtnewhorizons.modularui.common.widget.SyncedWidget; +import com.gtnewhorizons.modularui.common.widget.TabButton; +import com.gtnewhorizons.modularui.common.widget.TabContainer; +import com.gtnewhorizons.modularui.common.widget.TextWidget; +import com.gtnewhorizons.modularui.common.widget.VanillaButtonWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.NumericWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; +import com.recursive_pineapple.nuclear_horizons.NuclearHorizons; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulationConfig; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulationResult; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.Simulator; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.PacketBuffer; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; + +public class TileReactorSimulator extends TileEntity implements ITileWithModularUI { + + @SideOnly(Side.CLIENT) + private final Simulator simulator = new Simulator(this); + + @NotNull + private String configCode = ""; + + /** + * Must be final since the SlotGroup keeps a reference to this specific config. + */ + private final SimulationConfig config = new SimulationConfig(); + + @Nullable + private SimulationResult latestSimulation; + + @SideOnly(Side.CLIENT) + private SlotGroup slots; + + @SideOnly(Side.CLIENT) + private TabContainer tabContainer; + + @SideOnly(Side.CLIENT) + private int activeComponentX = -1, activeComponentY = -1; + + public TileReactorSimulator() { + + } + + @Override + public void updateEntity() { + simulator.pollFinished(); + } + + public void setSimulationResult(SimulationResult result) { + latestSimulation = result; + + config.result = result; + + if(result != null) result.config = config; + + if(slots != null) { + for(var child : slots.getChildren()) { + if(child instanceof SlotWidget slot) { + slot.getMcSlot().onSlotChanged(); + } + } + } + + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + public void setConfigCode(String code) { + if(!Objects.equals(code, this.configCode)) { + this.configCode = code; + this.config.put(SimulationConfig.fromCode(code)); + + if(slots != null) { + for(var child : slots.getChildren()) { + if(child instanceof SlotWidget slot) { + slot.getMcSlot().onSlotChanged(); + } + } + } + + if(worldObj != null) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + markDirty(); + } + } + + public void onConfigChanged() { + var code = this.config.getCode(); + + if(!Objects.equals(code, configCode)) { + this.configCode = code; + if(worldObj != null) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + markDirty(); + } + } + + @Override + public Packet getDescriptionPacket() { + var nbt = new NBTTagCompound(); + + if(this.latestSimulation != null) { + nbt.setByteArray("history", this.latestSimulation.save().toByteArray()); + } + + nbt.setString("code", configCode); + + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, blockMetadata, nbt); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + var nbt = pkt.func_148857_g(); + + setConfigCode(nbt.getString("code")); + + var data = nbt.getByteArray("history"); + if(data.length > 0) { + try { + setSimulationResult(SimulationResult.load(SimulatorProtos.SimulationResult.parseFrom(data))); + } catch (InvalidProtocolBufferException e) { + NuclearHorizons.LOG.error("Received invalid simulation result", e); + setSimulationResult(null); + } + } else { + setSimulationResult(null); + } + } + + @Override + public void writeToNBT(NBTTagCompound compound) { + super.writeToNBT(compound); + + compound.setInteger("version", 1); + if(config != null) { + compound.setString("config", configCode); + } + } + + @Override + public void readFromNBT(NBTTagCompound compound) { + super.readFromNBT(compound); + + switch(compound.getInteger("version")) { + case 1: { + setConfigCode(compound.getString("config")); + break; + } + } + } + + private static Widget padding(int width, int height) { + return new TextWidget().setSize(width, height); + } + + @Override + public ModularWindow createWindow(UIBuildContext buildContext) { + ModularWindow.Builder builder = ModularWindow.builder(new Size(212, 234)); + + builder.setBackground(ModularUITextures.VANILLA_BACKGROUND); + + builder.widgets( + new TabContainer() + .setButtonSize(new Size(28, 32)) + .addTabButton( + new TabButton(0) + .setBackground(false, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0, 1f, 0.5f)) + .setBackground(true, ModularUITextures.VANILLA_TAB_TOP_START.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(0, -28) + ) + .addTabButton( + new TabButton(1) + .setBackground(false, ModularUITextures.VANILLA_TAB_TOP_MIDDLE.getSubArea(0, 0, 1f, 0.5f)) + .setBackground(true, ModularUITextures.VANILLA_TAB_TOP_MIDDLE.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(28, -28) + ) + .addTabButton( + new TabButton(2) + .setBackground(false, ModularUITextures.VANILLA_TAB_TOP_END.getSubArea(0, 0, 1f, 0.5f)) + .setBackground(true, ModularUITextures.VANILLA_TAB_TOP_END.getSubArea(0, 0.5f, 1f, 1f)) + .setPos(56, -28) + ) + .addPage(gridPage(buildContext.getPlayer())) + .addPage(resultsPage()) + .addPage(reactorSettingsPage()) + .consume(w -> { + tabContainer = (TabContainer)w; + }) + ); + + builder.widgets( + new FakeSyncWidget.StringSyncer( + () -> this.configCode, + this::setConfigCode + ), + new FakeSyncWidget( + () -> this.latestSimulation, + this::setSimulationResult, + SimulationResult::write, + SimulationResult::read + ) + ); + + return builder.build(); + } + + private Column gridPage(EntityPlayer player) { + return new Column() + .setAlignment(MainAxisAlignment.START, CrossAxisAlignment.CENTER) + .widgets( + padding(7, 7), + new TextWidget(I18n.format("nh_gui.sim.title")).setSize(150, 16), + new Row() + .setAlignment(MainAxisAlignment.CENTER, CrossAxisAlignment.CENTER) + .widgets( + SlotGroup.ofItemHandler(config, COL_COUNT) + .phantom(true) + .applyForWidget(slot -> { + slot.setChangeListener(this::onConfigChanged); + }) + .widgetCreator(slot -> new SimulatorSlotWidget(slot, () -> { + this.activeComponentX = slot.getSlotIndex() % COL_COUNT; + this.activeComponentY = slot.getSlotIndex() / COL_COUNT; + tabContainer.setActivePage(5); + })) + .build() + .consume(w -> { + slots = (SlotGroup)w; + }) + ), + padding(2, 2), + new Row() + .setAlignment(MainAxisAlignment.START, CrossAxisAlignment.CENTER) + .widgets( + new VanillaButtonWidget() + .setDisplayString(I18n.format("nh_gui.sim.actions.start")) + .setOnClick((d, w) -> { + if(NetworkUtils.isClient()) { + simulator.start(config); + } + }) + .setSize(48, 16), + padding(2, 2), + new VanillaButtonWidget() + .setDisplayString(I18n.format("nh_gui.sim.actions.cancel")) + .setOnClick((d, w) -> { + if(NetworkUtils.isClient()) { + simulator.cancel(); + } + }) + .setSize(48, 16) + ), + padding(2, 2), + SlotGroup.playerInventoryGroup(player, null) + ); + } + + private static void addResultLine(ArrayList lines, String name, String unit, Object value) { + var text = I18n.format( + "nh_gui.sim.results." + name, + I18n.format( + value == null + ? "nh_gui.sim.results.none" + : ("nh_gui.sim.results." + unit), + value + ) + ); + + for(var line : text.split("\\n")) { + lines.add(line); + } + } + + private Widget resultsPage() { + return new Column() + .setAlignment(MainAxisAlignment.START, CrossAxisAlignment.CENTER) + .widgets( + padding(7, 7), + new TextWidget(I18n.format("nh_gui.sim.results.title")).setSize(150, 16), + padding(7, 7), + TextWidget + .dynamicString(() -> { + var r = latestSimulation; + + ArrayList lines = new ArrayList<>(); + + if(r == null) { + lines.add(I18n.format("nh_gui.sim.results.no_results")); + } else if(r.timeToExplode == null) { + addResultLine(lines, "runtime", "seconds", r.simTime); + } + + if(r != null) { + if(r.timeToNormal != null) { + addResultLine(lines, "time_to_normal", "seconds", r.timeToNormal); + lines.add(I18n.format("nh_gui.sim.results.time_to_normal", r.timeToNormal)); + } + + if(r.timeToBurn != null) { + addResultLine(lines, "time_to_burn", "seconds", r.timeToBurn); + } + + if(r.timeToEvaporate != null) { + addResultLine(lines, "time_to_evaporate", "seconds", r.timeToEvaporate); + } + + if(r.timeToHurt != null) { + addResultLine(lines, "time_to_hurt", "seconds", r.timeToHurt); + } + + if(r.timeToLava != null) { + addResultLine(lines, "time_to_lava", "seconds", r.timeToLava); + } + + if(r.timeToExplode != null) { + addResultLine(lines, "time_to_explosion", "seconds", r.timeToExplode); + } + } + + addResultLine(lines, "active_time", "seconds", r == null ? null : r.activeTime); + addResultLine(lines, "inactive_time", "seconds", r == null ? null : r.pausedTime); + + addResultLine(lines, "avg_power", "eu_per_tick", r == null ? null : (r.totalEU * 2 / 20 / r.simTime)); + addResultLine(lines, "min_power", "eu_per_tick", r == null ? null : r.minEUpT); + addResultLine(lines, "max_power", "eu_per_tick", r == null ? null : r.maxEUpT); + + addResultLine(lines, "avg_vent_cooling", "hu_per_sec", r == null ? null : (r.totalHU / r.simTime)); + addResultLine(lines, "min_vent_cooling", "hu_per_sec", r == null ? null : r.minHUpS); + addResultLine(lines, "max_vent_cooling", "hu_per_sec", r == null ? null : r.maxHUpS); + + addResultLine(lines, "avg_hull_temp", "hu_total", r == null ? null : (r.totalTempSecs / r.simTime)); + addResultLine(lines, "min_hull_temp", "hu_total", r == null ? null : r.minTemp); + addResultLine(lines, "max_hull_temp", "hu_total", r == null ? null : r.maxTemp); + + return String.join("\n", lines); + }) + .setTextAlignment(Alignment.TopLeft) + ); + } + + private static final AdaptableUITexture DISPLAY = AdaptableUITexture.of("modularui:gui/background/display", 143, 75, 2); + + private Widget textSetting(String name, Supplier getter, Consumer setter) { + return new MultiChildWidget() + .addChild( + new TextWidget(name) + .setTextAlignment(Alignment.CenterRight) + .setPos(-50, 0) + .setSize(150, 16) + ) + .addChild( + new TextFieldWidget() + .setGetter(getter) + .setSetter(v -> { + setter.accept(v); + + this.markDirty(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + }) + .setScrollBar() + .setTextColor(Color.WHITE.dark(1)) + .setTextAlignment(Alignment.CenterLeft) + .setBackground(DISPLAY.withOffset(-2, -2, 4, 4)) + .setSize(96, 16) + .setPos(100, 0) + ); + } + + private Widget numericSetting(String name, DoubleSupplier getter, DoubleConsumer setter) { + return new MultiChildWidget() + .addChild( + new TextWidget(name) + .setTextAlignment(Alignment.CenterRight) + .setPos(-50, 0) + .setSize(150, 16) + ) + .addChild( + new NumericWidget() + .setGetter(getter) + .setSetter(v -> { + setter.accept(v); + + this.markDirty(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + }) + .setBounds(0, Double.MAX_VALUE) + .setTextColor(Color.WHITE.dark(1)) + .setBackground(DISPLAY.withOffset(-2, -2, 4, 4)) + .setSize(96, 16) + .setPos(100, 0) + ); + } + + private Widget booleanSetting(String name, BooleanSupplier getter, Consumer setter) { + String trueText = I18n.format("nh_gui.sim.settings.true"), falseText = I18n.format("nh_gui.sim.settings.false"); + + return new MultiChildWidget() + .addChild( + new TextWidget(name) + .setTextAlignment(Alignment.CenterRight) + .setPos(-50, 0) + .setSize(150, 16) + ) + .addChild( + new VanillaButtonWidget() + .setDisplayString(getter.getAsBoolean() ? trueText : falseText) + .setOnClick((t, u) -> { + var val = !getter.getAsBoolean(); + setter.accept(val); + + ((VanillaButtonWidget)u).setDisplayString(val ? trueText : falseText); + u.notifyTooltipChange(); + + this.markDirty(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + }) + .setTicker(w -> ((VanillaButtonWidget)w).setDisplayString(getter.getAsBoolean() ? trueText : falseText)) + .setSize(40, 16) + .setPos(98, 0) + ); + } + + private Widget reactorSettingsPage() { + return new Row() + .widgets( + padding(7, 7), + new Column() + .setAlignment(MainAxisAlignment.START, CrossAxisAlignment.START) + .widgets( + padding(7, 7), + new Row() + .setAlignment(MainAxisAlignment.CENTER) + .widget( + new TextWidget(I18n.format("nh_gui.sim.settings.title")).setSize(150, 16) + ), + padding(7, 7), + textSetting( + I18n.format("nh_gui.sim.settings.planner_code"), + () -> this.configCode, + this::setConfigCode + ), + padding(7, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.max_simulation_ticks"), + () -> this.config.maxSimulationTicks, + v -> { + this.config.maxSimulationTicks = (int)v; + onConfigChanged(); + } + ), + padding(4, 4), + booleanSetting( + I18n.format("nh_gui.sim.settings.fluid"), + () -> this.config.fluid, + b -> { + this.config.fluid = b; + onConfigChanged(); + } + ), + padding(4, 4), + booleanSetting( + I18n.format("nh_gui.sim.settings.pulsed"), + () -> this.config.pulsed, + b -> { + this.config.pulsed = b; + onConfigChanged(); + } + ), + padding(4, 4), + numericSetting( + I18n.format("nh_gui.sim.settings.on_pulse"), + () -> this.config.onPulse, + v -> { + this.config.onPulse = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.off_pulse"), + () -> this.config.offPulse, + v -> { + this.config.offPulse = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.suspend_temp"), + () -> this.config.suspendTemp, + v -> { + this.config.suspendTemp = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.resume_temp"), + () -> this.config.resumeTemp, + v -> { + this.config.resumeTemp = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.initial_reactor_heat"), + () -> this.config.initialHeat, + v -> { + this.config.initialHeat = (int)v; + onConfigChanged(); + } + ) + ), + padding(7, 7) + ); + } + + private Widget componentAutomationPage() { + return new Row() + .widgets( + padding(7, 7), + new Column() + .setAlignment(MainAxisAlignment.START, CrossAxisAlignment.START) + .widgets( + padding(7, 7), + new Row() + .setAlignment(MainAxisAlignment.CENTER) + .widget( + new TextWidget(I18n.format("nh_gui.sim.comp_settings.title")).setSize(150, 16) + ), + padding(7, 7), + TextWidget + .dynamicString(() -> { + String active = null; + + if(activeComponentX == -1 || activeComponentY == -1) { + active = I18n.format("nh_gui.sim.results.none"); + } else { + var comp = config.components[activeComponentX + activeComponentY * COL_COUNT]; + + active = I18n.format( + "nh_gui.sim.comp_settings.xy", + activeComponentX, + activeComponentY, + comp == null + ? I18n.format("nh_gui.sim.results.none") + : I18n.format(comp.item.getUnlocalizedName()) + ); + } + + return I18n.format("nh_gui.sim.comp_settings.active", active); + }), + textSetting( + I18n.format("nh_gui.sim.settings.planner_code"), + () -> this.configCode, + this::setConfigCode + ), + padding(7, 7), + numericSetting( + I18n.format("nh_gui.sim.settings.max_simulation_ticks"), + () -> this.config.maxSimulationTicks, + v -> { + this.config.maxSimulationTicks = (int)v; + onConfigChanged(); + } + ), + padding(4, 4), + booleanSetting( + I18n.format("nh_gui.sim.settings.fluid"), + () -> this.config.fluid, + b -> { + this.config.fluid = b; + onConfigChanged(); + } + ), + padding(4, 4), + booleanSetting( + I18n.format("nh_gui.sim.settings.pulsed"), + () -> this.config.pulsed, + b -> { + this.config.pulsed = b; + onConfigChanged(); + } + ), + padding(4, 4), + numericSetting( + I18n.format("nh_gui.sim.settings.on_pulse"), + () -> this.config.onPulse, + v -> { + this.config.onPulse = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.off_pulse"), + () -> this.config.offPulse, + v -> { + this.config.offPulse = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.suspend_temp"), + () -> this.config.suspendTemp, + v -> { + this.config.suspendTemp = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.resume_temp"), + () -> this.config.resumeTemp, + v -> { + this.config.resumeTemp = (int)v; + onConfigChanged(); + } + ), + padding(4, 6), + numericSetting( + I18n.format("nh_gui.sim.settings.initial_reactor_heat"), + () -> this.config.initialHeat, + v -> { + this.config.initialHeat = (int)v; + onConfigChanged(); + } + ) + ), + padding(7, 7) + ); + } + + private static class SimulatorSlotWidget extends SlotWidget { + private Runnable onRightClicked; + + public SimulatorSlotWidget(BaseSlot slot, @NotNull Runnable onRightClicked) { + super(slot); + this.onRightClicked = onRightClicked; + } + + public java.util.List getExtraTooltip() { + var tooltip = (ArrayList)super.getExtraTooltip(); + + tooltip.add(EnumChatFormatting.DARK_GRAY.toString() + I18n.format("nh_gui.sim.actions.edit_comp_automation")); + + return tooltip; + } + + public ClickResult onClick(int button, boolean doubleClick) { + if(button == 1) { + Widget.ClickData clickData = ClickData.create(button, doubleClick); + this.syncToServer(6, clickData::writeToPacket); + return ClickResult.SUCCESS; + } else { + return super.onClick(button, doubleClick); + } + } + + public void readOnServer(int id, PacketBuffer buf) throws IOException { + if(id == 6) { + if(this.onRightClicked != null) this.onRightClicked.run(); + + this.markForUpdate(); + } else { + super.readOnServer(id, buf); + } + } + } + + private static class MessageChannel extends SyncedWidget { + + private @Nullable Class from_server; + private @Nullable Consumer handle_on_client; + private @Nullable Class from_client; + private @Nullable Consumer handle_on_server; + + public MessageChannel( + @Nullable Class from_server, + @Nullable Consumer handle_on_client, + @Nullable Class from_client, + @Nullable Consumer handle_on_server + ) { + this.from_server = from_server; + this.handle_on_client = handle_on_client; + this.from_client = from_client; + this.handle_on_server = handle_on_server; + } + + @Override + public void readOnClient(int arg0, PacketBuffer arg1) throws IOException { + if(from_server != null && handle_on_client != null) { + FromServer message; + + try { + message = from_server.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + throw new RuntimeException("Could not create instance of FromServer message; type must have a public no-argument constructor", e); + } + + message.fromBytes(arg1); + + handle_on_client.accept(message); + } + } + + @Override + public void readOnServer(int arg0, PacketBuffer arg1) throws IOException { + if(from_client != null && handle_on_server != null) { + FromClient message; + + try { + message = from_client.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + throw new RuntimeException("Could not create instance of FromClient message; type must have a public no-argument constructor", e); + } + + message.fromBytes(arg1); + + handle_on_server.accept(message); + } + } + + public void sendToClient(@NotNull FromServer message) { + if(NetworkUtils.isClient()) { + throw new IllegalStateException("cannot call sendToClient() on the client"); + } + + this.syncToClient(0, buf -> { + message.toBytes(buf); + }); + } + + public void sendToServer(@NotNull FromClient message) { + if(!NetworkUtils.isClient()) { + throw new IllegalStateException("cannot call sendToServer() on the server"); + } + + this.syncToServer(0, buf -> { + message.toBytes(buf); + }); + } + } +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/BigintStorage.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/BigintStorage.java new file mode 100644 index 0000000..b7b032f --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/BigintStorage.java @@ -0,0 +1,68 @@ +/** + * Originally from the Ic2 Reactor Planner at https://github.com/GTNewHorizons/Ic2ExpReactorPlanner + */ + +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +import java.math.BigInteger; +import java.util.Base64; + +/** + * Stores numbers of varying size inside a BigInteger, expecting each to have + * a defined limit (which need not be an exact power of 2). Numbers are to be + * extracted in reverse order they were stored, and special values can be used + * to make certain values optional for inclusion (the calling class is + * responsible for handling this logic, though). + * @author Brian McCloud + */ +public class BigintStorage { + private BigInteger storedValue = BigInteger.ZERO; + + /** + * Stores the specified value. Requires that 0 <= value <= max. + * @param value the value to store. + * @param max the expected maximum for the value. + */ + public void store(int value, int max) { + if (value < 0 || value > max) { + throw new IllegalArgumentException(); + } + storedValue = storedValue.multiply(BigInteger.valueOf(max + 1)).add(BigInteger.valueOf(value)); + } + + /** + * Extracts a value based on the specified maximum. + * @param max the expected maximum for the value. + * @return the extracted value. + */ + public int extract(int max) { + BigInteger[] values = storedValue.divideAndRemainder(BigInteger.valueOf(max + 1)); + storedValue = values[0]; + return values[1].intValue(); + } + + /** + * Takes input of a Base64 string, and converts it to a BigintStorage. + * @param code the Base64-encoded string (presumed to be from @outputBase64) + * @return the converted storage object. + */ + public static BigintStorage inputBase64(String code) { + BigintStorage result = new BigintStorage(); + byte[] temp = Base64.getDecoder().decode(code); + result.storedValue = new BigInteger(temp); + return result; + } + + /** + * Outputs the current value of this BigintStorage as a Base64-encoded string. + * @return the Base64-encoded string. + */ + public String outputBase64() { + byte[] temp = storedValue.toByteArray(); + return Base64.getEncoder().encodeToString(temp); + } + + public boolean isEmpty() { + return storedValue.equals(BigInteger.ZERO); + } +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationComponentResult.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationComponentResult.java new file mode 100644 index 0000000..ba58f90 --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationComponentResult.java @@ -0,0 +1,18 @@ +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +public class SimulationComponentResult { + public long + totalAirHeating, + totalHullHeating, + totalHullCooling, + totalTempSecs, + totalEUOutput; + + public Long + maxAirHeating, + maxHullCooling; + + public int + minTemp = Integer.MAX_VALUE, maxTemp, + replaceCount; +} \ No newline at end of file diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfig.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfig.java new file mode 100644 index 0000000..4452213 --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfig.java @@ -0,0 +1,517 @@ +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import org.jetbrains.annotations.NotNull; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import com.recursive_pineapple.nuclear_horizons.NuclearHorizons; +import com.recursive_pineapple.nuclear_horizons.reactors.components.ComponentRegistry; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.TileReactorCore; + +import io.netty.buffer.ByteBuf; +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; + +public class SimulationConfig implements IItemHandlerModifiable { + + public boolean + pulsed = false, + automated = true, + fluid = false, + usingReactorCoolantInjectors; + + public int + initialHeat = 0, + onPulse = 0, + offPulse = 0, + suspendTemp = 100_000, + resumeTemp = 100_000, + maxSimulationTicks = 1_000_000; + + public SimComponentConfig[] components = new SimComponentConfig[TileReactorCore.COL_COUNT * TileReactorCore.ROW_COUNT]; + + @Nullable + public transient SimulationResult result; + + public SimulationConfig() { + + } + + public String getCode() { + BigintStorage storage = new BigintStorage(); + + storage.store(maxSimulationTicks, 5000000); + storage.store(usingReactorCoolantInjectors ? 1 : 0, 1); + storage.store(fluid ? 1 : 0, 1); + + if(pulsed) { + storage.store(resumeTemp, 120000); + storage.store(suspendTemp, 120000); + storage.store(offPulse, 5000000); + storage.store(onPulse, 5000000); + } + + storage.store(initialHeat, 120000); + + final int maxComponentHeat = 1000000000; + + for(int i = components.length - 1; i >= 0; i--) { + var c = components[i]; + + if(c == null) { + storage.store(0, 72); + continue; + } + + Integer componentId = SimulationItems.getSimulationItemId(c.item); + + if(componentId == null) { + storage.store(0, 72); + NuclearHorizons.LOG.warn("Could not save reactor item " + c.item + " into config code because it does not have a simulation item ID"); + continue; + } + + if(componentId > 72) { + storage.store(0, 72); + NuclearHorizons.LOG.warn("Could not save reactor item " + c.item + " into config code because its simulation item ID was greater than 72"); + continue; + } + + if(c.hasAutomation) { + if(automated) { + storage.store(c.reactorPause, 10000); + storage.store(c.replacementThreshold, maxComponentHeat); + } + + storage.store(c.initialHeat, maxComponentHeat); + } + + storage.store(c.hasAutomation ? 1 : 0, 1); + storage.store(componentId, 72); + } + + storage.store(automated ? 1 : 0, 1); + storage.store(pulsed ? 1 : 0, 1); + + storage.store(4, 255); + + return "erp=" + storage.outputBase64(); + } + + public static SimulationConfig fromCode(String code) { + SimulationConfig config = new SimulationConfig(); + + if(code == null || code.isEmpty()) { + return config; + } + + if(code.startsWith("erp=")) { + code = code.substring(4); + } + + BigintStorage storage = null; + try { + storage = BigintStorage.inputBase64(code); + } catch(Throwable t) { + Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage( + new ChatComponentText( + EnumChatFormatting.RED.toString() + EnumChatFormatting.ITALIC.toString() + + "Could not load invalid reactor code." + ) + ); + NuclearHorizons.LOG.error("Could not parse reactor code into BigInteger", t); + return new SimulationConfig(); + } + + int revision = storage.extract(255); + + if(revision < 0 || revision > 4) { + Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage( + new ChatComponentText( + EnumChatFormatting.RED.toString() + EnumChatFormatting.ITALIC.toString() + + "Could not load invalid reactor code." + ) + ); + NuclearHorizons.LOG.error("Reactor code had incorrect revision (was " + revision + ", should be 4 >= x >= 0)"); + return new SimulationConfig(); + } + + if(revision >= 1) { + config.pulsed = storage.extract(1) > 0; + config.automated = storage.extract(1) > 0; + } + + int maxComponentHeat = switch(revision) { + case 4 -> 1000000000; + case 3 -> 1080000; + default -> 360000; + }; + + for(int row = 0; row < TileReactorCore.ROW_COUNT; row++) { + for(int col = 0; col < TileReactorCore.COL_COUNT; col++) { + int componentId = switch(revision) { + case 0, 1 -> storage.extract(38); + case 2 -> storage.extract(44); + case 3 -> storage.extract(58); + default -> storage.extract(72); + }; + + if(componentId != 0) { + var compConfig = new SimComponentConfig(); + compConfig.hasAutomation = storage.extract(1) > 0; + + if(compConfig.hasAutomation) { + compConfig.initialHeat = storage.extract(maxComponentHeat); + + if(revision == 0 || (revision >= 1 && config.automated)) { + compConfig.replacementThreshold = storage.extract(maxComponentHeat); + compConfig.reactorPause = storage.extract(10000); + } + } + + compConfig.item = SimulationItems.getSimulationItem(componentId); + + if(compConfig.item == null) { + NuclearHorizons.LOG.warn("Could not find simulation item with component id " + componentId); + continue; + } + + config.components[row * TileReactorCore.COL_COUNT + col] = compConfig; + } + } + } + + config.initialHeat = storage.extract(120000); + + if(revision == 0 || (revision >= 1 && config.pulsed)) { + config.onPulse = storage.extract(5000000); + config.offPulse = storage.extract(5000000); + config.suspendTemp = storage.extract(120000); + config.resumeTemp = storage.extract(120000); + } + + config.fluid = storage.extract(1) > 0; + config.usingReactorCoolantInjectors = storage.extract(1) > 0; + + if(revision == 0) { + config.pulsed = storage.extract(1) > 0; + config.automated = storage.extract(1) > 0; + } + + config.maxSimulationTicks = storage.extract(5000000); + + if(!storage.isEmpty()) { + Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage( + new ChatComponentText( + EnumChatFormatting.RED.toString() + EnumChatFormatting.ITALIC.toString() + + "Could not load invalid reactor code." + ) + ); + NuclearHorizons.LOG.error("Reactor code had left over data after reading all fields: assuming something has gone wrong."); + return new SimulationConfig(); + } + + return config; + } + + public static @Nonnull SimulationConfig read(ByteBuf buffer) { + byte[] data = new byte[buffer.readInt()]; + + if(data.length == 0) { + return new SimulationConfig(); + } + + buffer.readBytes(data); + + try { + return SimulationConfig.load(SimulatorProtos.SimulationConfig.parseFrom(data)); + } catch (InvalidProtocolBufferException e) { + NuclearHorizons.LOG.error("Could not read data for SimulationConfig", e); + return new SimulationConfig(); + } + } + + public static void write(ByteBuf buffer, SimulationConfig result) { + if(result == null) { + buffer.writeInt(0); + } else { + var data = result.save().toByteArray(); + buffer.writeInt(data.length); + buffer.writeBytes(data); + } + } + + public SimulatorProtos.SimulationConfig save() { + return SimulatorProtos.SimulationConfig.newBuilder() + .setPulsed(pulsed) + .setAutomated(automated) + .setFluid(fluid) + .setInitialHeat(initialHeat) + .setOnPulse(onPulse) + .setOffPulse(offPulse) + .setSuspendTemp(suspendTemp) + .setResumeTemp(resumeTemp) + .setMaxSimulationTicks(maxSimulationTicks) + .addAllComponents( + IntStream.range(0, components.length) + .mapToObj(i -> { + var c = components[i]; + + if(c == null) { + return null; + } + + Integer id = SimulationItems.getSimulationItemId(c.item); + + if(id == null) { + return null; + } else { + return SimulatorProtos.ComponentConfig.newBuilder() + .setIndex(i) + .setItem(id) + .setHasAutomation(c.hasAutomation) + .setInitialHeat(c.initialHeat) + .setReplacementThreshold(c.replacementThreshold) + .setReactorPause(c.reactorPause) + .build(); + } + }) + .filter(i -> i != null) + .collect(Collectors.toList()) + ) + .build(); + } + + public static SimulationConfig load(SimulatorProtos.SimulationConfig data) { + SimulationConfig config = new SimulationConfig(); + + config.pulsed = data.getPulsed(); + config.automated = data.getAutomated(); + config.fluid = data.getFluid(); + config.initialHeat = data.getInitialHeat(); + config.onPulse = data.getOnPulse(); + config.offPulse = data.getOffPulse(); + config.suspendTemp = data.getSuspendTemp(); + config.resumeTemp = data.getResumeTemp(); + config.maxSimulationTicks = data.getMaxSimulationTicks(); + + for(int i = 0; i < data.getComponentsCount(); i++) { + var c = data.getComponents(i); + + var comp = new SimComponentConfig(); + + comp.item = SimulationItems.getSimulationItem(c.getItem()); + + if(comp.item == null) { + config.components[c.getIndex()] = null; + continue; + } + + comp.hasAutomation = c.getHasAutomation(); + comp.initialHeat = c.getInitialHeat(); + comp.replacementThreshold = c.getReplacementThreshold(); + comp.reactorPause = c.getReactorPause(); + + config.components[c.getIndex()] = comp; + } + + return config; + } + + public void put(@NotNull SimulationConfig source) { + this.pulsed = source.pulsed; + this.automated = source.automated; + this.fluid = source.fluid; + this.initialHeat = source.initialHeat; + this.onPulse = source.onPulse; + this.offPulse = source.offPulse; + this.suspendTemp = source.suspendTemp; + this.resumeTemp = source.resumeTemp; + this.maxSimulationTicks = source.maxSimulationTicks; + + for(int i = 0; i < source.components.length; i++) { + this.components[i] = null; + + var c = source.components[i]; + + if(c != null) { + var dest = new SimComponentConfig(); + + dest.item = c.item; + dest.hasAutomation = c.hasAutomation; + dest.initialHeat = c.initialHeat; + dest.replacementThreshold = c.replacementThreshold; + dest.reactorPause = c.reactorPause; + + this.components[i] = dest; + } + } + } + + @Override + @Nullable + public ItemStack extractItem(int slot, int amount, boolean simulate) { + var item = components[slot]; + + if(item == null || amount < 1) { + return null; + } + + if(!simulate) { + components[slot] = null; + } + + return withResults(new ItemStack(item.item), slot); + } + + @Override + public int getSlotLimit(int slot) { + return 1; + } + + @Override + public int getSlots() { + return components.length; + } + + @Override + public ItemStack getStackInSlot(int slot) { + return extractItem(slot, 1, true); + } + + @Override + @Nullable + public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { + if(components[slot] != null || stack == null || !ComponentRegistry.isReactorItem(stack)) { + return stack; + } + + var result = stack.copy(); + var stored = result.splitStack(1); + + if(!simulate) { + setStackInSlot(slot, stored); + } + + if(result.stackSize <= 0) { + return null; + } else { + return result; + } + } + + @Override + public void setStackInSlot(int slot, ItemStack stack) { + if(stack == null || !ComponentRegistry.isReactorItem(stack)) { + components[slot] = null; + } else { + var config = new SimComponentConfig(); + config.item = stack.getItem(); + + components[slot] = config; + } + } + + private static void addResultLine(NBTTagList lines, String name, String unit, Object value) { + var text = I18n.format( + "nh_tooltip.sim.results." + name, + unit != null + ? I18n.format( + value == null ? "nh_gui.sim.results.none" : ("nh_gui.sim.results." + unit), + value + ) + : value + ); + + for(var line : text.split("\\n")) { + lines.appendTag(new NBTTagString(EnumChatFormatting.RESET.toString() + EnumChatFormatting.BLUE.toString() + line)); + } + } + + private ItemStack withResults(ItemStack itemStack, int slot) { + boolean hasResults = false; + String format = EnumChatFormatting.RESET.toString() + EnumChatFormatting.BLUE.toString(); + + var res = result; + + if(res != null) { + var r = res.componentResults[slot]; + + if(r != null) { + var lore = new NBTTagList(); + + lore.appendTag(new NBTTagString("")); + + lore.appendTag(new NBTTagString(format + I18n.format("nh_tooltip.results.title"))); + + if(r.totalTempSecs > 0) { + addResultLine(lore, "avg_temp", "hu_total", r.totalTempSecs / res.simTime); + addResultLine(lore, "min_temp", "hu_total", r.minTemp); + addResultLine(lore, "max_temp", "hu_total", r.maxTemp); + } + + if(r.totalHullCooling > 0) { + addResultLine(lore, "avg_hull_cooling", "hu_per_second", r.totalHullCooling / res.simTime); + } + + if(r.totalHullHeating > 0) { + addResultLine(lore, "avg_hull_heating", "hu_per_second", r.totalHullHeating / res.simTime); + addResultLine(lore, "heating_per_item", "hu_total", r.totalHullHeating / (r.replaceCount + 1)); + } + + if(r.totalAirHeating != 0) { + addResultLine(lore, "avg_heat_output", "hu_total", r.totalAirHeating / res.simTime); + } + + addResultLine(lore, "replace_count", null, r.replaceCount); + + if(r.totalEUOutput > 0) { + addResultLine(lore, "avg_power", "eu_per_tick", r.totalEUOutput * 2 / 20 / res.simTime); + addResultLine(lore, "power_per_item", "eu_total", r.totalEUOutput / (r.replaceCount + 1)); + } + + lore.appendTag(new NBTTagString("")); + + var display = new NBTTagCompound(); + display.setTag("Lore", lore); + itemStack.setTagInfo("display", display); + hasResults = true; + } + } + + if(!hasResults) { + var lore = new NBTTagList(); + + lore.appendTag(new NBTTagString("")); + lore.appendTag(new NBTTagString(format + "No simulation results available.")); + lore.appendTag(new NBTTagString("")); + + var display = new NBTTagCompound(); + display.setTag("Lore", lore); + itemStack.setTagInfo("display", display); + } + + return itemStack; + } + + public static class SimComponentConfig { + public Item item; + public boolean hasAutomation; + public int initialHeat; + public int replacementThreshold; + public int reactorPause; + } +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfigProto.proto b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfigProto.proto new file mode 100755 index 0000000..e553c1e --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfigProto.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +option java_package = "com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator"; +option java_outer_classname = "SimulatorProtos"; + +message SimulationConfig { + bool pulsed = 1; + bool automated = 2; + bool fluid = 3; + int32 initialHeat = 4; + int32 onPulse = 5; + int32 offPulse = 6; + int32 suspendTemp = 7; + int32 resumeTemp = 8; + int32 maxSimulationTicks = 9; + repeated ComponentConfig components = 10; +} + +message ComponentConfig { + int32 index = 1; + int32 item = 2; + bool hasAutomation = 3; + int32 initialHeat = 4; + int32 replacementThreshold = 5; + int32 reactorPause = 6; +} + +message SimulationResult { + int64 start = 1; + int64 end = 2; + int64 totalEU = 3; + int32 minEUpT = 4; + int32 maxEUpT = 5; + int64 totalHU = 6; + int32 minHUpS = 7; + int32 maxHUpS = 8; + int64 totalTempSecs = 9; + int32 minTemp = 10; + int32 maxTemp = 11; + int64 totalHullHeating = 12; + int64 totalHullCooling = 13; + int32 simTime = 14; + int32 activeTime = 15; + int32 pausedTime = 16; + optional int32 timeToNormal = 17; + optional int32 timeToBurn = 18; + optional int32 timeToEvaporate = 19; + optional int32 timeToHurt = 20; + optional int32 timeToLava = 21; + optional int32 timeToExplode = 22; + repeated ComponentResult components = 23; +} + +message ComponentResult { + int32 index = 1; + int64 totalAirHeating = 2; + int64 totalHullHeating = 3; + int64 totalHullCooling = 4; + int64 totalTempSecs = 5; + int32 minTemp = 6; + int32 maxTemp = 7; + int32 replaceCount = 8; + int64 totalEUOutput = 9; +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationItems.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationItems.java new file mode 100644 index 0000000..4bf0b00 --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationItems.java @@ -0,0 +1,57 @@ +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +import java.util.HashMap; + +import javax.annotation.Nullable; + +import com.recursive_pineapple.nuclear_horizons.reactors.items.ItemList; + +import net.minecraft.item.Item; + +public class SimulationItems { + + private static final HashMap reactorItemsById = new HashMap<>(); + private static final HashMap reactorItemsByItem = new HashMap<>(); + + public static void registerSimulationItem(int id, Item item) { + reactorItemsById.put(id, item); + reactorItemsByItem.put(item, id); + } + + public static @Nullable Item getSimulationItem(int id) { + return reactorItemsById.get(id); + } + + public static @Nullable Integer getSimulationItemId(Item item) { + return reactorItemsByItem.get(item); + } + + public static void init() { + registerSimulationItem(1, ItemList.URANIUM_1X_ROD); + registerSimulationItem(2, ItemList.URANIUM_2X_ROD); + registerSimulationItem(3, ItemList.URANIUM_4X_ROD); + registerSimulationItem(7, ItemList.NEUTRON_REFLECTOR); + registerSimulationItem(8, ItemList.THICK_NEUTRON_REFLECTOR); + registerSimulationItem(9, ItemList.BASIC_HEAT_VENT); + registerSimulationItem(10, ItemList.ADVANCED_HEAT_VENT); + registerSimulationItem(11, ItemList.REACTOR_HEAT_VENT); + registerSimulationItem(12, ItemList.COMPONENT_HEAT_VENT); + registerSimulationItem(13, ItemList.OVERCLOCKED_HEAT_VENT); + registerSimulationItem(14, ItemList.COOLANT_CELL_10k); + registerSimulationItem(15, ItemList.COOLANT_CELL_30k); + registerSimulationItem(16, ItemList.COOLANT_CELL_60k); + registerSimulationItem(17, ItemList.BASIC_HEAT_EXCHANGER); + registerSimulationItem(18, ItemList.ADVANCED_HEAT_EXCHANGER); + registerSimulationItem(19, ItemList.REACTOR_HEAT_EXCHANGER); + registerSimulationItem(20, ItemList.COMPONENT_HEAT_EXCHANGER); + // registerSimulationItem(21, ItemList.); + // registerSimulationItem(22, ItemList.); + // registerSimulationItem(23, ItemList.); + registerSimulationItem(24, ItemList.RSH_CONDENSATOR); + registerSimulationItem(25, ItemList.LZH_CONDENSATOR); + // registerSimulationItem(26, ItemList.); + // registerSimulationItem(27, ItemList.); + // registerSimulationItem(28, ItemList.); + registerSimulationItem(35, ItemList.IRIDIUM_NEUTRON_REFLECTOR); + } +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationResult.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationResult.java new file mode 100644 index 0000000..8e20ad3 --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationResult.java @@ -0,0 +1,175 @@ +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import javax.annotation.Nullable; + +import com.google.protobuf.InvalidProtocolBufferException; +import com.recursive_pineapple.nuclear_horizons.NuclearHorizons; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.TileReactorCore; + +import io.netty.buffer.ByteBuf; + +public class SimulationResult { + public SimulationConfig config; + + public long + start = System.nanoTime(), + end = System.nanoTime(), + totalEU, + totalHU, + totalTempSecs, + totalHullHeating, + totalHullCooling; + + public Long + maxHullCooling; + + public int + minEUpT = Integer.MAX_VALUE, maxEUpT, + minHUpS = Integer.MAX_VALUE, maxHUpS, + minTemp = Integer.MAX_VALUE, maxTemp, + simTime, activeTime, pausedTime; + + public Integer + timeToNormal, + timeToBurn, + timeToEvaporate, + timeToHurt, + timeToLava, + timeToExplode; + + public SimulationComponentResult[] componentResults = new SimulationComponentResult[TileReactorCore.COL_COUNT * TileReactorCore.ROW_COUNT]; + + public static @Nullable SimulationResult read(ByteBuf buffer) { + byte[] data = new byte[buffer.readInt()]; + + if(data.length == 0) { + return null; + } + + buffer.readBytes(data); + + try { + return SimulationResult.load(SimulatorProtos.SimulationResult.parseFrom(data)); + } catch (InvalidProtocolBufferException e) { + NuclearHorizons.LOG.error("Could not read data for SimulationResult", e); + return null; + } + } + + public static void write(ByteBuf buffer, SimulationResult result) { + if(result == null) { + buffer.writeInt(0); + } else { + var data = result.save().toByteArray(); + buffer.writeInt(data.length); + buffer.writeBytes(data); + } + } + + public SimulatorProtos.SimulationResult save() { + var builder = SimulatorProtos.SimulationResult.newBuilder() + .setStart(start) + .setEnd(end) + .setTotalEU(totalEU) + .setMinEUpT(minEUpT) + .setMaxEUpT(maxEUpT) + .setTotalHU(totalHU) + .setMinHUpS(minHUpS) + .setMaxHUpS(maxHUpS) + .setTotalTempSecs(totalTempSecs) + .setMinTemp(minTemp) + .setMaxTemp(maxTemp) + .setTotalHullHeating(totalHullHeating) + .setTotalHullCooling(totalHullCooling) + .setSimTime(simTime) + .setActiveTime(activeTime) + .setPausedTime(pausedTime) + .addAllComponents( + IntStream.range(0, componentResults.length) + .mapToObj(i -> { + var c = componentResults[i]; + + if(c == null) { + return null; + } else { + return SimulatorProtos.ComponentResult.newBuilder() + .setIndex(i) + .setTotalAirHeating(c.totalAirHeating) + .setTotalHullHeating(c.totalHullHeating) + .setTotalHullCooling(c.totalHullCooling) + .setTotalTempSecs(c.totalTempSecs) + .setTotalEUOutput(c.totalEUOutput) + .setMinTemp(c.minTemp) + .setMaxTemp(c.maxTemp) + .setReplaceCount(c.replaceCount) + .build(); + } + }) + .filter(i -> i != null) + .collect(Collectors.toList()) + ); + + if(timeToNormal != null) builder.setTimeToNormal(timeToNormal); + if(timeToBurn != null) builder.setTimeToBurn(timeToBurn); + if(timeToEvaporate != null) builder.setTimeToEvaporate(timeToEvaporate); + if(timeToHurt != null) builder.setTimeToHurt(timeToHurt); + if(timeToLava != null) builder.setTimeToLava(timeToLava); + if(timeToExplode != null) builder.setTimeToExplode(timeToExplode); + + return builder.build(); + } + + public static SimulationResult load(SimulatorProtos.SimulationResult data) { + SimulationResult result = new SimulationResult(); + + result.start = data.getStart(); + result.end = data.getEnd(); + result.totalEU = data.getTotalEU(); + result.minEUpT = data.getMinEUpT(); + result.maxEUpT = data.getMaxEUpT(); + result.totalHU = data.getTotalHU(); + result.minHUpS = data.getMinHUpS(); + result.maxHUpS = data.getMaxHUpS(); + result.totalTempSecs = data.getTotalTempSecs(); + result.minTemp = data.getMinTemp(); + result.maxTemp = data.getMaxTemp(); + result.totalHullHeating = data.getTotalHullHeating(); + result.totalHullCooling = data.getTotalHullCooling(); + result.simTime = data.getSimTime(); + result.activeTime = data.getActiveTime(); + result.pausedTime = data.getPausedTime(); + + for(int i = 0; i < data.getComponentsCount(); i++) { + var c = data.getComponents(i); + + var comp = new SimulationComponentResult(); + + comp.totalAirHeating = c.getTotalAirHeating(); + comp.totalHullHeating = c.getTotalHullHeating(); + comp.totalHullCooling = c.getTotalHullCooling(); + comp.totalTempSecs = c.getTotalTempSecs(); + comp.totalEUOutput = c.getTotalEUOutput(); + comp.minTemp = c.getMinTemp(); + comp.maxTemp = c.getMaxTemp(); + comp.replaceCount = c.getReplaceCount(); + + result.componentResults[c.getIndex()] = comp; + } + + if(data.hasTimeToNormal()) result.timeToNormal = data.getTimeToNormal(); + if(data.hasTimeToBurn()) result.timeToBurn = data.getTimeToBurn(); + if(data.hasTimeToEvaporate()) result.timeToEvaporate = data.getTimeToEvaporate(); + if(data.hasTimeToHurt()) result.timeToHurt = data.getTimeToHurt(); + if(data.hasTimeToLava()) result.timeToLava = data.getTimeToLava(); + if(data.hasTimeToExplode()) result.timeToExplode = data.getTimeToExplode(); + + return result; + } + + public double duration() { + return (end - start) / 1e9d; + } +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/Simulator.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/Simulator.java new file mode 100644 index 0000000..1823146 --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/Simulator.java @@ -0,0 +1,446 @@ +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +import java.util.Arrays; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import javax.annotation.Nullable; + +import com.recursive_pineapple.nuclear_horizons.NuclearHorizons; +import com.recursive_pineapple.nuclear_horizons.networking.PacketDispatcher; +import com.recursive_pineapple.nuclear_horizons.networking.PacketDispatcher.ReactorSimulationFinishedMessage; +import com.recursive_pineapple.nuclear_horizons.reactors.components.ComponentRegistry; +import com.recursive_pineapple.nuclear_horizons.reactors.components.IComponentAdapter; +import com.recursive_pineapple.nuclear_horizons.reactors.components.IReactorGrid; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.TileReactorCore; +import com.recursive_pineapple.nuclear_horizons.reactors.tile.TileReactorSimulator; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; + +public class Simulator { + + private final TileReactorSimulator parent; + private final ExecutorService thread_pool = Executors.newFixedThreadPool(1); + + private Future simulation; + + public Simulator(TileReactorSimulator parent) { + this.parent = parent; + } + + public boolean isRunning() { + return simulation != null && !simulation.isDone(); + } + + public void start(SimulationConfig config) { + if(simulation != null) { + simulation.cancel(true); + } + + simulation = thread_pool.submit(() -> runSimulation(config)); + } + + public void cancel() { + simulation.cancel(true); + simulation = null; + } + + private SimulationResult runSimulation(SimulationConfig config) { + SimulatedReactor reactor = new SimulatedReactor(); + reactor.config = config; + + Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage( + new ChatComponentText( + EnumChatFormatting.GRAY.toString() + EnumChatFormatting.ITALIC.toString() + + "Started reactor simulation." + ) + ); + + reactor.run(); + + Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage( + new ChatComponentText( + EnumChatFormatting.GRAY.toString() + EnumChatFormatting.ITALIC.toString() + + "Reactor simulation finished after " + + String.format("%.3f seconds.", reactor.result.duration()) + ) + ); + + reactor.result.config = config; + return reactor.result; + } + + public void pollFinished() { + if(simulation != null && simulation.isDone()) { + try { + var result = simulation.get(0l, TimeUnit.NANOSECONDS); + simulation = null; + + var msg = new ReactorSimulationFinishedMessage(); + + msg.dimensionId = parent.getWorldObj().provider.dimensionId; + msg.x = parent.xCoord; + msg.y = parent.yCoord; + msg.z = parent.zCoord; + msg.result = result; + + NuclearHorizons.LOG.info(String.format("Simulation finished after %.3fs (%.3fns per tick)", result.duration(), (result.duration() * 1e9d / result.simTime))); + PacketDispatcher.DISPATCHER.sendToServer(msg); + } catch (InterruptedException | CancellationException | ExecutionException e) { + NuclearHorizons.LOG.warn("Simulation did not finish", e); + Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage( + new ChatComponentText( + EnumChatFormatting.RED + + "Simulation crashed, check the server logs for more details. (" + + e.getClass().getName() + + ")" + ) + ); + + simulation = null; + } catch (TimeoutException e) { + // do nothing + } + } + } + + private static class SimulatedReactor implements IReactorGrid { + + private static final int COL_COUNT = TileReactorCore.COL_COUNT; + private static final int ROW_COUNT = TileReactorCore.ROW_COUNT; + + public ItemStack[] contents = new ItemStack[COL_COUNT * ROW_COUNT]; + public IComponentAdapter[] components = new IComponentAdapter[COL_COUNT * ROW_COUNT]; + + public int reactorTickCounter = 0, storedHeat, addedHU, pulseCounter; + public boolean pulseActive, suspended; + public double addedEU; + public Integer nextUnpause; + + public SimulationConfig config; + + public SimulationResult result = new SimulationResult(); + public SimulationComponentResult[] componentResults = new SimulationComponentResult[COL_COUNT * ROW_COUNT]; + public SimulationComponentResult currentComponent; + + @Override + public int getWidth() { + return COL_COUNT; + } + + @Override + public int getHeight() { + return ROW_COUNT; + } + + @Override + public @Nullable IComponentAdapter getComponent(int x, int y) { + if(x < 0 || x >= COL_COUNT) { + throw new IllegalArgumentException(String.format("Illegal value for x: %d, must conform to x >= 0, x < %d", x, COL_COUNT)); + } + + if(y < 0 || y >= ROW_COUNT) { + throw new IllegalArgumentException(String.format("Illegal value for y: %d, must conform to y >= 0, y < %d", y, ROW_COUNT)); + } + + int index = y * COL_COUNT + x; + + var adapter = this.components[index]; + if(adapter != null) { + return adapter; + } + + var item = this.contents[index]; + if(item != null) { + adapter = ComponentRegistry.getAdapter(item, this, x, y); + this.components[index] = adapter; + } + + return adapter; + } + + @Override + public @Nullable ItemStack getItem(int x, int y) { + if(x < 0 || x >= COL_COUNT) { + throw new IllegalArgumentException(String.format("Illegal value for x: %d, must conform to x >= 0, x < %d", x, COL_COUNT)); + } + + if(y < 0 || y >= ROW_COUNT) { + throw new IllegalArgumentException(String.format("Illegal value for y: %d, must conform to y >= 0, y < %d", y, ROW_COUNT)); + } + + int index = y * COL_COUNT + x; + + return this.contents[index]; + } + + @Override + public void setItem(int x, int y, @Nullable ItemStack item) { + if(x < 0 || x >= COL_COUNT) { + throw new IllegalArgumentException(String.format("Illegal value for x: %d, must conform to x >= 0, x < %d", x, COL_COUNT)); + } + + if(y < 0 || y >= ROW_COUNT) { + throw new IllegalArgumentException(String.format("Illegal value for y: %d, must conform to y >= 0, y < %d", y, ROW_COUNT)); + } + + int index = y * COL_COUNT + x; + + this.contents[index] = item; + this.components[index] = item != null && ComponentRegistry.isReactorItem(item) + ? ComponentRegistry.getAdapter(item, this, x, y) + : null; + } + + @Override + public boolean isActive() { + if(suspended) { + return false; + } + + if(nextUnpause != null && reactorTickCounter < nextUnpause) { + return false; + } + + if(config.pulsed) { + return pulseActive; + } + + return true; + } + + @Override + public int getHullHeat() { + return storedHeat; + } + + @Override + public int getMaxHullHeat() { + int maxHeat = 5000; + + for(int row = 0; row < ROW_COUNT; row++) { + for(int col = 0; col < COL_COUNT; col++) { + var component = getComponent(col, row); + if(component != null) { + maxHeat += component.getReactorMaxHeatIncrease(); + } + } + } + + return maxHeat; + } + + @Override + public void setHullHeat(int newHeat) { + this.storedHeat = newHeat; + } + + @Override + public void addHullHeat(int delta) { + this.storedHeat += delta; + + if(delta > 0) { + currentComponent.totalHullHeating += delta; + } else { + currentComponent.totalHullCooling += -delta; + } + } + + @Override + public int addAirHeat(int delta) { + result.totalHU += delta * 2; + addedHU += delta * 2; + currentComponent.totalAirHeating += delta * 2; + + return 0; + } + + @Override + public void addEU(double eu) { + result.totalEU += eu; + currentComponent.totalEUOutput += eu; + addedEU += eu; + } + + @Override + public boolean isFluid() { + return config.fluid; + } + + public void run() { + this.reactorTickCounter = 0; + + Arrays.fill(components, null); + Arrays.fill(contents, null); + + for(int i = 0; i < components.length; i++) { + contents[i] = config.getStackInSlot(i); + componentResults[i] = new SimulationComponentResult(); + + var comp = getComponent(i % COL_COUNT, i / COL_COUNT); + if(comp != null) { + comp.addHeat(config.components[i].initialHeat); + } + } + + result.componentResults = componentResults; + + this.pulseActive = true; + this.storedHeat = config.initialHeat; + + while(reactorTickCounter < config.maxSimulationTicks) { + if(reactorTickCounter % 2 == 0) { + this.addedEU = 0; + } else { + this.addedHU = 0; + } + + for(int row = 0; row < ROW_COUNT; row++) { + for(int col = 0; col < COL_COUNT; col++) { + int index = row * COL_COUNT + col; + + var component = getComponent(col, row); + + if(component != null) { + currentComponent = componentResults[index]; + + if(reactorTickCounter % 2 == 0) { + component.onEnergyTick(); + } else { + component.onHeatTick(); + } + + var heat = component.getStoredHeat(); + + currentComponent.totalTempSecs += heat * 2; + + if(heat < currentComponent.minTemp) { + currentComponent.minTemp = heat; + } + + if(heat > currentComponent.maxTemp) { + currentComponent.maxTemp = heat; + } + + var compConfig = config.components[index]; + + if(compConfig.hasAutomation && component.getStoredHeat() > compConfig.replacementThreshold) { + components[index] = null; + contents[index] = null; + } + + // may be set to null by the component itself, or to e.g. a depleted fuel rod + if(contents[index] == null || contents[index].getItem() != compConfig.item) { + currentComponent.replaceCount++; + contents[index] = new ItemStack(compConfig.item); + } + } + } + } + + if(reactorTickCounter % 2 == 0) { + int eupt = (int) (this.addedEU / 20); + + if(eupt < result.minEUpT) { + result.minEUpT = eupt; + } + + if(eupt > result.maxEUpT) { + result.maxEUpT = eupt; + } + } else { + int hups = this.addedHU; + + if(hups < result.minHUpS) { + result.minHUpS = hups; + } + + if(hups > result.maxHUpS) { + result.maxHUpS = hups; + } + + if(storedHeat < result.minTemp) { + result.minTemp = storedHeat; + } + + if(storedHeat > result.maxTemp) { + result.maxTemp = storedHeat; + } + + result.totalTempSecs += storedHeat * 2; + + double ratio = storedHeat / (double)getMaxHullHeat(); + + if(result.timeToEvaporate != null && result.timeToNormal == null && ratio < 0.5) { + result.timeToNormal = reactorTickCounter; + } + + if(result.timeToBurn == null && ratio >= 0.4) { + result.timeToBurn = reactorTickCounter; + } + + if(result.timeToEvaporate == null && ratio >= 0.5) { + result.timeToEvaporate = reactorTickCounter; + } + + if(result.timeToHurt == null && ratio >= 0.7) { + result.timeToHurt = reactorTickCounter; + } + + if(result.timeToLava == null && ratio >= 0.85) { + result.timeToLava = reactorTickCounter; + } + + if(result.timeToExplode == null && ratio >= 1) { + result.timeToExplode = reactorTickCounter; + break; + } + } + + if(isActive()) { + result.activeTime++; + } else { + result.pausedTime++; + } + + if(config.pulsed) { + pulseCounter++; + + if(pulseActive) { + if(pulseCounter >= config.onPulse) { + pulseActive = false; + pulseCounter -= config.onPulse; + } + } else { + if(pulseCounter >= config.offPulse) { + pulseActive = true; + pulseCounter -= config.offPulse; + } + } + } + + result.simTime++; + + reactorTickCounter++; + } + + result.end = System.nanoTime(); + + for(int i = 0; i < components.length; i++) { + var c = getComponent(i % COL_COUNT, i / COL_COUNT); + + if(c != null) { + c.modifySimulationResults(result, i); + } + } + } + } +} diff --git a/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulatorProtos.java b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulatorProtos.java new file mode 100644 index 0000000..8ec8001 --- /dev/null +++ b/src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulatorProtos.java @@ -0,0 +1,5980 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/main/java/com/recursive_pineapple/nuclear_horizons/reactors/tile/simulator/SimulationConfigProto.proto + +// Protobuf Java Version: 3.25.3 +package com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator; + +public final class SimulatorProtos { + private SimulatorProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SimulationConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:SimulationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * bool pulsed = 1; + * @return The pulsed. + */ + boolean getPulsed(); + + /** + * bool automated = 2; + * @return The automated. + */ + boolean getAutomated(); + + /** + * bool fluid = 3; + * @return The fluid. + */ + boolean getFluid(); + + /** + * int32 initialHeat = 4; + * @return The initialHeat. + */ + int getInitialHeat(); + + /** + * int32 onPulse = 5; + * @return The onPulse. + */ + int getOnPulse(); + + /** + * int32 offPulse = 6; + * @return The offPulse. + */ + int getOffPulse(); + + /** + * int32 suspendTemp = 7; + * @return The suspendTemp. + */ + int getSuspendTemp(); + + /** + * int32 resumeTemp = 8; + * @return The resumeTemp. + */ + int getResumeTemp(); + + /** + * int32 maxSimulationTicks = 9; + * @return The maxSimulationTicks. + */ + int getMaxSimulationTicks(); + + /** + * repeated .ComponentConfig components = 10; + */ + java.util.List + getComponentsList(); + /** + * repeated .ComponentConfig components = 10; + */ + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig getComponents(int index); + /** + * repeated .ComponentConfig components = 10; + */ + int getComponentsCount(); + /** + * repeated .ComponentConfig components = 10; + */ + java.util.List + getComponentsOrBuilderList(); + /** + * repeated .ComponentConfig components = 10; + */ + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder getComponentsOrBuilder( + int index); + } + /** + * Protobuf type {@code SimulationConfig} + */ + public static final class SimulationConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SimulationConfig) + SimulationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulationConfig.newBuilder() to construct. + private SimulationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimulationConfig() { + components_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SimulationConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.Builder.class); + } + + public static final int PULSED_FIELD_NUMBER = 1; + private boolean pulsed_ = false; + /** + * bool pulsed = 1; + * @return The pulsed. + */ + @java.lang.Override + public boolean getPulsed() { + return pulsed_; + } + + public static final int AUTOMATED_FIELD_NUMBER = 2; + private boolean automated_ = false; + /** + * bool automated = 2; + * @return The automated. + */ + @java.lang.Override + public boolean getAutomated() { + return automated_; + } + + public static final int FLUID_FIELD_NUMBER = 3; + private boolean fluid_ = false; + /** + * bool fluid = 3; + * @return The fluid. + */ + @java.lang.Override + public boolean getFluid() { + return fluid_; + } + + public static final int INITIALHEAT_FIELD_NUMBER = 4; + private int initialHeat_ = 0; + /** + * int32 initialHeat = 4; + * @return The initialHeat. + */ + @java.lang.Override + public int getInitialHeat() { + return initialHeat_; + } + + public static final int ONPULSE_FIELD_NUMBER = 5; + private int onPulse_ = 0; + /** + * int32 onPulse = 5; + * @return The onPulse. + */ + @java.lang.Override + public int getOnPulse() { + return onPulse_; + } + + public static final int OFFPULSE_FIELD_NUMBER = 6; + private int offPulse_ = 0; + /** + * int32 offPulse = 6; + * @return The offPulse. + */ + @java.lang.Override + public int getOffPulse() { + return offPulse_; + } + + public static final int SUSPENDTEMP_FIELD_NUMBER = 7; + private int suspendTemp_ = 0; + /** + * int32 suspendTemp = 7; + * @return The suspendTemp. + */ + @java.lang.Override + public int getSuspendTemp() { + return suspendTemp_; + } + + public static final int RESUMETEMP_FIELD_NUMBER = 8; + private int resumeTemp_ = 0; + /** + * int32 resumeTemp = 8; + * @return The resumeTemp. + */ + @java.lang.Override + public int getResumeTemp() { + return resumeTemp_; + } + + public static final int MAXSIMULATIONTICKS_FIELD_NUMBER = 9; + private int maxSimulationTicks_ = 0; + /** + * int32 maxSimulationTicks = 9; + * @return The maxSimulationTicks. + */ + @java.lang.Override + public int getMaxSimulationTicks() { + return maxSimulationTicks_; + } + + public static final int COMPONENTS_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List components_; + /** + * repeated .ComponentConfig components = 10; + */ + @java.lang.Override + public java.util.List getComponentsList() { + return components_; + } + /** + * repeated .ComponentConfig components = 10; + */ + @java.lang.Override + public java.util.List + getComponentsOrBuilderList() { + return components_; + } + /** + * repeated .ComponentConfig components = 10; + */ + @java.lang.Override + public int getComponentsCount() { + return components_.size(); + } + /** + * repeated .ComponentConfig components = 10; + */ + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig getComponents(int index) { + return components_.get(index); + } + /** + * repeated .ComponentConfig components = 10; + */ + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder getComponentsOrBuilder( + int index) { + return components_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pulsed_ != false) { + output.writeBool(1, pulsed_); + } + if (automated_ != false) { + output.writeBool(2, automated_); + } + if (fluid_ != false) { + output.writeBool(3, fluid_); + } + if (initialHeat_ != 0) { + output.writeInt32(4, initialHeat_); + } + if (onPulse_ != 0) { + output.writeInt32(5, onPulse_); + } + if (offPulse_ != 0) { + output.writeInt32(6, offPulse_); + } + if (suspendTemp_ != 0) { + output.writeInt32(7, suspendTemp_); + } + if (resumeTemp_ != 0) { + output.writeInt32(8, resumeTemp_); + } + if (maxSimulationTicks_ != 0) { + output.writeInt32(9, maxSimulationTicks_); + } + for (int i = 0; i < components_.size(); i++) { + output.writeMessage(10, components_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pulsed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, pulsed_); + } + if (automated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, automated_); + } + if (fluid_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, fluid_); + } + if (initialHeat_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, initialHeat_); + } + if (onPulse_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, onPulse_); + } + if (offPulse_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, offPulse_); + } + if (suspendTemp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, suspendTemp_); + } + if (resumeTemp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, resumeTemp_); + } + if (maxSimulationTicks_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, maxSimulationTicks_); + } + for (int i = 0; i < components_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, components_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig)) { + return super.equals(obj); + } + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig other = (com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig) obj; + + if (getPulsed() + != other.getPulsed()) return false; + if (getAutomated() + != other.getAutomated()) return false; + if (getFluid() + != other.getFluid()) return false; + if (getInitialHeat() + != other.getInitialHeat()) return false; + if (getOnPulse() + != other.getOnPulse()) return false; + if (getOffPulse() + != other.getOffPulse()) return false; + if (getSuspendTemp() + != other.getSuspendTemp()) return false; + if (getResumeTemp() + != other.getResumeTemp()) return false; + if (getMaxSimulationTicks() + != other.getMaxSimulationTicks()) return false; + if (!getComponentsList() + .equals(other.getComponentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PULSED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPulsed()); + hash = (37 * hash) + AUTOMATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAutomated()); + hash = (37 * hash) + FLUID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFluid()); + hash = (37 * hash) + INITIALHEAT_FIELD_NUMBER; + hash = (53 * hash) + getInitialHeat(); + hash = (37 * hash) + ONPULSE_FIELD_NUMBER; + hash = (53 * hash) + getOnPulse(); + hash = (37 * hash) + OFFPULSE_FIELD_NUMBER; + hash = (53 * hash) + getOffPulse(); + hash = (37 * hash) + SUSPENDTEMP_FIELD_NUMBER; + hash = (53 * hash) + getSuspendTemp(); + hash = (37 * hash) + RESUMETEMP_FIELD_NUMBER; + hash = (53 * hash) + getResumeTemp(); + hash = (37 * hash) + MAXSIMULATIONTICKS_FIELD_NUMBER; + hash = (53 * hash) + getMaxSimulationTicks(); + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SimulationConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SimulationConfig) + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.Builder.class); + } + + // Construct using com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pulsed_ = false; + automated_ = false; + fluid_ = false; + initialHeat_ = 0; + onPulse_ = 0; + offPulse_ = 0; + suspendTemp_ = 0; + resumeTemp_ = 0; + maxSimulationTicks_ = 0; + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + } else { + components_ = null; + componentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationConfig_descriptor; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig getDefaultInstanceForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig build() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig buildPartial() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig result = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig result) { + if (componentsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + components_ = java.util.Collections.unmodifiableList(components_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.components_ = components_; + } else { + result.components_ = componentsBuilder_.build(); + } + } + + private void buildPartial0(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pulsed_ = pulsed_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automated_ = automated_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fluid_ = fluid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.initialHeat_ = initialHeat_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.onPulse_ = onPulse_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.offPulse_ = offPulse_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.suspendTemp_ = suspendTemp_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.resumeTemp_ = resumeTemp_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.maxSimulationTicks_ = maxSimulationTicks_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig) { + return mergeFrom((com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig other) { + if (other == com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig.getDefaultInstance()) return this; + if (other.getPulsed() != false) { + setPulsed(other.getPulsed()); + } + if (other.getAutomated() != false) { + setAutomated(other.getAutomated()); + } + if (other.getFluid() != false) { + setFluid(other.getFluid()); + } + if (other.getInitialHeat() != 0) { + setInitialHeat(other.getInitialHeat()); + } + if (other.getOnPulse() != 0) { + setOnPulse(other.getOnPulse()); + } + if (other.getOffPulse() != 0) { + setOffPulse(other.getOffPulse()); + } + if (other.getSuspendTemp() != 0) { + setSuspendTemp(other.getSuspendTemp()); + } + if (other.getResumeTemp() != 0) { + setResumeTemp(other.getResumeTemp()); + } + if (other.getMaxSimulationTicks() != 0) { + setMaxSimulationTicks(other.getMaxSimulationTicks()); + } + if (componentsBuilder_ == null) { + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + } else { + if (!other.components_.isEmpty()) { + if (componentsBuilder_.isEmpty()) { + componentsBuilder_.dispose(); + componentsBuilder_ = null; + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000200); + componentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getComponentsFieldBuilder() : null; + } else { + componentsBuilder_.addAllMessages(other.components_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + pulsed_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + automated_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + fluid_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + initialHeat_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + onPulse_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + offPulse_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + suspendTemp_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + resumeTemp_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + maxSimulationTicks_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig m = + input.readMessage( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.parser(), + extensionRegistry); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(m); + } else { + componentsBuilder_.addMessage(m); + } + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean pulsed_ ; + /** + * bool pulsed = 1; + * @return The pulsed. + */ + @java.lang.Override + public boolean getPulsed() { + return pulsed_; + } + /** + * bool pulsed = 1; + * @param value The pulsed to set. + * @return This builder for chaining. + */ + public Builder setPulsed(boolean value) { + + pulsed_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool pulsed = 1; + * @return This builder for chaining. + */ + public Builder clearPulsed() { + bitField0_ = (bitField0_ & ~0x00000001); + pulsed_ = false; + onChanged(); + return this; + } + + private boolean automated_ ; + /** + * bool automated = 2; + * @return The automated. + */ + @java.lang.Override + public boolean getAutomated() { + return automated_; + } + /** + * bool automated = 2; + * @param value The automated to set. + * @return This builder for chaining. + */ + public Builder setAutomated(boolean value) { + + automated_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool automated = 2; + * @return This builder for chaining. + */ + public Builder clearAutomated() { + bitField0_ = (bitField0_ & ~0x00000002); + automated_ = false; + onChanged(); + return this; + } + + private boolean fluid_ ; + /** + * bool fluid = 3; + * @return The fluid. + */ + @java.lang.Override + public boolean getFluid() { + return fluid_; + } + /** + * bool fluid = 3; + * @param value The fluid to set. + * @return This builder for chaining. + */ + public Builder setFluid(boolean value) { + + fluid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool fluid = 3; + * @return This builder for chaining. + */ + public Builder clearFluid() { + bitField0_ = (bitField0_ & ~0x00000004); + fluid_ = false; + onChanged(); + return this; + } + + private int initialHeat_ ; + /** + * int32 initialHeat = 4; + * @return The initialHeat. + */ + @java.lang.Override + public int getInitialHeat() { + return initialHeat_; + } + /** + * int32 initialHeat = 4; + * @param value The initialHeat to set. + * @return This builder for chaining. + */ + public Builder setInitialHeat(int value) { + + initialHeat_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 initialHeat = 4; + * @return This builder for chaining. + */ + public Builder clearInitialHeat() { + bitField0_ = (bitField0_ & ~0x00000008); + initialHeat_ = 0; + onChanged(); + return this; + } + + private int onPulse_ ; + /** + * int32 onPulse = 5; + * @return The onPulse. + */ + @java.lang.Override + public int getOnPulse() { + return onPulse_; + } + /** + * int32 onPulse = 5; + * @param value The onPulse to set. + * @return This builder for chaining. + */ + public Builder setOnPulse(int value) { + + onPulse_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 onPulse = 5; + * @return This builder for chaining. + */ + public Builder clearOnPulse() { + bitField0_ = (bitField0_ & ~0x00000010); + onPulse_ = 0; + onChanged(); + return this; + } + + private int offPulse_ ; + /** + * int32 offPulse = 6; + * @return The offPulse. + */ + @java.lang.Override + public int getOffPulse() { + return offPulse_; + } + /** + * int32 offPulse = 6; + * @param value The offPulse to set. + * @return This builder for chaining. + */ + public Builder setOffPulse(int value) { + + offPulse_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int32 offPulse = 6; + * @return This builder for chaining. + */ + public Builder clearOffPulse() { + bitField0_ = (bitField0_ & ~0x00000020); + offPulse_ = 0; + onChanged(); + return this; + } + + private int suspendTemp_ ; + /** + * int32 suspendTemp = 7; + * @return The suspendTemp. + */ + @java.lang.Override + public int getSuspendTemp() { + return suspendTemp_; + } + /** + * int32 suspendTemp = 7; + * @param value The suspendTemp to set. + * @return This builder for chaining. + */ + public Builder setSuspendTemp(int value) { + + suspendTemp_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int32 suspendTemp = 7; + * @return This builder for chaining. + */ + public Builder clearSuspendTemp() { + bitField0_ = (bitField0_ & ~0x00000040); + suspendTemp_ = 0; + onChanged(); + return this; + } + + private int resumeTemp_ ; + /** + * int32 resumeTemp = 8; + * @return The resumeTemp. + */ + @java.lang.Override + public int getResumeTemp() { + return resumeTemp_; + } + /** + * int32 resumeTemp = 8; + * @param value The resumeTemp to set. + * @return This builder for chaining. + */ + public Builder setResumeTemp(int value) { + + resumeTemp_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * int32 resumeTemp = 8; + * @return This builder for chaining. + */ + public Builder clearResumeTemp() { + bitField0_ = (bitField0_ & ~0x00000080); + resumeTemp_ = 0; + onChanged(); + return this; + } + + private int maxSimulationTicks_ ; + /** + * int32 maxSimulationTicks = 9; + * @return The maxSimulationTicks. + */ + @java.lang.Override + public int getMaxSimulationTicks() { + return maxSimulationTicks_; + } + /** + * int32 maxSimulationTicks = 9; + * @param value The maxSimulationTicks to set. + * @return This builder for chaining. + */ + public Builder setMaxSimulationTicks(int value) { + + maxSimulationTicks_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int32 maxSimulationTicks = 9; + * @return This builder for chaining. + */ + public Builder clearMaxSimulationTicks() { + bitField0_ = (bitField0_ & ~0x00000100); + maxSimulationTicks_ = 0; + onChanged(); + return this; + } + + private java.util.List components_ = + java.util.Collections.emptyList(); + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + components_ = new java.util.ArrayList(components_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder> componentsBuilder_; + + /** + * repeated .ComponentConfig components = 10; + */ + public java.util.List getComponentsList() { + if (componentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(components_); + } else { + return componentsBuilder_.getMessageList(); + } + } + /** + * repeated .ComponentConfig components = 10; + */ + public int getComponentsCount() { + if (componentsBuilder_ == null) { + return components_.size(); + } else { + return componentsBuilder_.getCount(); + } + } + /** + * repeated .ComponentConfig components = 10; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig getComponents(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessage(index); + } + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder setComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + } else { + componentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder setComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.set(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder addComponents(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + } else { + componentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder addComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(index, value); + onChanged(); + } else { + componentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder addComponents( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder addComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder addAllComponents( + java.lang.Iterable values) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, components_); + onChanged(); + } else { + componentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder clearComponents() { + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + componentsBuilder_.clear(); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public Builder removeComponents(int index) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.remove(index); + onChanged(); + } else { + componentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .ComponentConfig components = 10; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder getComponentsBuilder( + int index) { + return getComponentsFieldBuilder().getBuilder(index); + } + /** + * repeated .ComponentConfig components = 10; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder getComponentsOrBuilder( + int index) { + if (componentsBuilder_ == null) { + return components_.get(index); } else { + return componentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ComponentConfig components = 10; + */ + public java.util.List + getComponentsOrBuilderList() { + if (componentsBuilder_ != null) { + return componentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(components_); + } + } + /** + * repeated .ComponentConfig components = 10; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder addComponentsBuilder() { + return getComponentsFieldBuilder().addBuilder( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.getDefaultInstance()); + } + /** + * repeated .ComponentConfig components = 10; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder addComponentsBuilder( + int index) { + return getComponentsFieldBuilder().addBuilder( + index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.getDefaultInstance()); + } + /** + * repeated .ComponentConfig components = 10; + */ + public java.util.List + getComponentsBuilderList() { + return getComponentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder> + getComponentsFieldBuilder() { + if (componentsBuilder_ == null) { + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder>( + components_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + components_ = null; + } + return componentsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SimulationConfig) + } + + // @@protoc_insertion_point(class_scope:SimulationConfig) + private static final com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig(); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ComponentConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:ComponentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 index = 1; + * @return The index. + */ + int getIndex(); + + /** + * int32 item = 2; + * @return The item. + */ + int getItem(); + + /** + * bool hasAutomation = 3; + * @return The hasAutomation. + */ + boolean getHasAutomation(); + + /** + * int32 initialHeat = 4; + * @return The initialHeat. + */ + int getInitialHeat(); + + /** + * int32 replacementThreshold = 5; + * @return The replacementThreshold. + */ + int getReplacementThreshold(); + + /** + * int32 reactorPause = 6; + * @return The reactorPause. + */ + int getReactorPause(); + } + /** + * Protobuf type {@code ComponentConfig} + */ + public static final class ComponentConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:ComponentConfig) + ComponentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComponentConfig.newBuilder() to construct. + private ComponentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComponentConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComponentConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + private int index_ = 0; + /** + * int32 index = 1; + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + + public static final int ITEM_FIELD_NUMBER = 2; + private int item_ = 0; + /** + * int32 item = 2; + * @return The item. + */ + @java.lang.Override + public int getItem() { + return item_; + } + + public static final int HASAUTOMATION_FIELD_NUMBER = 3; + private boolean hasAutomation_ = false; + /** + * bool hasAutomation = 3; + * @return The hasAutomation. + */ + @java.lang.Override + public boolean getHasAutomation() { + return hasAutomation_; + } + + public static final int INITIALHEAT_FIELD_NUMBER = 4; + private int initialHeat_ = 0; + /** + * int32 initialHeat = 4; + * @return The initialHeat. + */ + @java.lang.Override + public int getInitialHeat() { + return initialHeat_; + } + + public static final int REPLACEMENTTHRESHOLD_FIELD_NUMBER = 5; + private int replacementThreshold_ = 0; + /** + * int32 replacementThreshold = 5; + * @return The replacementThreshold. + */ + @java.lang.Override + public int getReplacementThreshold() { + return replacementThreshold_; + } + + public static final int REACTORPAUSE_FIELD_NUMBER = 6; + private int reactorPause_ = 0; + /** + * int32 reactorPause = 6; + * @return The reactorPause. + */ + @java.lang.Override + public int getReactorPause() { + return reactorPause_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (index_ != 0) { + output.writeInt32(1, index_); + } + if (item_ != 0) { + output.writeInt32(2, item_); + } + if (hasAutomation_ != false) { + output.writeBool(3, hasAutomation_); + } + if (initialHeat_ != 0) { + output.writeInt32(4, initialHeat_); + } + if (replacementThreshold_ != 0) { + output.writeInt32(5, replacementThreshold_); + } + if (reactorPause_ != 0) { + output.writeInt32(6, reactorPause_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, index_); + } + if (item_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, item_); + } + if (hasAutomation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, hasAutomation_); + } + if (initialHeat_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, initialHeat_); + } + if (replacementThreshold_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, replacementThreshold_); + } + if (reactorPause_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, reactorPause_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig)) { + return super.equals(obj); + } + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig other = (com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig) obj; + + if (getIndex() + != other.getIndex()) return false; + if (getItem() + != other.getItem()) return false; + if (getHasAutomation() + != other.getHasAutomation()) return false; + if (getInitialHeat() + != other.getInitialHeat()) return false; + if (getReplacementThreshold() + != other.getReplacementThreshold()) return false; + if (getReactorPause() + != other.getReactorPause()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem(); + hash = (37 * hash) + HASAUTOMATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHasAutomation()); + hash = (37 * hash) + INITIALHEAT_FIELD_NUMBER; + hash = (53 * hash) + getInitialHeat(); + hash = (37 * hash) + REPLACEMENTTHRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getReplacementThreshold(); + hash = (37 * hash) + REACTORPAUSE_FIELD_NUMBER; + hash = (53 * hash) + getReactorPause(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ComponentConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:ComponentConfig) + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.Builder.class); + } + + // Construct using com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + index_ = 0; + item_ = 0; + hasAutomation_ = false; + initialHeat_ = 0; + replacementThreshold_ = 0; + reactorPause_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentConfig_descriptor; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig getDefaultInstanceForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig build() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig buildPartial() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig result = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.item_ = item_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hasAutomation_ = hasAutomation_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.initialHeat_ = initialHeat_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.replacementThreshold_ = replacementThreshold_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.reactorPause_ = reactorPause_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig) { + return mergeFrom((com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig other) { + if (other == com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig.getDefaultInstance()) return this; + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.getItem() != 0) { + setItem(other.getItem()); + } + if (other.getHasAutomation() != false) { + setHasAutomation(other.getHasAutomation()); + } + if (other.getInitialHeat() != 0) { + setInitialHeat(other.getInitialHeat()); + } + if (other.getReplacementThreshold() != 0) { + setReplacementThreshold(other.getReplacementThreshold()); + } + if (other.getReactorPause() != 0) { + setReactorPause(other.getReactorPause()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + item_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + hasAutomation_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + initialHeat_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + replacementThreshold_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + reactorPause_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int index_ ; + /** + * int32 index = 1; + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * int32 index = 1; + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 index = 1; + * @return This builder for chaining. + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + index_ = 0; + onChanged(); + return this; + } + + private int item_ ; + /** + * int32 item = 2; + * @return The item. + */ + @java.lang.Override + public int getItem() { + return item_; + } + /** + * int32 item = 2; + * @param value The item to set. + * @return This builder for chaining. + */ + public Builder setItem(int value) { + + item_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 item = 2; + * @return This builder for chaining. + */ + public Builder clearItem() { + bitField0_ = (bitField0_ & ~0x00000002); + item_ = 0; + onChanged(); + return this; + } + + private boolean hasAutomation_ ; + /** + * bool hasAutomation = 3; + * @return The hasAutomation. + */ + @java.lang.Override + public boolean getHasAutomation() { + return hasAutomation_; + } + /** + * bool hasAutomation = 3; + * @param value The hasAutomation to set. + * @return This builder for chaining. + */ + public Builder setHasAutomation(boolean value) { + + hasAutomation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool hasAutomation = 3; + * @return This builder for chaining. + */ + public Builder clearHasAutomation() { + bitField0_ = (bitField0_ & ~0x00000004); + hasAutomation_ = false; + onChanged(); + return this; + } + + private int initialHeat_ ; + /** + * int32 initialHeat = 4; + * @return The initialHeat. + */ + @java.lang.Override + public int getInitialHeat() { + return initialHeat_; + } + /** + * int32 initialHeat = 4; + * @param value The initialHeat to set. + * @return This builder for chaining. + */ + public Builder setInitialHeat(int value) { + + initialHeat_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 initialHeat = 4; + * @return This builder for chaining. + */ + public Builder clearInitialHeat() { + bitField0_ = (bitField0_ & ~0x00000008); + initialHeat_ = 0; + onChanged(); + return this; + } + + private int replacementThreshold_ ; + /** + * int32 replacementThreshold = 5; + * @return The replacementThreshold. + */ + @java.lang.Override + public int getReplacementThreshold() { + return replacementThreshold_; + } + /** + * int32 replacementThreshold = 5; + * @param value The replacementThreshold to set. + * @return This builder for chaining. + */ + public Builder setReplacementThreshold(int value) { + + replacementThreshold_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 replacementThreshold = 5; + * @return This builder for chaining. + */ + public Builder clearReplacementThreshold() { + bitField0_ = (bitField0_ & ~0x00000010); + replacementThreshold_ = 0; + onChanged(); + return this; + } + + private int reactorPause_ ; + /** + * int32 reactorPause = 6; + * @return The reactorPause. + */ + @java.lang.Override + public int getReactorPause() { + return reactorPause_; + } + /** + * int32 reactorPause = 6; + * @param value The reactorPause to set. + * @return This builder for chaining. + */ + public Builder setReactorPause(int value) { + + reactorPause_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int32 reactorPause = 6; + * @return This builder for chaining. + */ + public Builder clearReactorPause() { + bitField0_ = (bitField0_ & ~0x00000020); + reactorPause_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:ComponentConfig) + } + + // @@protoc_insertion_point(class_scope:ComponentConfig) + private static final com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig(); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComponentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SimulationResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:SimulationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 start = 1; + * @return The start. + */ + long getStart(); + + /** + * int64 end = 2; + * @return The end. + */ + long getEnd(); + + /** + * int64 totalEU = 3; + * @return The totalEU. + */ + long getTotalEU(); + + /** + * int32 minEUpT = 4; + * @return The minEUpT. + */ + int getMinEUpT(); + + /** + * int32 maxEUpT = 5; + * @return The maxEUpT. + */ + int getMaxEUpT(); + + /** + * int64 totalHU = 6; + * @return The totalHU. + */ + long getTotalHU(); + + /** + * int32 minHUpS = 7; + * @return The minHUpS. + */ + int getMinHUpS(); + + /** + * int32 maxHUpS = 8; + * @return The maxHUpS. + */ + int getMaxHUpS(); + + /** + * int64 totalTempSecs = 9; + * @return The totalTempSecs. + */ + long getTotalTempSecs(); + + /** + * int32 minTemp = 10; + * @return The minTemp. + */ + int getMinTemp(); + + /** + * int32 maxTemp = 11; + * @return The maxTemp. + */ + int getMaxTemp(); + + /** + * int64 totalHullHeating = 12; + * @return The totalHullHeating. + */ + long getTotalHullHeating(); + + /** + * int64 totalHullCooling = 13; + * @return The totalHullCooling. + */ + long getTotalHullCooling(); + + /** + * int32 simTime = 14; + * @return The simTime. + */ + int getSimTime(); + + /** + * int32 activeTime = 15; + * @return The activeTime. + */ + int getActiveTime(); + + /** + * int32 pausedTime = 16; + * @return The pausedTime. + */ + int getPausedTime(); + + /** + * optional int32 timeToNormal = 17; + * @return Whether the timeToNormal field is set. + */ + boolean hasTimeToNormal(); + /** + * optional int32 timeToNormal = 17; + * @return The timeToNormal. + */ + int getTimeToNormal(); + + /** + * optional int32 timeToBurn = 18; + * @return Whether the timeToBurn field is set. + */ + boolean hasTimeToBurn(); + /** + * optional int32 timeToBurn = 18; + * @return The timeToBurn. + */ + int getTimeToBurn(); + + /** + * optional int32 timeToEvaporate = 19; + * @return Whether the timeToEvaporate field is set. + */ + boolean hasTimeToEvaporate(); + /** + * optional int32 timeToEvaporate = 19; + * @return The timeToEvaporate. + */ + int getTimeToEvaporate(); + + /** + * optional int32 timeToHurt = 20; + * @return Whether the timeToHurt field is set. + */ + boolean hasTimeToHurt(); + /** + * optional int32 timeToHurt = 20; + * @return The timeToHurt. + */ + int getTimeToHurt(); + + /** + * optional int32 timeToLava = 21; + * @return Whether the timeToLava field is set. + */ + boolean hasTimeToLava(); + /** + * optional int32 timeToLava = 21; + * @return The timeToLava. + */ + int getTimeToLava(); + + /** + * optional int32 timeToExplode = 22; + * @return Whether the timeToExplode field is set. + */ + boolean hasTimeToExplode(); + /** + * optional int32 timeToExplode = 22; + * @return The timeToExplode. + */ + int getTimeToExplode(); + + /** + * repeated .ComponentResult components = 23; + */ + java.util.List + getComponentsList(); + /** + * repeated .ComponentResult components = 23; + */ + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult getComponents(int index); + /** + * repeated .ComponentResult components = 23; + */ + int getComponentsCount(); + /** + * repeated .ComponentResult components = 23; + */ + java.util.List + getComponentsOrBuilderList(); + /** + * repeated .ComponentResult components = 23; + */ + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder getComponentsOrBuilder( + int index); + } + /** + * Protobuf type {@code SimulationResult} + */ + public static final class SimulationResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SimulationResult) + SimulationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulationResult.newBuilder() to construct. + private SimulationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimulationResult() { + components_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SimulationResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.Builder.class); + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private long start_ = 0L; + /** + * int64 start = 1; + * @return The start. + */ + @java.lang.Override + public long getStart() { + return start_; + } + + public static final int END_FIELD_NUMBER = 2; + private long end_ = 0L; + /** + * int64 end = 2; + * @return The end. + */ + @java.lang.Override + public long getEnd() { + return end_; + } + + public static final int TOTALEU_FIELD_NUMBER = 3; + private long totalEU_ = 0L; + /** + * int64 totalEU = 3; + * @return The totalEU. + */ + @java.lang.Override + public long getTotalEU() { + return totalEU_; + } + + public static final int MINEUPT_FIELD_NUMBER = 4; + private int minEUpT_ = 0; + /** + * int32 minEUpT = 4; + * @return The minEUpT. + */ + @java.lang.Override + public int getMinEUpT() { + return minEUpT_; + } + + public static final int MAXEUPT_FIELD_NUMBER = 5; + private int maxEUpT_ = 0; + /** + * int32 maxEUpT = 5; + * @return The maxEUpT. + */ + @java.lang.Override + public int getMaxEUpT() { + return maxEUpT_; + } + + public static final int TOTALHU_FIELD_NUMBER = 6; + private long totalHU_ = 0L; + /** + * int64 totalHU = 6; + * @return The totalHU. + */ + @java.lang.Override + public long getTotalHU() { + return totalHU_; + } + + public static final int MINHUPS_FIELD_NUMBER = 7; + private int minHUpS_ = 0; + /** + * int32 minHUpS = 7; + * @return The minHUpS. + */ + @java.lang.Override + public int getMinHUpS() { + return minHUpS_; + } + + public static final int MAXHUPS_FIELD_NUMBER = 8; + private int maxHUpS_ = 0; + /** + * int32 maxHUpS = 8; + * @return The maxHUpS. + */ + @java.lang.Override + public int getMaxHUpS() { + return maxHUpS_; + } + + public static final int TOTALTEMPSECS_FIELD_NUMBER = 9; + private long totalTempSecs_ = 0L; + /** + * int64 totalTempSecs = 9; + * @return The totalTempSecs. + */ + @java.lang.Override + public long getTotalTempSecs() { + return totalTempSecs_; + } + + public static final int MINTEMP_FIELD_NUMBER = 10; + private int minTemp_ = 0; + /** + * int32 minTemp = 10; + * @return The minTemp. + */ + @java.lang.Override + public int getMinTemp() { + return minTemp_; + } + + public static final int MAXTEMP_FIELD_NUMBER = 11; + private int maxTemp_ = 0; + /** + * int32 maxTemp = 11; + * @return The maxTemp. + */ + @java.lang.Override + public int getMaxTemp() { + return maxTemp_; + } + + public static final int TOTALHULLHEATING_FIELD_NUMBER = 12; + private long totalHullHeating_ = 0L; + /** + * int64 totalHullHeating = 12; + * @return The totalHullHeating. + */ + @java.lang.Override + public long getTotalHullHeating() { + return totalHullHeating_; + } + + public static final int TOTALHULLCOOLING_FIELD_NUMBER = 13; + private long totalHullCooling_ = 0L; + /** + * int64 totalHullCooling = 13; + * @return The totalHullCooling. + */ + @java.lang.Override + public long getTotalHullCooling() { + return totalHullCooling_; + } + + public static final int SIMTIME_FIELD_NUMBER = 14; + private int simTime_ = 0; + /** + * int32 simTime = 14; + * @return The simTime. + */ + @java.lang.Override + public int getSimTime() { + return simTime_; + } + + public static final int ACTIVETIME_FIELD_NUMBER = 15; + private int activeTime_ = 0; + /** + * int32 activeTime = 15; + * @return The activeTime. + */ + @java.lang.Override + public int getActiveTime() { + return activeTime_; + } + + public static final int PAUSEDTIME_FIELD_NUMBER = 16; + private int pausedTime_ = 0; + /** + * int32 pausedTime = 16; + * @return The pausedTime. + */ + @java.lang.Override + public int getPausedTime() { + return pausedTime_; + } + + public static final int TIMETONORMAL_FIELD_NUMBER = 17; + private int timeToNormal_ = 0; + /** + * optional int32 timeToNormal = 17; + * @return Whether the timeToNormal field is set. + */ + @java.lang.Override + public boolean hasTimeToNormal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional int32 timeToNormal = 17; + * @return The timeToNormal. + */ + @java.lang.Override + public int getTimeToNormal() { + return timeToNormal_; + } + + public static final int TIMETOBURN_FIELD_NUMBER = 18; + private int timeToBurn_ = 0; + /** + * optional int32 timeToBurn = 18; + * @return Whether the timeToBurn field is set. + */ + @java.lang.Override + public boolean hasTimeToBurn() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * optional int32 timeToBurn = 18; + * @return The timeToBurn. + */ + @java.lang.Override + public int getTimeToBurn() { + return timeToBurn_; + } + + public static final int TIMETOEVAPORATE_FIELD_NUMBER = 19; + private int timeToEvaporate_ = 0; + /** + * optional int32 timeToEvaporate = 19; + * @return Whether the timeToEvaporate field is set. + */ + @java.lang.Override + public boolean hasTimeToEvaporate() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * optional int32 timeToEvaporate = 19; + * @return The timeToEvaporate. + */ + @java.lang.Override + public int getTimeToEvaporate() { + return timeToEvaporate_; + } + + public static final int TIMETOHURT_FIELD_NUMBER = 20; + private int timeToHurt_ = 0; + /** + * optional int32 timeToHurt = 20; + * @return Whether the timeToHurt field is set. + */ + @java.lang.Override + public boolean hasTimeToHurt() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * optional int32 timeToHurt = 20; + * @return The timeToHurt. + */ + @java.lang.Override + public int getTimeToHurt() { + return timeToHurt_; + } + + public static final int TIMETOLAVA_FIELD_NUMBER = 21; + private int timeToLava_ = 0; + /** + * optional int32 timeToLava = 21; + * @return Whether the timeToLava field is set. + */ + @java.lang.Override + public boolean hasTimeToLava() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * optional int32 timeToLava = 21; + * @return The timeToLava. + */ + @java.lang.Override + public int getTimeToLava() { + return timeToLava_; + } + + public static final int TIMETOEXPLODE_FIELD_NUMBER = 22; + private int timeToExplode_ = 0; + /** + * optional int32 timeToExplode = 22; + * @return Whether the timeToExplode field is set. + */ + @java.lang.Override + public boolean hasTimeToExplode() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * optional int32 timeToExplode = 22; + * @return The timeToExplode. + */ + @java.lang.Override + public int getTimeToExplode() { + return timeToExplode_; + } + + public static final int COMPONENTS_FIELD_NUMBER = 23; + @SuppressWarnings("serial") + private java.util.List components_; + /** + * repeated .ComponentResult components = 23; + */ + @java.lang.Override + public java.util.List getComponentsList() { + return components_; + } + /** + * repeated .ComponentResult components = 23; + */ + @java.lang.Override + public java.util.List + getComponentsOrBuilderList() { + return components_; + } + /** + * repeated .ComponentResult components = 23; + */ + @java.lang.Override + public int getComponentsCount() { + return components_.size(); + } + /** + * repeated .ComponentResult components = 23; + */ + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult getComponents(int index) { + return components_.get(index); + } + /** + * repeated .ComponentResult components = 23; + */ + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder getComponentsOrBuilder( + int index) { + return components_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (start_ != 0L) { + output.writeInt64(1, start_); + } + if (end_ != 0L) { + output.writeInt64(2, end_); + } + if (totalEU_ != 0L) { + output.writeInt64(3, totalEU_); + } + if (minEUpT_ != 0) { + output.writeInt32(4, minEUpT_); + } + if (maxEUpT_ != 0) { + output.writeInt32(5, maxEUpT_); + } + if (totalHU_ != 0L) { + output.writeInt64(6, totalHU_); + } + if (minHUpS_ != 0) { + output.writeInt32(7, minHUpS_); + } + if (maxHUpS_ != 0) { + output.writeInt32(8, maxHUpS_); + } + if (totalTempSecs_ != 0L) { + output.writeInt64(9, totalTempSecs_); + } + if (minTemp_ != 0) { + output.writeInt32(10, minTemp_); + } + if (maxTemp_ != 0) { + output.writeInt32(11, maxTemp_); + } + if (totalHullHeating_ != 0L) { + output.writeInt64(12, totalHullHeating_); + } + if (totalHullCooling_ != 0L) { + output.writeInt64(13, totalHullCooling_); + } + if (simTime_ != 0) { + output.writeInt32(14, simTime_); + } + if (activeTime_ != 0) { + output.writeInt32(15, activeTime_); + } + if (pausedTime_ != 0) { + output.writeInt32(16, pausedTime_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(17, timeToNormal_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(18, timeToBurn_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(19, timeToEvaporate_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt32(20, timeToHurt_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt32(21, timeToLava_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeInt32(22, timeToExplode_); + } + for (int i = 0; i < components_.size(); i++) { + output.writeMessage(23, components_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (start_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, start_); + } + if (end_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, end_); + } + if (totalEU_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, totalEU_); + } + if (minEUpT_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, minEUpT_); + } + if (maxEUpT_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, maxEUpT_); + } + if (totalHU_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, totalHU_); + } + if (minHUpS_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, minHUpS_); + } + if (maxHUpS_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, maxHUpS_); + } + if (totalTempSecs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, totalTempSecs_); + } + if (minTemp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, minTemp_); + } + if (maxTemp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(11, maxTemp_); + } + if (totalHullHeating_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, totalHullHeating_); + } + if (totalHullCooling_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(13, totalHullCooling_); + } + if (simTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(14, simTime_); + } + if (activeTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(15, activeTime_); + } + if (pausedTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(16, pausedTime_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(17, timeToNormal_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(18, timeToBurn_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(19, timeToEvaporate_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(20, timeToHurt_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(21, timeToLava_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(22, timeToExplode_); + } + for (int i = 0; i < components_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, components_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult)) { + return super.equals(obj); + } + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult other = (com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult) obj; + + if (getStart() + != other.getStart()) return false; + if (getEnd() + != other.getEnd()) return false; + if (getTotalEU() + != other.getTotalEU()) return false; + if (getMinEUpT() + != other.getMinEUpT()) return false; + if (getMaxEUpT() + != other.getMaxEUpT()) return false; + if (getTotalHU() + != other.getTotalHU()) return false; + if (getMinHUpS() + != other.getMinHUpS()) return false; + if (getMaxHUpS() + != other.getMaxHUpS()) return false; + if (getTotalTempSecs() + != other.getTotalTempSecs()) return false; + if (getMinTemp() + != other.getMinTemp()) return false; + if (getMaxTemp() + != other.getMaxTemp()) return false; + if (getTotalHullHeating() + != other.getTotalHullHeating()) return false; + if (getTotalHullCooling() + != other.getTotalHullCooling()) return false; + if (getSimTime() + != other.getSimTime()) return false; + if (getActiveTime() + != other.getActiveTime()) return false; + if (getPausedTime() + != other.getPausedTime()) return false; + if (hasTimeToNormal() != other.hasTimeToNormal()) return false; + if (hasTimeToNormal()) { + if (getTimeToNormal() + != other.getTimeToNormal()) return false; + } + if (hasTimeToBurn() != other.hasTimeToBurn()) return false; + if (hasTimeToBurn()) { + if (getTimeToBurn() + != other.getTimeToBurn()) return false; + } + if (hasTimeToEvaporate() != other.hasTimeToEvaporate()) return false; + if (hasTimeToEvaporate()) { + if (getTimeToEvaporate() + != other.getTimeToEvaporate()) return false; + } + if (hasTimeToHurt() != other.hasTimeToHurt()) return false; + if (hasTimeToHurt()) { + if (getTimeToHurt() + != other.getTimeToHurt()) return false; + } + if (hasTimeToLava() != other.hasTimeToLava()) return false; + if (hasTimeToLava()) { + if (getTimeToLava() + != other.getTimeToLava()) return false; + } + if (hasTimeToExplode() != other.hasTimeToExplode()) return false; + if (hasTimeToExplode()) { + if (getTimeToExplode() + != other.getTimeToExplode()) return false; + } + if (!getComponentsList() + .equals(other.getComponentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStart()); + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEnd()); + hash = (37 * hash) + TOTALEU_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalEU()); + hash = (37 * hash) + MINEUPT_FIELD_NUMBER; + hash = (53 * hash) + getMinEUpT(); + hash = (37 * hash) + MAXEUPT_FIELD_NUMBER; + hash = (53 * hash) + getMaxEUpT(); + hash = (37 * hash) + TOTALHU_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalHU()); + hash = (37 * hash) + MINHUPS_FIELD_NUMBER; + hash = (53 * hash) + getMinHUpS(); + hash = (37 * hash) + MAXHUPS_FIELD_NUMBER; + hash = (53 * hash) + getMaxHUpS(); + hash = (37 * hash) + TOTALTEMPSECS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalTempSecs()); + hash = (37 * hash) + MINTEMP_FIELD_NUMBER; + hash = (53 * hash) + getMinTemp(); + hash = (37 * hash) + MAXTEMP_FIELD_NUMBER; + hash = (53 * hash) + getMaxTemp(); + hash = (37 * hash) + TOTALHULLHEATING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalHullHeating()); + hash = (37 * hash) + TOTALHULLCOOLING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalHullCooling()); + hash = (37 * hash) + SIMTIME_FIELD_NUMBER; + hash = (53 * hash) + getSimTime(); + hash = (37 * hash) + ACTIVETIME_FIELD_NUMBER; + hash = (53 * hash) + getActiveTime(); + hash = (37 * hash) + PAUSEDTIME_FIELD_NUMBER; + hash = (53 * hash) + getPausedTime(); + if (hasTimeToNormal()) { + hash = (37 * hash) + TIMETONORMAL_FIELD_NUMBER; + hash = (53 * hash) + getTimeToNormal(); + } + if (hasTimeToBurn()) { + hash = (37 * hash) + TIMETOBURN_FIELD_NUMBER; + hash = (53 * hash) + getTimeToBurn(); + } + if (hasTimeToEvaporate()) { + hash = (37 * hash) + TIMETOEVAPORATE_FIELD_NUMBER; + hash = (53 * hash) + getTimeToEvaporate(); + } + if (hasTimeToHurt()) { + hash = (37 * hash) + TIMETOHURT_FIELD_NUMBER; + hash = (53 * hash) + getTimeToHurt(); + } + if (hasTimeToLava()) { + hash = (37 * hash) + TIMETOLAVA_FIELD_NUMBER; + hash = (53 * hash) + getTimeToLava(); + } + if (hasTimeToExplode()) { + hash = (37 * hash) + TIMETOEXPLODE_FIELD_NUMBER; + hash = (53 * hash) + getTimeToExplode(); + } + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SimulationResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SimulationResult) + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.Builder.class); + } + + // Construct using com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = 0L; + end_ = 0L; + totalEU_ = 0L; + minEUpT_ = 0; + maxEUpT_ = 0; + totalHU_ = 0L; + minHUpS_ = 0; + maxHUpS_ = 0; + totalTempSecs_ = 0L; + minTemp_ = 0; + maxTemp_ = 0; + totalHullHeating_ = 0L; + totalHullCooling_ = 0L; + simTime_ = 0; + activeTime_ = 0; + pausedTime_ = 0; + timeToNormal_ = 0; + timeToBurn_ = 0; + timeToEvaporate_ = 0; + timeToHurt_ = 0; + timeToLava_ = 0; + timeToExplode_ = 0; + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + } else { + components_ = null; + componentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00400000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_SimulationResult_descriptor; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult getDefaultInstanceForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult build() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult buildPartial() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult result = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult result) { + if (componentsBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0)) { + components_ = java.util.Collections.unmodifiableList(components_); + bitField0_ = (bitField0_ & ~0x00400000); + } + result.components_ = components_; + } else { + result.components_ = componentsBuilder_.build(); + } + } + + private void buildPartial0(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = start_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = end_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalEU_ = totalEU_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.minEUpT_ = minEUpT_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.maxEUpT_ = maxEUpT_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.totalHU_ = totalHU_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.minHUpS_ = minHUpS_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.maxHUpS_ = maxHUpS_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.totalTempSecs_ = totalTempSecs_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.minTemp_ = minTemp_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.maxTemp_ = maxTemp_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.totalHullHeating_ = totalHullHeating_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.totalHullCooling_ = totalHullCooling_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.simTime_ = simTime_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.activeTime_ = activeTime_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.pausedTime_ = pausedTime_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00010000) != 0)) { + result.timeToNormal_ = timeToNormal_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.timeToBurn_ = timeToBurn_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.timeToEvaporate_ = timeToEvaporate_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.timeToHurt_ = timeToHurt_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.timeToLava_ = timeToLava_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.timeToExplode_ = timeToExplode_; + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult) { + return mergeFrom((com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult other) { + if (other == com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult.getDefaultInstance()) return this; + if (other.getStart() != 0L) { + setStart(other.getStart()); + } + if (other.getEnd() != 0L) { + setEnd(other.getEnd()); + } + if (other.getTotalEU() != 0L) { + setTotalEU(other.getTotalEU()); + } + if (other.getMinEUpT() != 0) { + setMinEUpT(other.getMinEUpT()); + } + if (other.getMaxEUpT() != 0) { + setMaxEUpT(other.getMaxEUpT()); + } + if (other.getTotalHU() != 0L) { + setTotalHU(other.getTotalHU()); + } + if (other.getMinHUpS() != 0) { + setMinHUpS(other.getMinHUpS()); + } + if (other.getMaxHUpS() != 0) { + setMaxHUpS(other.getMaxHUpS()); + } + if (other.getTotalTempSecs() != 0L) { + setTotalTempSecs(other.getTotalTempSecs()); + } + if (other.getMinTemp() != 0) { + setMinTemp(other.getMinTemp()); + } + if (other.getMaxTemp() != 0) { + setMaxTemp(other.getMaxTemp()); + } + if (other.getTotalHullHeating() != 0L) { + setTotalHullHeating(other.getTotalHullHeating()); + } + if (other.getTotalHullCooling() != 0L) { + setTotalHullCooling(other.getTotalHullCooling()); + } + if (other.getSimTime() != 0) { + setSimTime(other.getSimTime()); + } + if (other.getActiveTime() != 0) { + setActiveTime(other.getActiveTime()); + } + if (other.getPausedTime() != 0) { + setPausedTime(other.getPausedTime()); + } + if (other.hasTimeToNormal()) { + setTimeToNormal(other.getTimeToNormal()); + } + if (other.hasTimeToBurn()) { + setTimeToBurn(other.getTimeToBurn()); + } + if (other.hasTimeToEvaporate()) { + setTimeToEvaporate(other.getTimeToEvaporate()); + } + if (other.hasTimeToHurt()) { + setTimeToHurt(other.getTimeToHurt()); + } + if (other.hasTimeToLava()) { + setTimeToLava(other.getTimeToLava()); + } + if (other.hasTimeToExplode()) { + setTimeToExplode(other.getTimeToExplode()); + } + if (componentsBuilder_ == null) { + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00400000); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + } else { + if (!other.components_.isEmpty()) { + if (componentsBuilder_.isEmpty()) { + componentsBuilder_.dispose(); + componentsBuilder_ = null; + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00400000); + componentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getComponentsFieldBuilder() : null; + } else { + componentsBuilder_.addAllMessages(other.components_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + start_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + end_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + totalEU_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + minEUpT_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + maxEUpT_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + totalHU_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + minHUpS_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + maxHUpS_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + totalTempSecs_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + minTemp_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + maxTemp_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + totalHullHeating_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + totalHullCooling_ = input.readInt64(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 112: { + simTime_ = input.readInt32(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 120: { + activeTime_ = input.readInt32(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 128: { + pausedTime_ = input.readInt32(); + bitField0_ |= 0x00008000; + break; + } // case 128 + case 136: { + timeToNormal_ = input.readInt32(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 144: { + timeToBurn_ = input.readInt32(); + bitField0_ |= 0x00020000; + break; + } // case 144 + case 152: { + timeToEvaporate_ = input.readInt32(); + bitField0_ |= 0x00040000; + break; + } // case 152 + case 160: { + timeToHurt_ = input.readInt32(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 168: { + timeToLava_ = input.readInt32(); + bitField0_ |= 0x00100000; + break; + } // case 168 + case 176: { + timeToExplode_ = input.readInt32(); + bitField0_ |= 0x00200000; + break; + } // case 176 + case 186: { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult m = + input.readMessage( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.parser(), + extensionRegistry); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(m); + } else { + componentsBuilder_.addMessage(m); + } + break; + } // case 186 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long start_ ; + /** + * int64 start = 1; + * @return The start. + */ + @java.lang.Override + public long getStart() { + return start_; + } + /** + * int64 start = 1; + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(long value) { + + start_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 start = 1; + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = 0L; + onChanged(); + return this; + } + + private long end_ ; + /** + * int64 end = 2; + * @return The end. + */ + @java.lang.Override + public long getEnd() { + return end_; + } + /** + * int64 end = 2; + * @param value The end to set. + * @return This builder for chaining. + */ + public Builder setEnd(long value) { + + end_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int64 end = 2; + * @return This builder for chaining. + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = 0L; + onChanged(); + return this; + } + + private long totalEU_ ; + /** + * int64 totalEU = 3; + * @return The totalEU. + */ + @java.lang.Override + public long getTotalEU() { + return totalEU_; + } + /** + * int64 totalEU = 3; + * @param value The totalEU to set. + * @return This builder for chaining. + */ + public Builder setTotalEU(long value) { + + totalEU_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 totalEU = 3; + * @return This builder for chaining. + */ + public Builder clearTotalEU() { + bitField0_ = (bitField0_ & ~0x00000004); + totalEU_ = 0L; + onChanged(); + return this; + } + + private int minEUpT_ ; + /** + * int32 minEUpT = 4; + * @return The minEUpT. + */ + @java.lang.Override + public int getMinEUpT() { + return minEUpT_; + } + /** + * int32 minEUpT = 4; + * @param value The minEUpT to set. + * @return This builder for chaining. + */ + public Builder setMinEUpT(int value) { + + minEUpT_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 minEUpT = 4; + * @return This builder for chaining. + */ + public Builder clearMinEUpT() { + bitField0_ = (bitField0_ & ~0x00000008); + minEUpT_ = 0; + onChanged(); + return this; + } + + private int maxEUpT_ ; + /** + * int32 maxEUpT = 5; + * @return The maxEUpT. + */ + @java.lang.Override + public int getMaxEUpT() { + return maxEUpT_; + } + /** + * int32 maxEUpT = 5; + * @param value The maxEUpT to set. + * @return This builder for chaining. + */ + public Builder setMaxEUpT(int value) { + + maxEUpT_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 maxEUpT = 5; + * @return This builder for chaining. + */ + public Builder clearMaxEUpT() { + bitField0_ = (bitField0_ & ~0x00000010); + maxEUpT_ = 0; + onChanged(); + return this; + } + + private long totalHU_ ; + /** + * int64 totalHU = 6; + * @return The totalHU. + */ + @java.lang.Override + public long getTotalHU() { + return totalHU_; + } + /** + * int64 totalHU = 6; + * @param value The totalHU to set. + * @return This builder for chaining. + */ + public Builder setTotalHU(long value) { + + totalHU_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int64 totalHU = 6; + * @return This builder for chaining. + */ + public Builder clearTotalHU() { + bitField0_ = (bitField0_ & ~0x00000020); + totalHU_ = 0L; + onChanged(); + return this; + } + + private int minHUpS_ ; + /** + * int32 minHUpS = 7; + * @return The minHUpS. + */ + @java.lang.Override + public int getMinHUpS() { + return minHUpS_; + } + /** + * int32 minHUpS = 7; + * @param value The minHUpS to set. + * @return This builder for chaining. + */ + public Builder setMinHUpS(int value) { + + minHUpS_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int32 minHUpS = 7; + * @return This builder for chaining. + */ + public Builder clearMinHUpS() { + bitField0_ = (bitField0_ & ~0x00000040); + minHUpS_ = 0; + onChanged(); + return this; + } + + private int maxHUpS_ ; + /** + * int32 maxHUpS = 8; + * @return The maxHUpS. + */ + @java.lang.Override + public int getMaxHUpS() { + return maxHUpS_; + } + /** + * int32 maxHUpS = 8; + * @param value The maxHUpS to set. + * @return This builder for chaining. + */ + public Builder setMaxHUpS(int value) { + + maxHUpS_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * int32 maxHUpS = 8; + * @return This builder for chaining. + */ + public Builder clearMaxHUpS() { + bitField0_ = (bitField0_ & ~0x00000080); + maxHUpS_ = 0; + onChanged(); + return this; + } + + private long totalTempSecs_ ; + /** + * int64 totalTempSecs = 9; + * @return The totalTempSecs. + */ + @java.lang.Override + public long getTotalTempSecs() { + return totalTempSecs_; + } + /** + * int64 totalTempSecs = 9; + * @param value The totalTempSecs to set. + * @return This builder for chaining. + */ + public Builder setTotalTempSecs(long value) { + + totalTempSecs_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int64 totalTempSecs = 9; + * @return This builder for chaining. + */ + public Builder clearTotalTempSecs() { + bitField0_ = (bitField0_ & ~0x00000100); + totalTempSecs_ = 0L; + onChanged(); + return this; + } + + private int minTemp_ ; + /** + * int32 minTemp = 10; + * @return The minTemp. + */ + @java.lang.Override + public int getMinTemp() { + return minTemp_; + } + /** + * int32 minTemp = 10; + * @param value The minTemp to set. + * @return This builder for chaining. + */ + public Builder setMinTemp(int value) { + + minTemp_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * int32 minTemp = 10; + * @return This builder for chaining. + */ + public Builder clearMinTemp() { + bitField0_ = (bitField0_ & ~0x00000200); + minTemp_ = 0; + onChanged(); + return this; + } + + private int maxTemp_ ; + /** + * int32 maxTemp = 11; + * @return The maxTemp. + */ + @java.lang.Override + public int getMaxTemp() { + return maxTemp_; + } + /** + * int32 maxTemp = 11; + * @param value The maxTemp to set. + * @return This builder for chaining. + */ + public Builder setMaxTemp(int value) { + + maxTemp_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * int32 maxTemp = 11; + * @return This builder for chaining. + */ + public Builder clearMaxTemp() { + bitField0_ = (bitField0_ & ~0x00000400); + maxTemp_ = 0; + onChanged(); + return this; + } + + private long totalHullHeating_ ; + /** + * int64 totalHullHeating = 12; + * @return The totalHullHeating. + */ + @java.lang.Override + public long getTotalHullHeating() { + return totalHullHeating_; + } + /** + * int64 totalHullHeating = 12; + * @param value The totalHullHeating to set. + * @return This builder for chaining. + */ + public Builder setTotalHullHeating(long value) { + + totalHullHeating_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * int64 totalHullHeating = 12; + * @return This builder for chaining. + */ + public Builder clearTotalHullHeating() { + bitField0_ = (bitField0_ & ~0x00000800); + totalHullHeating_ = 0L; + onChanged(); + return this; + } + + private long totalHullCooling_ ; + /** + * int64 totalHullCooling = 13; + * @return The totalHullCooling. + */ + @java.lang.Override + public long getTotalHullCooling() { + return totalHullCooling_; + } + /** + * int64 totalHullCooling = 13; + * @param value The totalHullCooling to set. + * @return This builder for chaining. + */ + public Builder setTotalHullCooling(long value) { + + totalHullCooling_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * int64 totalHullCooling = 13; + * @return This builder for chaining. + */ + public Builder clearTotalHullCooling() { + bitField0_ = (bitField0_ & ~0x00001000); + totalHullCooling_ = 0L; + onChanged(); + return this; + } + + private int simTime_ ; + /** + * int32 simTime = 14; + * @return The simTime. + */ + @java.lang.Override + public int getSimTime() { + return simTime_; + } + /** + * int32 simTime = 14; + * @param value The simTime to set. + * @return This builder for chaining. + */ + public Builder setSimTime(int value) { + + simTime_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * int32 simTime = 14; + * @return This builder for chaining. + */ + public Builder clearSimTime() { + bitField0_ = (bitField0_ & ~0x00002000); + simTime_ = 0; + onChanged(); + return this; + } + + private int activeTime_ ; + /** + * int32 activeTime = 15; + * @return The activeTime. + */ + @java.lang.Override + public int getActiveTime() { + return activeTime_; + } + /** + * int32 activeTime = 15; + * @param value The activeTime to set. + * @return This builder for chaining. + */ + public Builder setActiveTime(int value) { + + activeTime_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * int32 activeTime = 15; + * @return This builder for chaining. + */ + public Builder clearActiveTime() { + bitField0_ = (bitField0_ & ~0x00004000); + activeTime_ = 0; + onChanged(); + return this; + } + + private int pausedTime_ ; + /** + * int32 pausedTime = 16; + * @return The pausedTime. + */ + @java.lang.Override + public int getPausedTime() { + return pausedTime_; + } + /** + * int32 pausedTime = 16; + * @param value The pausedTime to set. + * @return This builder for chaining. + */ + public Builder setPausedTime(int value) { + + pausedTime_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * int32 pausedTime = 16; + * @return This builder for chaining. + */ + public Builder clearPausedTime() { + bitField0_ = (bitField0_ & ~0x00008000); + pausedTime_ = 0; + onChanged(); + return this; + } + + private int timeToNormal_ ; + /** + * optional int32 timeToNormal = 17; + * @return Whether the timeToNormal field is set. + */ + @java.lang.Override + public boolean hasTimeToNormal() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * optional int32 timeToNormal = 17; + * @return The timeToNormal. + */ + @java.lang.Override + public int getTimeToNormal() { + return timeToNormal_; + } + /** + * optional int32 timeToNormal = 17; + * @param value The timeToNormal to set. + * @return This builder for chaining. + */ + public Builder setTimeToNormal(int value) { + + timeToNormal_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * optional int32 timeToNormal = 17; + * @return This builder for chaining. + */ + public Builder clearTimeToNormal() { + bitField0_ = (bitField0_ & ~0x00010000); + timeToNormal_ = 0; + onChanged(); + return this; + } + + private int timeToBurn_ ; + /** + * optional int32 timeToBurn = 18; + * @return Whether the timeToBurn field is set. + */ + @java.lang.Override + public boolean hasTimeToBurn() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * optional int32 timeToBurn = 18; + * @return The timeToBurn. + */ + @java.lang.Override + public int getTimeToBurn() { + return timeToBurn_; + } + /** + * optional int32 timeToBurn = 18; + * @param value The timeToBurn to set. + * @return This builder for chaining. + */ + public Builder setTimeToBurn(int value) { + + timeToBurn_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * optional int32 timeToBurn = 18; + * @return This builder for chaining. + */ + public Builder clearTimeToBurn() { + bitField0_ = (bitField0_ & ~0x00020000); + timeToBurn_ = 0; + onChanged(); + return this; + } + + private int timeToEvaporate_ ; + /** + * optional int32 timeToEvaporate = 19; + * @return Whether the timeToEvaporate field is set. + */ + @java.lang.Override + public boolean hasTimeToEvaporate() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * optional int32 timeToEvaporate = 19; + * @return The timeToEvaporate. + */ + @java.lang.Override + public int getTimeToEvaporate() { + return timeToEvaporate_; + } + /** + * optional int32 timeToEvaporate = 19; + * @param value The timeToEvaporate to set. + * @return This builder for chaining. + */ + public Builder setTimeToEvaporate(int value) { + + timeToEvaporate_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * optional int32 timeToEvaporate = 19; + * @return This builder for chaining. + */ + public Builder clearTimeToEvaporate() { + bitField0_ = (bitField0_ & ~0x00040000); + timeToEvaporate_ = 0; + onChanged(); + return this; + } + + private int timeToHurt_ ; + /** + * optional int32 timeToHurt = 20; + * @return Whether the timeToHurt field is set. + */ + @java.lang.Override + public boolean hasTimeToHurt() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * optional int32 timeToHurt = 20; + * @return The timeToHurt. + */ + @java.lang.Override + public int getTimeToHurt() { + return timeToHurt_; + } + /** + * optional int32 timeToHurt = 20; + * @param value The timeToHurt to set. + * @return This builder for chaining. + */ + public Builder setTimeToHurt(int value) { + + timeToHurt_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * optional int32 timeToHurt = 20; + * @return This builder for chaining. + */ + public Builder clearTimeToHurt() { + bitField0_ = (bitField0_ & ~0x00080000); + timeToHurt_ = 0; + onChanged(); + return this; + } + + private int timeToLava_ ; + /** + * optional int32 timeToLava = 21; + * @return Whether the timeToLava field is set. + */ + @java.lang.Override + public boolean hasTimeToLava() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * optional int32 timeToLava = 21; + * @return The timeToLava. + */ + @java.lang.Override + public int getTimeToLava() { + return timeToLava_; + } + /** + * optional int32 timeToLava = 21; + * @param value The timeToLava to set. + * @return This builder for chaining. + */ + public Builder setTimeToLava(int value) { + + timeToLava_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * optional int32 timeToLava = 21; + * @return This builder for chaining. + */ + public Builder clearTimeToLava() { + bitField0_ = (bitField0_ & ~0x00100000); + timeToLava_ = 0; + onChanged(); + return this; + } + + private int timeToExplode_ ; + /** + * optional int32 timeToExplode = 22; + * @return Whether the timeToExplode field is set. + */ + @java.lang.Override + public boolean hasTimeToExplode() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * optional int32 timeToExplode = 22; + * @return The timeToExplode. + */ + @java.lang.Override + public int getTimeToExplode() { + return timeToExplode_; + } + /** + * optional int32 timeToExplode = 22; + * @param value The timeToExplode to set. + * @return This builder for chaining. + */ + public Builder setTimeToExplode(int value) { + + timeToExplode_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * optional int32 timeToExplode = 22; + * @return This builder for chaining. + */ + public Builder clearTimeToExplode() { + bitField0_ = (bitField0_ & ~0x00200000); + timeToExplode_ = 0; + onChanged(); + return this; + } + + private java.util.List components_ = + java.util.Collections.emptyList(); + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00400000) != 0)) { + components_ = new java.util.ArrayList(components_); + bitField0_ |= 0x00400000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder> componentsBuilder_; + + /** + * repeated .ComponentResult components = 23; + */ + public java.util.List getComponentsList() { + if (componentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(components_); + } else { + return componentsBuilder_.getMessageList(); + } + } + /** + * repeated .ComponentResult components = 23; + */ + public int getComponentsCount() { + if (componentsBuilder_ == null) { + return components_.size(); + } else { + return componentsBuilder_.getCount(); + } + } + /** + * repeated .ComponentResult components = 23; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult getComponents(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessage(index); + } + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder setComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + } else { + componentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder setComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.set(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder addComponents(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + } else { + componentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder addComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(index, value); + onChanged(); + } else { + componentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder addComponents( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder addComponents( + int index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder addAllComponents( + java.lang.Iterable values) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, components_); + onChanged(); + } else { + componentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder clearComponents() { + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + } else { + componentsBuilder_.clear(); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public Builder removeComponents(int index) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.remove(index); + onChanged(); + } else { + componentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .ComponentResult components = 23; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder getComponentsBuilder( + int index) { + return getComponentsFieldBuilder().getBuilder(index); + } + /** + * repeated .ComponentResult components = 23; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder getComponentsOrBuilder( + int index) { + if (componentsBuilder_ == null) { + return components_.get(index); } else { + return componentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ComponentResult components = 23; + */ + public java.util.List + getComponentsOrBuilderList() { + if (componentsBuilder_ != null) { + return componentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(components_); + } + } + /** + * repeated .ComponentResult components = 23; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder addComponentsBuilder() { + return getComponentsFieldBuilder().addBuilder( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.getDefaultInstance()); + } + /** + * repeated .ComponentResult components = 23; + */ + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder addComponentsBuilder( + int index) { + return getComponentsFieldBuilder().addBuilder( + index, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.getDefaultInstance()); + } + /** + * repeated .ComponentResult components = 23; + */ + public java.util.List + getComponentsBuilderList() { + return getComponentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder> + getComponentsFieldBuilder() { + if (componentsBuilder_ == null) { + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder>( + components_, + ((bitField0_ & 0x00400000) != 0), + getParentForChildren(), + isClean()); + components_ = null; + } + return componentsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SimulationResult) + } + + // @@protoc_insertion_point(class_scope:SimulationResult) + private static final com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult(); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.SimulationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ComponentResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:ComponentResult) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 index = 1; + * @return The index. + */ + int getIndex(); + + /** + * int64 totalAirHeating = 2; + * @return The totalAirHeating. + */ + long getTotalAirHeating(); + + /** + * int64 totalHullHeating = 3; + * @return The totalHullHeating. + */ + long getTotalHullHeating(); + + /** + * int64 totalHullCooling = 4; + * @return The totalHullCooling. + */ + long getTotalHullCooling(); + + /** + * int64 totalTempSecs = 5; + * @return The totalTempSecs. + */ + long getTotalTempSecs(); + + /** + * int32 minTemp = 6; + * @return The minTemp. + */ + int getMinTemp(); + + /** + * int32 maxTemp = 7; + * @return The maxTemp. + */ + int getMaxTemp(); + + /** + * int32 replaceCount = 8; + * @return The replaceCount. + */ + int getReplaceCount(); + + /** + * int64 totalEUOutput = 9; + * @return The totalEUOutput. + */ + long getTotalEUOutput(); + } + /** + * Protobuf type {@code ComponentResult} + */ + public static final class ComponentResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:ComponentResult) + ComponentResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComponentResult.newBuilder() to construct. + private ComponentResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ComponentResult() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ComponentResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + private int index_ = 0; + /** + * int32 index = 1; + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + + public static final int TOTALAIRHEATING_FIELD_NUMBER = 2; + private long totalAirHeating_ = 0L; + /** + * int64 totalAirHeating = 2; + * @return The totalAirHeating. + */ + @java.lang.Override + public long getTotalAirHeating() { + return totalAirHeating_; + } + + public static final int TOTALHULLHEATING_FIELD_NUMBER = 3; + private long totalHullHeating_ = 0L; + /** + * int64 totalHullHeating = 3; + * @return The totalHullHeating. + */ + @java.lang.Override + public long getTotalHullHeating() { + return totalHullHeating_; + } + + public static final int TOTALHULLCOOLING_FIELD_NUMBER = 4; + private long totalHullCooling_ = 0L; + /** + * int64 totalHullCooling = 4; + * @return The totalHullCooling. + */ + @java.lang.Override + public long getTotalHullCooling() { + return totalHullCooling_; + } + + public static final int TOTALTEMPSECS_FIELD_NUMBER = 5; + private long totalTempSecs_ = 0L; + /** + * int64 totalTempSecs = 5; + * @return The totalTempSecs. + */ + @java.lang.Override + public long getTotalTempSecs() { + return totalTempSecs_; + } + + public static final int MINTEMP_FIELD_NUMBER = 6; + private int minTemp_ = 0; + /** + * int32 minTemp = 6; + * @return The minTemp. + */ + @java.lang.Override + public int getMinTemp() { + return minTemp_; + } + + public static final int MAXTEMP_FIELD_NUMBER = 7; + private int maxTemp_ = 0; + /** + * int32 maxTemp = 7; + * @return The maxTemp. + */ + @java.lang.Override + public int getMaxTemp() { + return maxTemp_; + } + + public static final int REPLACECOUNT_FIELD_NUMBER = 8; + private int replaceCount_ = 0; + /** + * int32 replaceCount = 8; + * @return The replaceCount. + */ + @java.lang.Override + public int getReplaceCount() { + return replaceCount_; + } + + public static final int TOTALEUOUTPUT_FIELD_NUMBER = 9; + private long totalEUOutput_ = 0L; + /** + * int64 totalEUOutput = 9; + * @return The totalEUOutput. + */ + @java.lang.Override + public long getTotalEUOutput() { + return totalEUOutput_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (index_ != 0) { + output.writeInt32(1, index_); + } + if (totalAirHeating_ != 0L) { + output.writeInt64(2, totalAirHeating_); + } + if (totalHullHeating_ != 0L) { + output.writeInt64(3, totalHullHeating_); + } + if (totalHullCooling_ != 0L) { + output.writeInt64(4, totalHullCooling_); + } + if (totalTempSecs_ != 0L) { + output.writeInt64(5, totalTempSecs_); + } + if (minTemp_ != 0) { + output.writeInt32(6, minTemp_); + } + if (maxTemp_ != 0) { + output.writeInt32(7, maxTemp_); + } + if (replaceCount_ != 0) { + output.writeInt32(8, replaceCount_); + } + if (totalEUOutput_ != 0L) { + output.writeInt64(9, totalEUOutput_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, index_); + } + if (totalAirHeating_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, totalAirHeating_); + } + if (totalHullHeating_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, totalHullHeating_); + } + if (totalHullCooling_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, totalHullCooling_); + } + if (totalTempSecs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, totalTempSecs_); + } + if (minTemp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, minTemp_); + } + if (maxTemp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, maxTemp_); + } + if (replaceCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, replaceCount_); + } + if (totalEUOutput_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, totalEUOutput_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult)) { + return super.equals(obj); + } + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult other = (com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult) obj; + + if (getIndex() + != other.getIndex()) return false; + if (getTotalAirHeating() + != other.getTotalAirHeating()) return false; + if (getTotalHullHeating() + != other.getTotalHullHeating()) return false; + if (getTotalHullCooling() + != other.getTotalHullCooling()) return false; + if (getTotalTempSecs() + != other.getTotalTempSecs()) return false; + if (getMinTemp() + != other.getMinTemp()) return false; + if (getMaxTemp() + != other.getMaxTemp()) return false; + if (getReplaceCount() + != other.getReplaceCount()) return false; + if (getTotalEUOutput() + != other.getTotalEUOutput()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + hash = (37 * hash) + TOTALAIRHEATING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalAirHeating()); + hash = (37 * hash) + TOTALHULLHEATING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalHullHeating()); + hash = (37 * hash) + TOTALHULLCOOLING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalHullCooling()); + hash = (37 * hash) + TOTALTEMPSECS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalTempSecs()); + hash = (37 * hash) + MINTEMP_FIELD_NUMBER; + hash = (53 * hash) + getMinTemp(); + hash = (37 * hash) + MAXTEMP_FIELD_NUMBER; + hash = (53 * hash) + getMaxTemp(); + hash = (37 * hash) + REPLACECOUNT_FIELD_NUMBER; + hash = (53 * hash) + getReplaceCount(); + hash = (37 * hash) + TOTALEUOUTPUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalEUOutput()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ComponentResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:ComponentResult) + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.class, com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.Builder.class); + } + + // Construct using com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + index_ = 0; + totalAirHeating_ = 0L; + totalHullHeating_ = 0L; + totalHullCooling_ = 0L; + totalTempSecs_ = 0L; + minTemp_ = 0; + maxTemp_ = 0; + replaceCount_ = 0; + totalEUOutput_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.internal_static_ComponentResult_descriptor; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult getDefaultInstanceForType() { + return com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.getDefaultInstance(); + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult build() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult buildPartial() { + com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult result = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalAirHeating_ = totalAirHeating_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalHullHeating_ = totalHullHeating_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalHullCooling_ = totalHullCooling_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.totalTempSecs_ = totalTempSecs_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.minTemp_ = minTemp_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maxTemp_ = maxTemp_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.replaceCount_ = replaceCount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.totalEUOutput_ = totalEUOutput_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult) { + return mergeFrom((com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult other) { + if (other == com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult.getDefaultInstance()) return this; + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.getTotalAirHeating() != 0L) { + setTotalAirHeating(other.getTotalAirHeating()); + } + if (other.getTotalHullHeating() != 0L) { + setTotalHullHeating(other.getTotalHullHeating()); + } + if (other.getTotalHullCooling() != 0L) { + setTotalHullCooling(other.getTotalHullCooling()); + } + if (other.getTotalTempSecs() != 0L) { + setTotalTempSecs(other.getTotalTempSecs()); + } + if (other.getMinTemp() != 0) { + setMinTemp(other.getMinTemp()); + } + if (other.getMaxTemp() != 0) { + setMaxTemp(other.getMaxTemp()); + } + if (other.getReplaceCount() != 0) { + setReplaceCount(other.getReplaceCount()); + } + if (other.getTotalEUOutput() != 0L) { + setTotalEUOutput(other.getTotalEUOutput()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + totalAirHeating_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + totalHullHeating_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + totalHullCooling_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + totalTempSecs_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + minTemp_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + maxTemp_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + replaceCount_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + totalEUOutput_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int index_ ; + /** + * int32 index = 1; + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * int32 index = 1; + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 index = 1; + * @return This builder for chaining. + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + index_ = 0; + onChanged(); + return this; + } + + private long totalAirHeating_ ; + /** + * int64 totalAirHeating = 2; + * @return The totalAirHeating. + */ + @java.lang.Override + public long getTotalAirHeating() { + return totalAirHeating_; + } + /** + * int64 totalAirHeating = 2; + * @param value The totalAirHeating to set. + * @return This builder for chaining. + */ + public Builder setTotalAirHeating(long value) { + + totalAirHeating_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int64 totalAirHeating = 2; + * @return This builder for chaining. + */ + public Builder clearTotalAirHeating() { + bitField0_ = (bitField0_ & ~0x00000002); + totalAirHeating_ = 0L; + onChanged(); + return this; + } + + private long totalHullHeating_ ; + /** + * int64 totalHullHeating = 3; + * @return The totalHullHeating. + */ + @java.lang.Override + public long getTotalHullHeating() { + return totalHullHeating_; + } + /** + * int64 totalHullHeating = 3; + * @param value The totalHullHeating to set. + * @return This builder for chaining. + */ + public Builder setTotalHullHeating(long value) { + + totalHullHeating_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 totalHullHeating = 3; + * @return This builder for chaining. + */ + public Builder clearTotalHullHeating() { + bitField0_ = (bitField0_ & ~0x00000004); + totalHullHeating_ = 0L; + onChanged(); + return this; + } + + private long totalHullCooling_ ; + /** + * int64 totalHullCooling = 4; + * @return The totalHullCooling. + */ + @java.lang.Override + public long getTotalHullCooling() { + return totalHullCooling_; + } + /** + * int64 totalHullCooling = 4; + * @param value The totalHullCooling to set. + * @return This builder for chaining. + */ + public Builder setTotalHullCooling(long value) { + + totalHullCooling_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int64 totalHullCooling = 4; + * @return This builder for chaining. + */ + public Builder clearTotalHullCooling() { + bitField0_ = (bitField0_ & ~0x00000008); + totalHullCooling_ = 0L; + onChanged(); + return this; + } + + private long totalTempSecs_ ; + /** + * int64 totalTempSecs = 5; + * @return The totalTempSecs. + */ + @java.lang.Override + public long getTotalTempSecs() { + return totalTempSecs_; + } + /** + * int64 totalTempSecs = 5; + * @param value The totalTempSecs to set. + * @return This builder for chaining. + */ + public Builder setTotalTempSecs(long value) { + + totalTempSecs_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int64 totalTempSecs = 5; + * @return This builder for chaining. + */ + public Builder clearTotalTempSecs() { + bitField0_ = (bitField0_ & ~0x00000010); + totalTempSecs_ = 0L; + onChanged(); + return this; + } + + private int minTemp_ ; + /** + * int32 minTemp = 6; + * @return The minTemp. + */ + @java.lang.Override + public int getMinTemp() { + return minTemp_; + } + /** + * int32 minTemp = 6; + * @param value The minTemp to set. + * @return This builder for chaining. + */ + public Builder setMinTemp(int value) { + + minTemp_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int32 minTemp = 6; + * @return This builder for chaining. + */ + public Builder clearMinTemp() { + bitField0_ = (bitField0_ & ~0x00000020); + minTemp_ = 0; + onChanged(); + return this; + } + + private int maxTemp_ ; + /** + * int32 maxTemp = 7; + * @return The maxTemp. + */ + @java.lang.Override + public int getMaxTemp() { + return maxTemp_; + } + /** + * int32 maxTemp = 7; + * @param value The maxTemp to set. + * @return This builder for chaining. + */ + public Builder setMaxTemp(int value) { + + maxTemp_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int32 maxTemp = 7; + * @return This builder for chaining. + */ + public Builder clearMaxTemp() { + bitField0_ = (bitField0_ & ~0x00000040); + maxTemp_ = 0; + onChanged(); + return this; + } + + private int replaceCount_ ; + /** + * int32 replaceCount = 8; + * @return The replaceCount. + */ + @java.lang.Override + public int getReplaceCount() { + return replaceCount_; + } + /** + * int32 replaceCount = 8; + * @param value The replaceCount to set. + * @return This builder for chaining. + */ + public Builder setReplaceCount(int value) { + + replaceCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * int32 replaceCount = 8; + * @return This builder for chaining. + */ + public Builder clearReplaceCount() { + bitField0_ = (bitField0_ & ~0x00000080); + replaceCount_ = 0; + onChanged(); + return this; + } + + private long totalEUOutput_ ; + /** + * int64 totalEUOutput = 9; + * @return The totalEUOutput. + */ + @java.lang.Override + public long getTotalEUOutput() { + return totalEUOutput_; + } + /** + * int64 totalEUOutput = 9; + * @param value The totalEUOutput to set. + * @return This builder for chaining. + */ + public Builder setTotalEUOutput(long value) { + + totalEUOutput_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int64 totalEUOutput = 9; + * @return This builder for chaining. + */ + public Builder clearTotalEUOutput() { + bitField0_ = (bitField0_ & ~0x00000100); + totalEUOutput_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:ComponentResult) + } + + // @@protoc_insertion_point(class_scope:ComponentResult) + private static final com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult(); + } + + public static com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComponentResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.recursive_pineapple.nuclear_horizons.reactors.tile.simulator.SimulatorProtos.ComponentResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SimulationConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SimulationConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ComponentConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_ComponentConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SimulationResult_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SimulationResult_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ComponentResult_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_ComponentResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\njsrc/main/java/com/recursive_pineapple/" + + "nuclear_horizons/reactors/tile/simulator" + + "/SimulationConfigProto.proto\"\347\001\n\020Simulat" + + "ionConfig\022\016\n\006pulsed\030\001 \001(\010\022\021\n\tautomated\030\002" + + " \001(\010\022\r\n\005fluid\030\003 \001(\010\022\023\n\013initialHeat\030\004 \001(\005" + + "\022\017\n\007onPulse\030\005 \001(\005\022\020\n\010offPulse\030\006 \001(\005\022\023\n\013s" + + "uspendTemp\030\007 \001(\005\022\022\n\nresumeTemp\030\010 \001(\005\022\032\n\022" + + "maxSimulationTicks\030\t \001(\005\022$\n\ncomponents\030\n" + + " \003(\0132\020.ComponentConfig\"\216\001\n\017ComponentConf" + + "ig\022\r\n\005index\030\001 \001(\005\022\014\n\004item\030\002 \001(\005\022\025\n\rhasAu" + + "tomation\030\003 \001(\010\022\023\n\013initialHeat\030\004 \001(\005\022\034\n\024r" + + "eplacementThreshold\030\005 \001(\005\022\024\n\014reactorPaus" + + "e\030\006 \001(\005\"\344\004\n\020SimulationResult\022\r\n\005start\030\001 " + + "\001(\003\022\013\n\003end\030\002 \001(\003\022\017\n\007totalEU\030\003 \001(\003\022\017\n\007min" + + "EUpT\030\004 \001(\005\022\017\n\007maxEUpT\030\005 \001(\005\022\017\n\007totalHU\030\006" + + " \001(\003\022\017\n\007minHUpS\030\007 \001(\005\022\017\n\007maxHUpS\030\010 \001(\005\022\025" + + "\n\rtotalTempSecs\030\t \001(\003\022\017\n\007minTemp\030\n \001(\005\022\017" + + "\n\007maxTemp\030\013 \001(\005\022\030\n\020totalHullHeating\030\014 \001(" + + "\003\022\030\n\020totalHullCooling\030\r \001(\003\022\017\n\007simTime\030\016" + + " \001(\005\022\022\n\nactiveTime\030\017 \001(\005\022\022\n\npausedTime\030\020" + + " \001(\005\022\031\n\014timeToNormal\030\021 \001(\005H\000\210\001\001\022\027\n\ntimeT" + + "oBurn\030\022 \001(\005H\001\210\001\001\022\034\n\017timeToEvaporate\030\023 \001(" + + "\005H\002\210\001\001\022\027\n\ntimeToHurt\030\024 \001(\005H\003\210\001\001\022\027\n\ntimeT" + + "oLava\030\025 \001(\005H\004\210\001\001\022\032\n\rtimeToExplode\030\026 \001(\005H" + + "\005\210\001\001\022$\n\ncomponents\030\027 \003(\0132\020.ComponentResu" + + "ltB\017\n\r_timeToNormalB\r\n\013_timeToBurnB\022\n\020_t" + + "imeToEvaporateB\r\n\013_timeToHurtB\r\n\013_timeTo" + + "LavaB\020\n\016_timeToExplode\"\323\001\n\017ComponentResu" + + "lt\022\r\n\005index\030\001 \001(\005\022\027\n\017totalAirHeating\030\002 \001" + + "(\003\022\030\n\020totalHullHeating\030\003 \001(\003\022\030\n\020totalHul" + + "lCooling\030\004 \001(\003\022\025\n\rtotalTempSecs\030\005 \001(\003\022\017\n" + + "\007minTemp\030\006 \001(\005\022\017\n\007maxTemp\030\007 \001(\005\022\024\n\014repla" + + "ceCount\030\010 \001(\005\022\025\n\rtotalEUOutput\030\t \001(\003BS\n@" + + "com.recursive_pineapple.nuclear_horizons" + + ".reactors.tile.simulatorB\017SimulatorProto" + + "sb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SimulationConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SimulationConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SimulationConfig_descriptor, + new java.lang.String[] { "Pulsed", "Automated", "Fluid", "InitialHeat", "OnPulse", "OffPulse", "SuspendTemp", "ResumeTemp", "MaxSimulationTicks", "Components", }); + internal_static_ComponentConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_ComponentConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_ComponentConfig_descriptor, + new java.lang.String[] { "Index", "Item", "HasAutomation", "InitialHeat", "ReplacementThreshold", "ReactorPause", }); + internal_static_SimulationResult_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_SimulationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SimulationResult_descriptor, + new java.lang.String[] { "Start", "End", "TotalEU", "MinEUpT", "MaxEUpT", "TotalHU", "MinHUpS", "MaxHUpS", "TotalTempSecs", "MinTemp", "MaxTemp", "TotalHullHeating", "TotalHullCooling", "SimTime", "ActiveTime", "PausedTime", "TimeToNormal", "TimeToBurn", "TimeToEvaporate", "TimeToHurt", "TimeToLava", "TimeToExplode", "Components", }); + internal_static_ComponentResult_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_ComponentResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_ComponentResult_descriptor, + new java.lang.String[] { "Index", "TotalAirHeating", "TotalHullHeating", "TotalHullCooling", "TotalTempSecs", "MinTemp", "MaxTemp", "ReplaceCount", "TotalEUOutput", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/resources/assets/nuclear_horizons/lang/en_US.lang b/src/main/resources/assets/nuclear_horizons/lang/en_US.lang index e1554da..9a96c31 100644 --- a/src/main/resources/assets/nuclear_horizons/lang/en_US.lang +++ b/src/main/resources/assets/nuclear_horizons/lang/en_US.lang @@ -34,3 +34,93 @@ item.iridiumNeutronReflector.name=Iridium Neutron Reflector fluid.nh_coolant=Coolant fluid.nh_hot_coolant=Hot Coolant + +death.attack.hot_fluid.player=%1$s was fried to crisp + +nh_tooltip.durability=Durability: %1$,d / %2$,d +nh_tooltip.undestructable=Undestructable +nh_tooltip.stored_heat=Stored Heat: %1$,d / %2$,d +nh_tooltip.prelude=Every two seconds, this component will: +nh_tooltip.more_info=Hold Shift for more info. + +nh_tooltip.fuel_rod.gen_stats=Generate %1$,d * n * (n + 1) HU\nGenerate %2$,d * n * (n + 1) EU\nWhere n = %3$d + Number of adjacent rods and reflectors +nh_tooltip.fuel_rod.mox_stats=\nIf the reactor's hull heat is above 50%, the HU output will be multiplied by 2.\nThe EU output will always be multiplied by 1 + %1$f * (Current Heat / Max Heat). +nh_tooltip.fuel_rod.heat_epilogue=\nIf there are adjacent components which can contain heat, heat will be spread among them evenly.\nOtherwise, heat will be added to the reactor hull. + +nh_tooltip.mover.reactor_xfer=Transfer up to %d HU between the reactor and itself. +nh_tooltip.exchanger.comp_xfer=Transfer up to %d HU between its neighbours and itself. +nh_tooltip.vent.void_self=Dissipate up to %d HU from itself. +nh_tooltip.vent.void_adj=Dissipate up to %d HU from its neighbours. +nh_tooltip.vent.fluid_disclaimer=Note: In a fluid reactor, each HU vented is converted to 2 HU (2mB) of hot coolant. + +nh_tooltip.results.title=\nSimulation Results: +nh_tooltip.sim.results.avg_temp=Avg Temp: %s +nh_tooltip.sim.results.min_temp=Min Temp: %s +nh_tooltip.sim.results.max_temp=Max Temp: %s +nh_tooltip.sim.results.avg_hull_cooling=Avg Hull Cooling: %s +nh_tooltip.sim.results.avg_hull_cooling_with_max=Avg Hull Cooling: %s / %s +nh_tooltip.sim.results.avg_hull_heating=Avg Hull Heating: %s +nh_tooltip.sim.results.heating_per_item=HU Per Item (Hull Only): %s +nh_tooltip.sim.results.avg_heat_output=Avg Heat Output: %s +nh_tooltip.sim.results.avg_heat_output_with_max=Avg Heat Output: %s / %s +nh_tooltip.sim.results.replace_count=Replaced %d times +nh_tooltip.sim.results.avg_power=Avg Power: %s +nh_tooltip.sim.results.power_per_item=Power Per Item: %s + +nh_gui.reactor.title=Nuclear Reactor +nh_gui.reactor.player_inv=Inventory +nh_gui.reactor.stored_hu=HU: %,d +nh_gui.reactor.eu_output=EU/t: %,d +nh_gui.reactor.hu_output=HU/s: %,d + +nh_gui.sim.results.title=Simulation Results +nh_gui.sim.results.no_results=No simulation results available +nh_gui.sim.results.runtime=Simulation ran for %s +nh_gui.sim.results.time_to_normal=Reached a normal temp. at %s +nh_gui.sim.results.time_to_burn=Reached burn threshold at %s +nh_gui.sim.results.time_to_evaporate=Reached evaporate threshold at %s +nh_gui.sim.results.time_to_hurt=Reached hurt threshold at %s +nh_gui.sim.results.time_to_lava=Reached lava threshold at %s +nh_gui.sim.results.time_to_explosion=Exploded at %s + +nh_gui.sim.title=Nuclear Reactor Simulator + +nh_gui.sim.actions.start=Start +nh_gui.sim.actions.cancel=Cancel +nh_gui.sim.actions.edit_comp_automation=right click to edit automation + +nh_gui.sim.results.none=N/A +nh_gui.sim.results.seconds=%,ds +nh_gui.sim.results.eu_per_tick=%,d EU/t +nh_gui.sim.results.hu_per_sec=%,d HU/s +nh_gui.sim.results.hu_total=%,d HU +nh_gui.sim.results.eu_total=%,d EU + +nh_gui.sim.results.active_time=Active time: %s +nh_gui.sim.results.inactive_time=Inactive time: %s +nh_gui.sim.results.avg_power=Avg Power: %s +nh_gui.sim.results.min_power=Min Power: %s +nh_gui.sim.results.max_power=Max Power: %s +nh_gui.sim.results.avg_vent_cooling=Avg Vent Cooling: %s +nh_gui.sim.results.min_vent_cooling=Min Vent Cooling: %s +nh_gui.sim.results.max_vent_cooling=Max Vent Cooling: %s +nh_gui.sim.results.avg_hull_temp=Avg Hull Temp: %s +nh_gui.sim.results.min_hull_temp=Min Hull Temp: %s +nh_gui.sim.results.max_hull_temp=Max Hull Temp: %s + +nh_gui.sim.settings.title=Reactor Settings +nh_gui.sim.settings.true=True +nh_gui.sim.settings.false=False +nh_gui.sim.settings.planner_code=Planner Code: +nh_gui.sim.settings.max_simulation_ticks=Max Simulation Ticks: +nh_gui.sim.settings.fluid=Fluid: +nh_gui.sim.settings.pulsed=Pulsed: +nh_gui.sim.settings.on_pulse=On Pulse: +nh_gui.sim.settings.off_pulse=Off Pulse: +nh_gui.sim.settings.suspend_temp=Suspend Temp: +nh_gui.sim.settings.resume_temp=Resume Temp: +nh_gui.sim.settings.initial_reactor_heat=Initial Reactor Heat: + +nh_gui.sim.comp_settings.title=Component Automation Settings +nh_gui.sim.comp_settings.active=Active Component: %s +nh_gui.sim.comp_settings.xy=X=%1$d Y=%2$d (Name=%3$s) diff --git a/src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber.png b/src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber.png deleted file mode 100644 index dfcd0cdc4b4c3ce824c333b1f0c8515379f12fe5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2678 zcmV-+3W@cJP)EX>4Tx04R}tkv&MmKpe$iTWdus1??c>kfA!+MMWHI6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0DrT}RI?`msG4PD zQb{3~Ull^H2qJ<(^dcZJQ=b#XG(5-GJ$!t6^ClDu?Zdk+{#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 z4p1P$Rw}mp7B{yuy?1)6=yf@hx5l>YBC)bN6}g~?jj#aS(G2=Ukktrd#CuQgol*+J zFktFo0@NS~-i&qzyrX;oFVNx+;BvW8Yek%)!!V)V@LnHV;OLaI#|&Hm=7yUU-vwr) z7iD>~F$@E$%K9p?)l4nGK}lU9c3gzEb^H^sVEAEgbBvMehf1&DYin3@Oow4-Kt0fD z-Vv6Hje)WiLhbk$0G$xv{s+hQVExJ?6T&W2pFj%xgRMQFZjZs$?)E)F6_^vyso%Ff z;doCiznRfQ|6=Ky{9A)?WnrIcCB3QH@X%6`Hxq~E%XBYx>xh_-v4<6 zG7PlM!=b?@P@vuFV|xJdLy)yAv{(_prz9VQ)+_TVVz_-5EY}Sm9K8v)zmGeDbl9%- zF?@LMN#94XgvAOt%AH{WT(VG6|2 z^YvfLlIxPZ(LVfDN32yP(P6>M)q zZ-&-Z8ODgJW4R=1sf@Go`t>eInIXL~>^)cpMp(b^v?NG)Fpd%8O()z&`UTQ`qZg22 zXW*Nc-;z=yM2~lYb=zn~sHLHYX+~9vgJ(WXbnCAmx}ufN&j*RR^{a?X*G<8TXk z37CRqM-{+8EK`f2gWzuW%HO&wHEY}1k zjKjpY-@Zmgknz)fO9A!{rXiCIyj1!Xm_Z-C!ub2&UZZ~34>W2qS}T;6(HICi;l0Nj zg4)D~yL&>||7L;@m^7AkW1Kv_JO2K^uR)C8{Pr{Cqkr{d@&n?GwAP1;SDXgMqq3X@ zA3U_kHC-_?d<>3p@~rPWPC=cpTr4{#2lsBF}pQ$b5LIm5b zGX|mLir~p5lg*<3!F0GecGRKOyAgH8i36iU0rr07*qoM6N<$g7Mr1bpQYW diff --git a/src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber_side.png b/src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_chamber_side.png new file mode 100644 index 0000000000000000000000000000000000000000..a9fa530c2ad189064325895e93aa7162586d3824 GIT binary patch literal 1483 zcmV;+1vL7JP)EX>4Tx04R}tkv&MmK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%-EO;_^1FRs>YBa`h*c$BS&fKLo6FBEhbk$WDI&%PYz-Duej~}=A?uXm+nJ^mBGZ`|7 zdv*0Zx96pMas`^6rWpi)>u<0Ab(U+bv&4fbk+z-B0RBE4{&SjLs(xkUoXQ0x(RH0C zqL_I2{8#SN+R_^YEd6h0&}pjvMbD*Os=XqT!r0LIY!#ckt~=5w1hYvfS-Y}#UntRY f_Oqk^l5xjBZISm0&p|Y500000NkvXXu0mjfGp*SZ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_core_side_active.png b/src/main/resources/assets/nuclear_horizons/textures/blocks/reactor_core_side_active.png new file mode 100644 index 0000000000000000000000000000000000000000..1a4f72da920606bf54f07025383da76e212f3747 GIT binary patch literal 2864 zcmV-03(xe4P)EX>4Tx04R}tkv&MmKpe$iTeTt;K`V$jWT>6&q9Ts93Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#J2)x2NQwVT3N2zhIPS;0dyl(!fWJ{;s@W9>RLwHd z$%K&2tqQ?c^k5Lfh#@L5Q=b#X6g)J&;^Mfxh}i>#<}RQpJ#@ROnRO;Oe_>TSngm}GF0Me;)tSZl<&{F ztZ?4qtX68Qbx;1nP+nVE<~q$WB(aDkh!7y7hB7L!sIM|KQcR?2KjGmYb^Ic^WO9|k z$gzMbR7j2={11M2YZj&^-K0mr&Zfo)$aJd7FJn51lIZ}Y8zfb_)&*+0Osl^i-F0%&9d)Z200006VoOIv0FD5L0A(-rM`-{6010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=mrx34HwLiuOk2e02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00{_5L_t(|+U;9iZ{5ZbJ!h8v0kPb;ww$K#&Ch9@0PQby zeo*slTX70VS8@TrMBF)jnAzo$mx`k+AV7ml;ez6FzjtPK&eTX)G)WX4YS}wD!N5?N+qyK)ah6H7sarA=ZAWM79*IM#A028F>+z`)yStB&=hS;F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