Here's one for ya
Posted: Mon Nov 05, 2012 4:10 am
Fhizban is working on a HUGE item upgrade mod, scripting them all and planning a randomizing function with different tiers of each item type so you dont get Dismantlers on floor 1. My question is this, I saw a script (Crismans, I believe) that allows sockets to take all gem types. I Copied it and pasted it in my objects expecting it to name all iterations of gems and save me typing. But what I found was this.
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,
}
Anyone else see that? all items with the string suffix _gem are accepted. Like an * in DOS days.Any way to use this feature to make fhizbans randomizers much more manageable?He's talking hundreds of items.
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,
}
Anyone else see that? all items with the string suffix _gem are accepted. Like an * in DOS days.Any way to use this feature to make fhizbans randomizers much more manageable?He's talking hundreds of items.