mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 12:39:59 +00:00
Make Show output format closer to vanilla
This commit is contained in:
parent
aadf13b123
commit
9b4be677f6
@ -928,16 +928,18 @@ namespace MWScript
|
|||||||
const Compiler::Locals& locals =
|
const Compiler::Locals& locals =
|
||||||
MWBase::Environment::get().getScriptManager()->getLocals(script);
|
MWBase::Environment::get().getScriptManager()->getLocals(script);
|
||||||
char type = locals.getType(var);
|
char type = locals.getType(var);
|
||||||
|
std::string refId = ptr.getCellRef().getRefId();
|
||||||
|
if (refId.find(' ') != std::string::npos)
|
||||||
|
refId = '"' + refId + '"';
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 'l':
|
case 'l':
|
||||||
case 's':
|
case 's':
|
||||||
output << ptr.getCellRef().getRefId() << "." << var << ": " << ptr.getRefData().getLocals().getIntVar(script, var);
|
output << refId << "." << var << " = " << ptr.getRefData().getLocals().getIntVar(script, var);
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
output << ptr.getCellRef().getRefId() << "." << var << ": " << ptr.getRefData().getLocals().getFloatVar(script, var);
|
output << refId << "." << var << " = " << ptr.getRefData().getLocals().getFloatVar(script, var);
|
||||||
break;
|
break;
|
||||||
// Do nothing otherwise
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -949,13 +951,13 @@ namespace MWScript
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 's':
|
case 's':
|
||||||
output << runtime.getContext().getGlobalShort (var);
|
output << var << " = " << runtime.getContext().getGlobalShort (var);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
output << runtime.getContext().getGlobalLong (var);
|
output << var << " = " << runtime.getContext().getGlobalLong (var);
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
output << runtime.getContext().getGlobalFloat (var);
|
output << var << " = " << runtime.getContext().getGlobalFloat (var);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
output << "unknown variable";
|
output << "unknown variable";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user