Skip to content

Commit b632cd6

Browse files
committed
editor: store tool version in map config
1 parent f154231 commit b632cd6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

config/tool/toolcommon.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,11 @@ tool_file_isimage = [
260260
tool_file_ishidden = [
261261
= (strstr $arg1 ".") 0
262262
]
263+
264+
TOOL_VERSION = 1
265+
266+
tool_remember_version_on_mapload = [
267+
quietworldalias tool_saved_version $TOOL_VERSION
268+
]
269+
270+
onevent 0 tool_remember_version_on_mapload

src/engine/command.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static inline void setalias(ident &id, tagval &v, bool world, bool quiet = false
503503
return;
504504
}
505505
#ifndef STANDALONE
506-
if(!(identflags&IDF_WORLD) && !editmode && (world || (id.flags&IDF_WORLD && !(id.flags&IDF_REWRITE))))
506+
if(!quiet && !(identflags&IDF_WORLD) && !editmode && (world || (id.flags&IDF_WORLD && !(id.flags&IDF_REWRITE))))
507507
{
508508
printeditonly(&id);
509509
return;
@@ -566,7 +566,7 @@ static void setalias(const char *name, tagval &v, bool world, bool quiet = false
566566
else
567567
{
568568
#ifndef STANDALONE
569-
if(!(identflags&IDF_WORLD) && !editmode && world)
569+
if(!(identflags&IDF_WORLD) && !editmode && world && !quiet)
570570
{
571571
debugcode("\frCannot create %s as a world alias outside editmode", name);
572572
return;

0 commit comments

Comments
 (0)