I'm having a weird issue with sockets. I've defined an object that features nothing but a bunch of sockets that hold items. So far so good.
The problem is that said items cannot be picked up from the tile the object is placed on, but only from adjacent tiles. And it doesn't matter where the socket is placed, even if its offset is -1.49, 0 , -1.49 and you're standing on the opposite tile.
Here's the object definition:
Code: Select all
defineObject{
name = "river_sockets",
baseObject = "base_floor_decoration",
components = {
{
class = "Socket",
name = "s1",
offset = vec(0.35, 0, 1.49),
rotation = vec(0, 0, 0),
onInit = function(self)
self:addItem(spawn("crystal_flower").item)
end,
},
{
class = "Socket",
name = "s2",
offset = vec(-0.35, 0, 1.1),
rotation = vec(0, 0, 0),
onInit = function(self)
self:addItem(spawn("blooddrop_cap").item)
end,
},
{
class = "Socket",
name = "s3",
offset = vec(-0.35, 0, 0.4),
rotation = vec(0, 0, 0),
onInit = function(self)
self:addItem(spawn("aether_weed").item)
end,
},
{
class = "Socket",
name = "s4",
offset = vec(0.8, -0.05, 0.55),
rotation = vec(0, 0, 0),
onInit = function(self)
self:addItem(spawn("brass_key").item)
end,
},
{
class = "Socket",
name = "s5",
offset = vec(-0.5, 0, -0.85),
rotation = vec(0, 0, 0),
onInit = function(self)
self:addItem(spawn("skull").item)
end,
},
},
placement = "floor",
editorIcon = 104,
}
Also, how can I enable the source "console" for the script component on a non-script-entity (with the script component)?