Jump to content

Lantern script?


Recommended Posts

@Haru, mininglantern.lua. But keep in mind it hasn't really been updated for DST yet, the light it produces isn't networked (only the host can see it).

 

I think this is just a bug at the moment (I've played around with the lantern and noticed it so took a quick look in the code). And comparing it with say the torch, i noticed that they both just spawn a fire prefab. But in the laternfire one the Light component is initialized after

    if not TheWorld.ismastersim then        return inst    end

and in the torchfire its initialized before that.

 

And I assume that the mastersim means that its in control (aka the server\host), meaning it just never gets initialized at the client side.

 

This could easily be resolved with a mod that just initializes it (assuming the mod runs on clients as well ofc)

 

e.g.

AddPostPrefabInit("lanternfire", function (inst)    inst.Light:Enable(true)    inst.Light:SetIntensity(.75)    inst.Light:SetColour(197 / 255, 197 / 255, 50 / 255)    inst.Light:SetFalloff(0.4)    inst.Light:SetRadius(6)end)
Edited by Sarcen
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...