Automatic landmarks respect mapped-in name overrides.

If a mapper puts an automatic landmark and overrides the name var, that is now respected instead of overwritten.
Note that initial(name) does *not* reset to mapped in values, but the value in code.
This commit is contained in:
Leshana
2020-04-17 11:35:34 -04:00
parent 45e71373d3
commit 1f21e7c0f2

View File

@@ -123,14 +123,16 @@
name = "Navpoint"
landmark_tag = "navpoint"
flags = SLANDMARK_FLAG_AUTOSET
var/original_name = null // Save our mapped-in name so we can rebuild our name when moving sectors.
/obj/effect/shuttle_landmark/automatic/Initialize()
original_name = name
landmark_tag += "-[x]-[y]-[z]-[random_id("landmarks",1,9999)]"
return ..()
/obj/effect/shuttle_landmark/automatic/sector_set(var/obj/effect/overmap/visitable/O)
..()
name = ("[O.name] - [initial(name)] ([x],[y])")
name = ("[O.name] - [original_name] ([x],[y])")
//Subtype that calls explosion on init to clear space for shuttles
/obj/effect/shuttle_landmark/automatic/clearing