Skip to content

Instantly share code, notes, and snippets.

@Putnam3145
Created December 9, 2018 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Putnam3145/281e0ecb2f94031a1cf3949171af1f70 to your computer and use it in GitHub Desktop.
Save Putnam3145/281e0ecb2f94031a1cf3949171af1f70 to your computer and use it in GitHub Desktop.
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
-- https://twitter.com/dril/status/235218148800991233
local eventful=require('plugins.eventful')
eventful.enableEvent(eventful.eventType.INVENTORY_CHANGE,5)
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
return soul.sex==0 and (orientation.romance_female or orientation.marry_female)
end
return false
end
local function getSubtype(item)
if item:getSubtype() ~= -1 and dfhack.items.getSubtypeDef(item:getType(),item:getSubtype()) then
return dfhack.items.getSubtypeDef(item:getType(),item:getSubtype()).id
end
return false
end
eventful.onInventoryChange.gentleTouch = function(unit, item, item_old, item_new)
local modeOld = (item_old and item_old.mode)
local modeNew = (item_new and item_new.mode)
if item_new and item_new.mode==1 then
if string.find(getSubtype(item),"LESBIAN") and not unitIsLesbian(unit) then
dfhack.items.remove(item)
dfhack.gui.showPopupAnnouncement(getSubtype(item).." is so fragile as to shatter when handled by any force other than the delicate touch of a lesbian .")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment