Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block Putnam3145

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Putnam3145 / life.d
Last active Mar 15, 2019
Generic programming lifelike cellular automata in D
View life.d
private struct LifeLikeRule
ubyte notZero;
bool zero;
this(ushort initializer)
pure ushort fullRule()
Putnam3145 / wint.lua
Created Dec 9, 2018
i do not apologize for this, nor do i. fully expect it to work to be frank, but i had to get it off my chest
View wint.lua
local eventful=require('plugins.eventful')
local function unitIsLesbian(unit)
if (unit and unit.status and unit.status.current_soul) then
local soul=unit.status.current_soul
local orientation=soul.personality.orientation_flags
Putnam3145 / bedassign.lua
Created Jul 5, 2018
Sets all beds with no rooms set to have rooms.
View bedassign.lua
-- Autoassigns all beds which do not have assigned rooms to rooms.
-- Will flood fill up to -size size.
Sets all beds with no rooms set to have rooms.
bedassign -size will set all rooms to press the + key -size times. Setting -size to a negative value will press the - key instead.
Putnam3145 / custom-artifact.lua
Last active Dec 11, 2017
Allows the addition of custom artifacts with arbitrary name, mat and type to the world in Dwarf Fortress.
View custom-artifact.lua
-- Makes it so that the world will always have certain artifacts in certain sites when world loads.
--@ module = true
--Author Putnam
local usage = [===[
This tool, when run, checks if the specific item has an artifact record somewhere in the world
and places the artifact at a valid site (which can be constrained by arguments) if it is not found.
View dfDate.lua
local df_date={} --lol I really should put this in its own file
return date1.year==date2.year and date1.year_tick==date2.year_tick
if date1.year<date2.year then return true end
if date1.year>date2.year then return false end
if date1.year==date2.year then
Putnam3145 / ClickableLabel.lua
Created May 8, 2016
An intuitive clickable text label for DFHack UI purposes.
View ClickableLabel.lua
local gui=require('gui')
local widgets=require('gui.widgets')
local ClickableLabel=defclass(ClickableLabel,widgets.Label)
Putnam3145 / family.lua
Last active Sep 27, 2019
A family tree generator for Dwarf Fortress.
View family.lua
FamilyNode.ATTRS {
histfig_id = DEFAULT_NIL,
mother = DEFAULT_NIL,
father = DEFAULT_NIL,
spouse = DEFAULT_NIL,
progenitor = false,
children = {}
Putnam3145 / SMHackin.lua
Last active Feb 6, 2017
A bunch of dumb BizHawk hacks I've made for Super Metroid.
View SMHackin.lua
assistantUI = forms.newform(200, 120, "SMAssist")
autoShineActivated = forms.checkbox(assistantUI,'Auto Shinespark Crouch',1,1)
autoFireActivated = nil --not in there yet
autoDamageBoostActivated = forms.checkbox(assistantUI,'Auto Damage Boost',1,23)
homingMissileActivated = forms.checkbox(assistantUI,'Homing Missile',1,45)
Putnam3145 / badThoughtNotifier.lua
Created May 15, 2015
A script that notifies the user of the most common bad thoughts in the fort.
View badThoughtNotifier.lua
local function getRaceName()
return df.creature_raw.find([1]
local function emotionIsNegative(thought)
return thought.type~=-1 and df.emotion_type.attrs[thought.type].divider>0
local function write_gamelog_and_announce(msg,color)
Putnam3145 / get_generated_raws.lua
Last active Sep 24, 2015
Outputs a few files containing generated raws.
View get_generated_raws.lua
local creatures = assert('/generated_creatures.txt', 'w'))
local items = assert('/generated_items.txt', 'w'))
local materials = assert('/generated_materials.txt', 'w'))
local entities = assert('/generated_entities.txt', 'w'))
local interactions = assert('/generated_interactions.txt', 'w'))
You can’t perform that action at this time.