SOURCE / PINNED RELEASE
Made of little things.
Powder Tool V600Billion
- Release
- 142767edcab8…
- Author-recorded commit
- 6d92971effd0…
- License
- LICENSE
- Author’s source reference
- nostr://npub1fllw8kw0thjj55wds0uugcnp5kej2nfxd36eruq39d56wwz8r44q5q78wj/wss%3A%2F%2Fgit.napplet.soy%2F/powder-toy
Archive hash verified: ed7d6a8ea7083197…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
-- title: Nuclear reactor
-- icon: ☢️
-- blurb: Plutonium rods boil water into a plume of steam; titanium control rods keep the chain reaction in check.
-- hint: Erase the grey control rods: with half of them gone the chain reaction runs away.
-- view: 4
-- thumb: 30
--
-- How it runs: neutrons from a source under the core split plutonium, which
-- heats the water to steam. The game's fission speeds up with air pressure, so
-- the scene switches pressure off while the control rods are in (it would run
-- away on its own otherwise), and back on once half of them are gone.
local WATR, PLUT, TTAN, NEUT = E.DEFAULT_PT_WATR, E.DEFAULT_PT_PLUT, E.DEFAULT_PT_TTAN, E.DEFAULT_PT_NEUT
sim.airMode(1)
-- Ground
walls(0, 368, 611, 383)
-- Reactor vessel, open at the top, fed from the left at the bottom
local x0, x1, top, bottom = 196, 415, 176, 363
box(40, bottom - 3, x1, bottom, TTAN)
box(x0, top, x0 + 3, 351, TTAN)
box(x1 - 3, top, x1, bottom, TTAN)
-- Cooling tower above it
line(188, 172, 232, 96, E.DEFAULT_PT_BRCK, 1)
line(232, 96, 222, 36, E.DEFAULT_PT_BRCK, 1)
line(423, 172, 379, 96, E.DEFAULT_PT_BRCK, 1)
line(379, 96, 389, 36, E.DEFAULT_PT_BRCK, 1)
-- Feed tank with a spring of water, and the pipe into the vessel
box(40, 250, 43, bottom, TTAN)
box(40, 250, 119, 253, TTAN)
box(116, 254, 119, 351, TTAN)
box(116, 348, x0, 351, TTAN)
box(44, 258, 60, 262, E.DEFAULT_PT_CLNE)
set(44, 258, 60, 262, "ctype", WATR)
-- Fuel: plutonium held by energy walls (neutrons pass, the powder stays)
for n = 0, 4 do
local rx = 224 + n * 40
walls(rx - 4, 216, rx - 1, 351, WALL.energy)
walls(rx + 8, 216, rx + 11, 351, WALL.energy)
walls(rx, 348, rx + 7, 351, WALL.energy)
box(rx, 220, rx + 7, 347, PLUT)
end
-- Control rods between the fuel
local rods = {}
for n = 0, 3 do
local cx = 248 + n * 40
box(cx, 170, cx + 3, 340, TTAN)
for _, y in ipairs({ 190, 250, 310 }) do rods[#rods + 1] = { cx + 1, y } end
end
-- Coolant, hot already
box(44, 254, 115, bottom - 4, WATR)
box(116, 352, x0 + 3, bottom - 4, WATR)
box(x0 + 4, 196, x1 - 4, bottom - 4, WATR)
set(44, 196, x1 - 4, bottom - 4, "temp", celsius(92))
-- The neutron source
every(function()
if math.random() < 0.3 then sim.partCreate(-1, math.random(222, 393), 356, NEUT) end
end)
-- The watch on the control rods
local frame = 0
watch(function()
frame = frame + 1
if frame % 30 == 0 and sim.airMode() == 1 then
local left = 0
for _, p in ipairs(rods) do
local i = sim.partID(p[1], p[2])
if i and sim.partProperty(i, "type") == TTAN then left = left + 1 end
end
if left <= #rods / 2 then sim.airMode(0) end
end
end)
