Jump to content

Mod doesn't work on a Cave-enabled world


Recommended Posts

Specifically, these are the parts which do not work...

GLOBAL.TheNet:Announce("Saving...")
TheWorld:PushEvent("ms_save") -- Save map
GLOBAL.TheNet:Announce("Saving and restarting...")
GLOBAL.TheSystemService:EnableStorage(true)
GLOBAL.SaveGameIndex:SaveCurrent() -- Save map
TheWorld:DoTaskInTime(0.5,function() TheNet:SendWorldRollbackRequestToServer(0) end) -- Restart
GLOBAL.TheNet:Announce("Loading last save...")
TheWorld:DoTaskInTime(0.5,function() TheNet:SendWorldRollbackRequestToServer(0) end) -- Restart
GLOBAL.TheNet:Announce("Resetting character...")
TheWorld:DoTaskInTime(0.5,function() GLOBAL.DeleteUserSession(ThePlayer) ThePlayer:Remove() end) -- Change character
ThePlayer.components.builder:GiveAllRecipes()

Only the last piece produces a crash, though, the others just refuse to work. They all work normally on a Cave-disabled world. I suspect this is because having Caves needs means your world has another "shard" or whatever it's called.

If someone could tell me what's going on, and hopefully what I can do to fix this, then that would be delightful.

Link to comment
Share on other sites

16 hours ago, DarkKingBoo said:

Is this mod a client mod? Perhaps trying making it server_only? I mean otherwise I'm out of ideas atm.

Yes, it is a client-only mod. It still functions identically when set to server-only, it fixes none of the problems.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...