Page 1 of 1

Eyes/mouth sockets for all the gems

Posted: Wed Oct 31, 2012 12:23 am
by crisman
If you are interested, these codes allow the daemon head's sockets (both eyes and mouth) to accepts all the gems, into a single entity. I was a bit tired to have mouth_socket_red and mouth_socket_blue and so on...
Image
Copy in objcet.lua
SpoilerShow

Code: Select all

cloneObject{
            name = "eye_socket_left",
            baseObject = "eye_socket_left",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) 
                         end,
}   

cloneObject{
            name = "eye_socket_right",
            baseObject = "eye_socket_right",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) 
                         end,
}   

cloneObject{
            name = "mouth_socket",
            baseObject = "mouth_socket",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) 
                         end,
} 
a warning, do not use if you have items that end with "_gem" ;)

Re: Eyes/mouth sockets for all the gems

Posted: Wed Oct 31, 2012 12:29 am
by Neikun
Big supporter of having all of these available for modders. (big time saver)
Would you mind sticking this in the alcove thread?

Re: Eyes/mouth sockets for all the gems

Posted: Wed Oct 31, 2012 12:47 am
by crisman
Sure, but sorry for my ignorance... how do I stick?? just copy and paste or something different???

Re: Eyes/mouth sockets for all the gems

Posted: Wed Oct 31, 2012 12:56 am
by Neikun
You seem to have figured it out, but yeah.
I would edit my post. ctrl+A, Ctrl+C and then paste in my new destination.
EDIT: WAIT A SECOND! WHERE'D THAT YELLOW GEM COME FROM!?

Re: Eyes/mouth sockets for all the gems

Posted: Wed Oct 31, 2012 1:05 am
by crisman
Neikun wrote:You seem to have figured it out, but yeah.
I would edit my post. ctrl+A, Ctrl+C and then paste in my new destination.
EDIT: WAIT A SECOND! WHERE'D THAT YELLOW GEM COME FROM!?
I did it, it's nothing special since it does not glows.