From 6790598af90f34332471d77740a3fa8ed33f3a25 Mon Sep 17 00:00:00 2001 From: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> Date: Fri, 29 Apr 2022 19:03:39 -0400 Subject: [PATCH] reverts ike's edits to writer.dm (#17701) --- code/modules/awaymissions/maploader/writer.dm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/modules/awaymissions/maploader/writer.dm b/code/modules/awaymissions/maploader/writer.dm index 2a704276b3e..91dcb8b83d1 100644 --- a/code/modules/awaymissions/maploader/writer.dm +++ b/code/modules/awaymissions/maploader/writer.dm @@ -172,10 +172,20 @@ if(!use_json) for(var/V in A.vars) CHECK_TICK - // Can't check issaved() or initial() because they don't work on a list index + if((!issaved(A.vars[V])) || (A.vars[V] == initial(A.vars[V]))) + continue + attributes += var_to_dmm(A.vars[V], V) else var/list/to_encode = A.serialize() + // We'll want to write out vars that are important to the editor + // So that the map is legible as before + for(var/T in A.map_important_vars()) + // Save vars that are important for the map editor, so that + // json-encoded maps are legible for standard editors + if(A.vars[T] != initial(A.vars[T])) + to_encode -= T + attributes += var_to_dmm(A.vars[T], T) // Remove useless info to_encode -= "type"