Eyes/mouth sockets for all the gems
Posted: Wed Oct 31, 2012 12:23 am
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...

Copy in objcet.lua
a warning, do not use if you have items that end with "_gem" 
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,
}