Code: Select all
defineObject{
name = "alcove_altar",
class = "Alcove",
model = "assets/models/env/altar.fbx",
replacesWall = false,
anchorPos = vec(0, 0.85, -0.5),
targetPos = vec(0,1.3,0),
targetSize = vec(0.5, 0.3, 0.9),
placement = "wall",
editorIcon = 8,
onInsertItem = function(self, item)
if self:getItemCount() == 1 then
return false
else
return true
end
end
}
cloneObject{
name = "alcove_altar_left",
baseObject = "alcove_altar",
anchorPos = vec(0.5, 0.85, -0.5),
targetPos = vec(0,1.3,0),
targetSize = vec(0.5, 0.3, 0.9),
onInsertItem = function(self, item)
if self:getItemCount() == 1 then
return false
else
return true
end
end
}
cloneObject{
name = "alcove_altar_right",
baseObject = "alcove_altar",
anchorPos = vec(-0.5, 0.85, -0.5),
targetPos = vec(0,1.3,0),
targetSize = vec(0.5, 0.3, 0.9),
onInsertItem = function(self, item)
if self:getItemCount() == 1 then
return false
else
return true
end
end
}
defineObject{
name = "altar_alcove",
class = "Alcove",
model = "assets/models/env/dungeon_wall_alcove.fbx",
replacesWall = true,
anchorPos = vec(0, 0.85, 0.0),
targetPos = vec(0,1.3,0),
targetSize = vec(0.5, 0.3, 0.9),
placement = "wall",
editorIcon = 8,
onInsertItem = function(self, item)
if item.name ~= "--youritemnamehere--" then
return false
else
return true
end
end
}