Skip to content

Commit ec75758

Browse files
committed
Added wall heat capacity and conductivity to duct nodes.
Added wall temperature to the goggle tooltip.
1 parent 854ae67 commit ec75758

File tree

10 files changed

+26
-9
lines changed

10 files changed

+26
-9
lines changed

common/src/main/java/org/valkyrienskies/clockwork/mixin/content/gas/MixinComposterBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public MixinComposterBlock(Properties properties) {
6868
@NotNull
6969
@Override
7070
public DuctNode createNode(@NotNull DuctNodePos pos) {
71-
return new PipeDuctNode(pos, NodeBehaviorType.PIPE, new HashSet<>(),1.0, 16375049.0, 1478.0);
71+
return new PipeDuctNode(pos, NodeBehaviorType.PIPE, new HashSet<>(),1.0, 16375049.0, 1478.0, 1687.5, 44.9);
7272
}
7373

7474
@Override

common/src/main/kotlin/org/valkyrienskies/clockwork/content/logistics/gas/IClockworkNodeBE.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ interface IClockworkNodeBE: INodeBlockEntity, IHaveGoggleInformation {
3939
}
4040
}
4141
kelvin.getTemperatureAt(pos).let { temp ->
42+
found = true
43+
ClockworkLang.builder().apply {
44+
add(ClockworkLang.translate(
45+
"gui.ductInfo.temperature",
46+
DuctTextUtil.translateTemperature(ClockworkLang.builder(), temp, true)
47+
))
48+
style(ChatFormatting.GOLD)
49+
forGoggles(tooltip, 0)
50+
}
51+
}
52+
53+
kelvin.getWallTemperatureAt(pos).let { temp ->
4254
found = true
4355
ClockworkLang.builder().apply {
4456
val max = blockStats?.getMaximumTemperature()
@@ -47,7 +59,7 @@ interface IClockworkNodeBE: INodeBlockEntity, IHaveGoggleInformation {
4759

4860
if (critical) text("!! ")
4961
add(ClockworkLang.translate(
50-
"gui.ductInfo.temperature",
62+
"gui.ductInfo.wallTemperature",
5163
DuctTextUtil.translateTemperature(ClockworkLang.builder(), temp, true)
5264
))
5365
style(ChatFormatting.GOLD)

common/src/main/kotlin/org/valkyrienskies/clockwork/content/logistics/gas/backtank/GasBacktankBlock.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class GasBacktankBlock(properties: Properties) : HorizontalDirectionalBlock(prop
7777
}
7878

7979
override fun createNode(pos: DuctNodePos): DuctNode {
80-
return TankDuctNode(pos = pos, behavior = NodeBehaviorType.TANK, volume = 0.75, maxPressure = 16375049.0, maxTemperature = 1478.0, size = 3.0)
80+
return TankDuctNode(pos = pos, behavior = NodeBehaviorType.TANK, volume = 0.75, maxPressure = 16375049.0, maxTemperature = 1478.0, size = 3.0, heatConductivity = 1687.5, heatCapacity = 44.9)
8181
}
8282

8383
override fun onPlace(state: BlockState, level: Level, pos: BlockPos, oldState: BlockState, isMoving: Boolean) {

common/src/main/kotlin/org/valkyrienskies/clockwork/content/logistics/gas/duct/DuctPipeNode.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.valkyrienskies.kelvin.api.nodes.ILeakNode
88
import org.valkyrienskies.kelvin.api.nodes.PipeDuctNode
99
import org.valkyrienskies.kelvin.util.KelvinExtensions.toMinecraft
1010

11-
class DuctPipeNode(pos: DuctNodePos, volume: Double, maxPressure: Double, maxTemperature: Double) : PipeDuctNode(pos, NodeBehaviorType.PIPE, volume = volume, maxPressure = maxPressure, maxTemperature = maxTemperature), ILeakNode {
11+
class DuctPipeNode(pos: DuctNodePos, volume: Double, maxPressure: Double, maxTemperature: Double) : PipeDuctNode(pos, NodeBehaviorType.PIPE, volume = volume, maxPressure = maxPressure, maxTemperature = maxTemperature, heatConductivity = 1687.5, heatCapacity = 44.9), ILeakNode {
1212

1313
override fun getLeakRatio(level: Level): Double {
1414
val state = level.getBlockState(pos.toMinecraft())

common/src/main/kotlin/org/valkyrienskies/clockwork/content/logistics/gas/storage/tank/DuctTankBlock.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class DuctTankBlock(properties: Properties) : Block(properties), INodeBlock, IBE
6969
}
7070

7171
fun createTankNode(pos: DuctNodePos, size: Double): DuctNode {
72-
return TankDuctNode(pos, NodeBehaviorType.TANK, volume = size, maxPressure = 16375049.0, maxTemperature = 1478.0)
72+
return TankDuctNode(pos, NodeBehaviorType.TANK, volume = size, maxPressure = 16375049.0, maxTemperature = 1478.0, heatConductivity = 1687.5, heatCapacity = 44.9)
7373
}
7474

7575
override fun onPlace(state: BlockState, level: Level, pos: BlockPos, oldState: BlockState, isMoving: Boolean) {

common/src/main/kotlin/org/valkyrienskies/clockwork/util/DuctNetworkUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import org.valkyrienskies.kelvin.api.nodes.PumpDuctNode
1313

1414
object DuctNetworkUtils {
1515
fun createPipeNode(pos: DuctNodePos): PipeDuctNode {
16-
return PipeDuctNode(pos, NodeBehaviorType.PIPE, volume = 0.25, maxPressure = 16375049.0, maxTemperature = 1478.0)
16+
return PipeDuctNode(pos, NodeBehaviorType.PIPE, volume = 0.25, maxPressure = 16375049.0, maxTemperature = 1478.0, heatConductivity = 1687.5, heatCapacity = 44.9)
1717
}
1818

1919
fun createPumpNode(pos: DuctNodePos): PumpDuctNode {
20-
return PumpDuctNode(pos, NodeBehaviorType.PUMP, volume = 0.25, maxPressure = 16375049.0, maxTemperature = 1478.0)
20+
return PumpDuctNode(pos, NodeBehaviorType.PUMP, volume = 0.25, maxPressure = 16375049.0, maxTemperature = 1478.0, heatConductivity = 1687.5, heatCapacity = 44.9)
2121
}
2222

2323
fun createPipeEdge(nodeA: DuctNodePos, nodeB: DuctNodePos): PipeDuctEdge {

common/src/main/kotlin/org/valkyrienskies/clockwork/util/render/VirtualDuctNetwork.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ class VirtualDuctNetwork(
7373
TODO("Not yet implemented")
7474
}
7575

76+
override fun getWallTemperatureAt(node: DuctNodePos): Double {
77+
TODO("Not yet implemented")
78+
}
79+
7680
override fun markChunkLoaded(pos: KelvinChunkPos) {
7781
TODO("Not yet implemented")
7882
}

common/src/main/resources/assets/vs_clockwork/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
"vs_clockwork.gui.ductInfo.title": "Duct Info:",
457457
"vs_clockwork.gui.ductInfo.volume": "Volume: %s",
458458
"vs_clockwork.gui.ductInfo.temperature": "Temperature: %s",
459+
"vs_clockwork.gui.ductInfo.wallTemperature": "Wall Temperature: %s",
459460
"vs_clockwork.gui.ductInfo.pressure": "Pressure: %s",
460461
"vs_clockwork.gui.ductInfo.energy": "Thermal Energy: %s",
461462
"vs_clockwork.gui.ductInfo.out_of": " / %s",

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ parchment_version = 2023.09.03
2525
vs2_version=2.4.8.1+40011b4af2
2626
vscore_version=1.1.0+015e8fde3f
2727
# Kelvin
28-
kelvin_version=0.4.0+ad27706cf1
28+
kelvin_version=0.4.0+a5ff6bbff0
2929

3030
# Fabric
3131
# https://fabricmc.net/develop/

0 commit comments

Comments
 (0)