var/turf/t = src.loc
var/area/a = t.loc
a = new /area/safe(t)
Problem description:I've been doing this for a while by just using the code above to create temporary safe areas. When their timer is up, they are set back to their old area the same way. I just want to know if it is safe, it seems like it is, but I just want to be sure.
The reason I do this is because checking if a pc, or npc is in a safe zone is easy to do this way. It also doesn't use view(), so it seems to be a faster way to check if a target is safe or not. The only other way to know if the potential target is safe is to use view() to check for police, which seems like it might cause lag when 50 npcs are doing it 10 times a second. I hope my way of handling it is not causing some invisible problem. DD has crashed several times this week, I'm a bit worried this might have somehow caused it. My friend thinks it did, but I really hope not.
You should just give the area a variable that you can set for safety.
Then just set is_safe where needed instead of creating and destroying an area and "moving" a turf (which you're not, you're actually creating a brand new turf with the same properties as the old one)