- diagnostics output for detecting potential problem mods.

This commit is contained in:
Christoph Oelckers 2019-01-12 16:37:13 +01:00
parent ed14951558
commit 6a0f1ae3a0
2 changed files with 21 additions and 0 deletions

View file

@ -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<PField *>(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;
}

View file

@ -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)