From 6a0f1ae3a0ce3d6c7626fb451aa3f00cfd43e20c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 12 Jan 2019 16:37:13 +0100 Subject: [PATCH] - diagnostics output for detecting potential problem mods. --- src/scripting/backend/codegen.cpp | 14 ++++++++++++++ src/scripting/zscript/zcc_compile.cpp | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index 138d090833..a32eee5a28 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -6120,6 +6120,10 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx) { ScriptPosition.Message(MSG_WARNING, "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision); } + else if (sym->mVersion >= MakeVersion(3, 8, 0)) + { + ScriptPosition.Message(MSG_WARNING, TEXTCOLOR_BLUE "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision); + } } newex = new FxGlobalVariable(static_cast(sym), ScriptPosition); @@ -6215,6 +6219,10 @@ FxExpression *FxIdentifier::ResolveMember(FCompileContext &ctx, PContainerType * { ScriptPosition.Message(MSG_WARNING, "Accessing deprecated member variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision); } + else if (sym->mVersion >= MakeVersion(3, 8, 0)) + { + ScriptPosition.Message(MSG_WARNING, TEXTCOLOR_BLUE "Accessing deprecated member variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision); + } } // We have 4 cases to consider here: @@ -7801,6 +7809,8 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) { if (ctx.Version >= MakeVersion(3, 8, 0)) ScriptPosition.Message(MSG_WARNING, "Deprecated use of %s. Action specials should only be used from actor methods", MethodName.GetChars()); + else + ScriptPosition.Message(MSG_WARNING,TEXTCOLOR_BLUE "Deprecated use of %s. Action specials should only be used from actor methods", MethodName.GetChars()); } FxExpression *x = new FxActionSpecialCall(self, special, ArgList, ScriptPosition); delete this; @@ -8764,6 +8774,10 @@ bool FxVMFunctionCall::CheckAccessibility(const VersionInfo &ver) { ScriptPosition.Message(MSG_WARNING, "Accessing deprecated function %s - deprecated since %d.%d.%d", Function->SymbolName.GetChars(), Function->mVersion.major, Function->mVersion.minor, Function->mVersion.revision); } + else if (Function->mVersion >= MakeVersion(3, 8, 0)) + { + ScriptPosition.Message(MSG_WARNING, TEXTCOLOR_BLUE "Accessing deprecated function %s - deprecated since %d.%d.%d", Function->SymbolName.GetChars(), Function->mVersion.major, Function->mVersion.minor, Function->mVersion.revision); + } } return true; } diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index f73ba789a6..c7ed1447a9 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -644,6 +644,13 @@ void ZCCCompiler::CreateClassTypes() { c->cls->Type = NewClassType(newclass); DPrintf(DMSG_SPAMMY, "Created class %s with parent %s\n", c->Type()->TypeName.GetChars(), c->ClassType()->ParentClass->TypeName.GetChars()); + if (c->ClassType()->IsDescendantOf(NAME_Thinker) && !c->ClassType()->IsDescendantOf(NAME_Actor)) + { + if (Wads.GetLumpFile(Lump) != 0) + { + Printf(TEXTCOLOR_BLUE "Created thinker class %s\n", c->Type()->TypeName.GetChars()); + } + } } } catch (CRecoverableError &err)