ID:169784
 
I have this day/night cycle thing going, where basically it just makes an overlay. I was thinking, though, that there should be torches, so how would I go about creating this?

I'd just like it to be an item which gives the player a verb to light it, then deletes the torch after a certain amount of time, but provides a 6x6 lit field around the player that moves with the player(and doesn't leave a trail) until the time is up.


Just remove the darkness overlays within that area, then remove them when the torch is not in range anymore.
mob/Move()
var/obj/item/torch/torch
if(istype(held_item,/obj/item/torch))
torch = held_item
if(torch.lit)
for(var/turf/T in range(6,torch))
T.recalculate_light()
else torch = null
.=..()
if(torch)
for(var/turf/T in range(6,torch))
//remove darkness overlay from T