Skip to content

Commit 6f00aa2

Browse files
committed
wip duct ponder
1 parent 508e8a1 commit 6f00aa2

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed

common/src/main/kotlin/org/valkyrienskies/clockwork/ClockworkPonders.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import net.minecraft.resources.ResourceLocation
1818
import net.minecraft.world.phys.AABB
1919
import net.minecraft.world.phys.Vec2
2020
import net.minecraft.world.phys.Vec3
21+
import org.valkyrienskies.clockwork.content.ponders.KelvinPonders.duct
2122
import org.valkyrienskies.clockwork.content.ponders.KineticPonders.redstoneResistor
2223
import org.valkyrienskies.clockwork.content.ponders.OtherPonders.solid_delivery
2324
import org.valkyrienskies.clockwork.content.ponders.PhysicsPonders.altMeter
@@ -74,6 +75,10 @@ object ClockworkPonders {
7475
.addStoryBoard(
7576
"solid_delivery", ::solid_delivery
7677
)
78+
79+
HELPER.forComponents(ClockworkBlocks.DUCT).addStoryBoard(
80+
"duct", ::duct
81+
)
7782
}
7883

7984
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,111 @@
11
package org.valkyrienskies.clockwork.content.ponders
22

3+
import com.simibubi.create.AllItems
4+
import com.simibubi.create.foundation.ponder.CreateSceneBuilder
5+
import net.createmod.catnip.math.Pointing
6+
import net.createmod.ponder.api.scene.SceneBuilder
7+
import net.createmod.ponder.api.scene.SceneBuildingUtil
8+
import net.createmod.ponder.foundation.PonderSceneBuilder
9+
import net.createmod.ponder.foundation.element.InputWindowElement
10+
import net.minecraft.core.Direction
11+
import org.valkyrienskies.clockwork.ClockworkItems
12+
313
object KelvinPonders {
14+
fun duct(sceneBuilder: SceneBuilder, util: SceneBuildingUtil) {
15+
val scene = CreateSceneBuilder(sceneBuilder)
16+
scene.title("duct", "Managing Gas Networks")
17+
scene.configureBasePlate(0, 0, 5)
18+
scene.showBasePlate()
19+
scene.idle(10)
20+
21+
// Select the ducts in the schematic (Assuming a 3-long line of ducts in the center, from z=2 to z=4)
22+
val duct1 = util.grid().at(2, 1, 2)
23+
val duct2 = util.grid().at(2, 1, 3)
24+
val duct3 = util.grid().at(2, 1, 4)
25+
val ductGroup = util.select().fromTo(2, 1, 2, 2, 1, 4)
26+
27+
// Drop the ducts into the scene
28+
scene.world().showSection(ductGroup, Direction.DOWN)
29+
scene.idle(20)
30+
31+
// Intro text
32+
scene.overlay().showText(60)
33+
.text("Ducts form the core of Clockwork's gas networks.")
34+
.attachKeyFrame()
35+
.pointAt(util.vector().topOf(duct2))
36+
.placeNearTarget()
37+
scene.idle(70)
38+
39+
scene.overlay().showText(80)
40+
.text("Gas flows automatically between connected ducts, moving from high to low pressure.")
41+
.pointAt(util.vector().topOf(duct2))
42+
.placeNearTarget()
43+
scene.idle(90)
44+
45+
// Wrench mechanics
46+
scene.overlay().showControls(
47+
util.vector().topOf(duct2), Pointing.DOWN, 60
48+
).rightClick().withItem(AllItems.WRENCH.asStack())
49+
50+
scene.idle(10)
51+
52+
scene.overlay().showText(70)
53+
.text("Using a Wrench on a connection toggles it on or off.")
54+
.attachKeyFrame()
55+
.pointAt(util.vector().centerOf(duct2))
56+
.placeNearTarget()
57+
scene.idle(80)
58+
59+
// Screwdriver configuration
60+
scene.overlay().showControls(
61+
util.vector().topOf(duct2), Pointing.DOWN, 60
62+
).rightClick().withItem(ClockworkItems.SCREWDRIVER.asStack())
63+
64+
scene.idle(10)
65+
66+
scene.overlay().showControls(
67+
util.vector().topOf(duct2), Pointing.DOWN, 60
68+
).rightClick().whileSneaking().withItem(ClockworkItems.SCREWDRIVER.asStack())
69+
70+
scene.overlay().showOutlineWithText(util.select().position(duct2), 80)
71+
.text("Sneak right-clicking with a Screwdriver cycles edge types: Pipe, One-Way, Filtered, and Smart.")
72+
.attachKeyFrame()
73+
.pointAt(util.vector().centerOf(duct2))
74+
.placeNearTarget()
75+
scene.idle(90)
76+
77+
// Sneak-screwdriving
78+
79+
80+
scene.idle(10)
81+
82+
scene.overlay().showControls(
83+
util.vector().topOf(duct2), Pointing.DOWN, 60
84+
).rightClick().withItem(ClockworkItems.SCREWDRIVER.asStack())
85+
scene.overlay().showText(80)
86+
.text("Right clicking an edge with a screwdriver allows you to edit it (For Filtered and Smart edges).")
87+
.pointAt(util.vector().centerOf(duct2))
88+
.placeNearTarget()
89+
scene.idle(90)
90+
91+
// Leaks
92+
scene.overlay().showText(70)
93+
.text("If a duct is caught in an explosion, it will become a leak and gas will violently escape!")
94+
.attachKeyFrame()
95+
.pointAt(util.vector().topOf(duct3))
96+
.placeNearTarget()
97+
scene.idle(80)
98+
99+
scene.overlay().showControls(
100+
util.vector().topOf(duct3), Pointing.DOWN, 60
101+
).rightClick().withItem(AllItems.WRENCH.asStack())
102+
103+
scene.idle(10)
104+
105+
scene.overlay().showText(70)
106+
.text("Right-Clicking a leak with a Wrench will seal it back up.")
107+
.pointAt(util.vector().topOf(duct3))
108+
.placeNearTarget()
109+
scene.idle(80)
110+
}
4111
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,16 @@
561561
"vs_clockwork.ponder.plane_tips.text_8": "Cambered wings will have an angle of 20",
562562
"vs_clockwork.ponder.plane_tips.text_9": "Causing your plane to turn",
563563

564+
"vs_clockwork.ponder.duct.header": "Gas Ducts",
565+
"vs_clockwork.ponder.duct.text_1": "Ducts form the core of Clockwork's gas networks.",
566+
"vs_clockwork.ponder.duct.text_2": "Gas flows automatically between connected ducts, moving from high to low pressure.",
567+
"vs_clockwork.ponder.duct.text_3": "Using a Wrench on a connection toggles it on, off, or forces it.",
568+
"vs_clockwork.ponder.duct.text_4": "A Screwdriver cycles edge types: Pipe, One-Way, Filtered, and Smart.",
569+
"vs_clockwork.ponder.duct.text_5": "Sneak-clicking with a Screwdriver cycles the pipe connection entirely, allowing purely structural links.",
570+
"vs_clockwork.ponder.duct.text_6": "If a duct is caught in an explosion, it will become a leak and gas will violently escape!",
571+
"vs_clockwork.ponder.duct.text_7": "Right-Clicking a leak with a Wrench will seal it back up.",
572+
573+
564574
"death.attack.gas_burn": "%s was singed to a crisp",
565575
"death.attack.gas_explosion": "%s couldn't handle the pressure"
566576
}
565 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)