So I figured out that mostly it's the custom assets where I used setWorldPosition that have minimal save state issues are set to true and I just have to set all these objects to false. Let's hope this won't become a clusterfuck

Probably a side effect from the 4 gb patch. Reinstall fixes it.Pompidom wrote: ↑Tue Sep 25, 2018 11:24 am I should be okay, I can change the custom assets in false.
Just time consuming, that's all.
When I start up log2 now I get the following console message:
warning! [string "ModSystem.lua"]:0: File not found: mod/assets/dungeon_manifest.bin
Everything still works, but this message comes up now every single time I start up Log2 after I failed to export my mod and ran out of memory because I didn't lower graphics first.
Code: Select all
{
class = "Socket",
offset = vec(0.05, 1.53, -0.25),
rotation = vec(-2, -24, -90),
onAcceptItem = function(self, item)
return self:count() == 0 and not not item:hasTrait('sconce_torch')
end,
onInit = function(self, item)
self:addItem(spawn('my_torch').item)
end,
},
I can't tell you why, but it works if you place the onInit function in the TorchHolderController component:
Code: Select all
{
class = "TorchHolderController",
name = "controller",
onInit = function(self, item)
self.go.socket:addItem(spawn("my_torch").item)
end,
},
Code: Select all
{
class = "Socket",
offset = vec(0.05, 1.53, -0.25),
rotation = vec(0, -20, -90),
onAcceptItem = function(self, item)
return (item.go.name == "my_torch" or item.go.name == "my_torch_everburning") and self:count() == 0
end,
--debugDraw = true,
onInit = function(self, item)
self:addItem(spawn("my_torch").item)
self.go.controller:setHasTorch(false)
end,
},