Skip to content

Instantly share code, notes, and snippets.

@rdococ
rdococ / chickens.lua
Last active April 9, 2024 11:12
Chickens for TPT
--[[
Chickens
yeah this script is stupid but i love it
]]
local elem, sim = elements, sim
local random, floor, min, max, sin, cos, atan2, sqrt, abs, ceil, exp = math.random, math.floor, math.min, math.max, math.sin, math.cos, math.atan2, math.sqrt, math.abs, math.ceil, math.exp
local pi = math.pi
local unpack = unpack
@rdococ
rdococ / dirt.lua
Last active April 9, 2024 11:12
I think someone eats this
--[[
Dirt v4
It's... dirt. And a few related elements.
v4:
- Added FIRT
- DIRT falling into water now separates into CLST & SLCN
v3:
- Heat dries DIRT
@rdococ
rdococ / exotic_particles.lua
Last active April 25, 2024 23:13
Exotic Particles for TPT
--[[
Exotic Particles v7
==
This script features several elements based on bizarre and hypothetical forms of matter.
- Build forcefields with Higgs bosons
- Reverse time by shooting tachyons into black holes (though be careful, you cannot 'unrevert'!)
- Create perpetual motion by mixing negative mass with gravitons
- Use muons to catalyze nuclear fusion
@rdococ
rdococ / tachyons.lua
Last active November 22, 2023 02:30
Tachyons in TPT
--[[Tachyons v0.27
= How it works =
1. Track all the tachyons and negatachyons in the current frame.
2. If any tachyons are created, rewind the game, reconstructing the tachyon on every frame to determine its time-reversed trajectory.
3. Once all tachyons are destroyed, let the simulation run forwards again, constructing negatachyons when and where the tachyons were destroyed.
4. Once the game catches back up, if any negatachyons can't trace their trajectory to a tachyon, rewind to erase them from the timeline.
= Notes =
- Tachyon/negatachyon pairs are detected leniently in an attempt to prevent false positives. When a negatachyon dies, it must be within line of sight of a tachyon created at the exact same position as itself.
@rdococ
rdococ / alchemistry.lua
Last active January 19, 2024 21:38
Lua mod for TPT adding several alchemical substances
--[[
Alchemistry v7
This mod is all things antiquity. Includes various acids, powders and organic substances using their historical names and believed reactions from the time. Things you can do:
- Craft several acids from 'green vitriol'
- Boil acids to precipitate dissolved substances
- Dissolve gold
- Transmute iron to silver, and silver to gold
- Manufacture gunpowder
- Craft poultices that heal STKM and destroy VIRS
@rdococ
rdococ / spreddit.css
Last active February 4, 2019 20:24
Spreddit
/* Spreddit by Rdococ */
/* Changes "share", "delete", and "edit" to "spreddit", "shreddit", and "eddit", respectively. */
/* MIT License */
a.post-sharing-button {
visibility: hidden;
position: relative;
}
a.post-sharing-button:after {
visibility: visible;