Skip to content

Instantly share code, notes, and snippets.

@rdococ
rdococ / mvsd.lua
Last active May 6, 2024 16:37
rigidbodies experiment
--[[
Moving Solids v0.5
- Convex & concave destructible rigidbodies
- High jank
- Objects currently respect undo/clear, and save rather poorly :( (though I have some ideas for how to make it work)
]]
local drawLine, drawPixel, fillRect = graphics.drawLine, graphics.drawPixel, graphics.fillRect
local rand = math.random
Autism isn't an identity, it's a mental disorder that causes unnecessary suffering to millions of people across the globe. Even those with otherwise high functioning struggle day to day with maintaining their mental state and engaging in communication & lateral thinking.
If you have a form of autism that has no effect on your life besides a quirky personality, good for you. But that's not the case for the majority of autists, and we're all too busy trying to juggle sensory overloads, meltdowns and attempting to function as well as possible to voice our plight. So, please just stop with these “autism pride” posts.
@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 / 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 / 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 / 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 / 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;