Created
December 9, 2018 09:00
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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