Search the Community
Showing results for tags 'sewing kit'.
Found 1 result
Hi! I've been trying to make my character mod gain sanity when using the sewing kit (or gaining sanity when holding it, at the very least). I have succeeded to make my character gain sanity upon catching fireflies, but this code does not seem to work for the sewing kit. inst:ListenForEvent( "finishedwork", function(inst, data) if(data and data.target and data.target.prefab=="dress") then if(data.action and data.action.id=="SEW") then if(inst and inst.components and inst.components.sanity) then inst.components.sanity:DoDelta(20) -- amount of sanity gain here inst.components.talker:Say("It feels nice to sew after a while...") end end end end ) I tried countless times to make this work with a bunch of references from other codes, but I can't seem to make it work as easy as it seems! I think it's the 'prefab' target that is set wrong, as I want all clothing to be affected, not a specific one. Does anyone have an idea how this works?