mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 22:36:43 +00:00
Merge pull request #2653 from akortunov/log
Improve BetaComment handling
This commit is contained in:
commit
87f9b85e21
3 changed files with 12 additions and 11 deletions
|
@ -197,6 +197,7 @@
|
||||||
Feature #3980: In-game option to disable controller
|
Feature #3980: In-game option to disable controller
|
||||||
Feature #3999: Shift + Double Click should maximize/restore menu size
|
Feature #3999: Shift + Double Click should maximize/restore menu size
|
||||||
Feature #4001: Toggle sneak controller shortcut
|
Feature #4001: Toggle sneak controller shortcut
|
||||||
|
Feature #4129: Beta Comment to File
|
||||||
Feature #4209: Editor: Faction rank sub-table
|
Feature #4209: Editor: Faction rank sub-table
|
||||||
Feature #4255: Handle broken RepairedOnMe script function
|
Feature #4255: Handle broken RepairedOnMe script function
|
||||||
Feature #4316: Implement RaiseRank/LowerRank functions properly
|
Feature #4316: Implement RaiseRank/LowerRank functions properly
|
||||||
|
|
|
@ -400,17 +400,7 @@ namespace MWGui
|
||||||
struct tm* timeinfo;
|
struct tm* timeinfo;
|
||||||
timeinfo = localtime(&time);
|
timeinfo = localtime(&time);
|
||||||
|
|
||||||
// Use system/environment locale settings for datetime formatting
|
text << std::put_time(timeinfo, "%Y.%m.%d %T") << "\n";
|
||||||
char* oldLctime = setlocale(LC_TIME, nullptr);
|
|
||||||
setlocale(LC_TIME, "");
|
|
||||||
|
|
||||||
const int size=1024;
|
|
||||||
char buffer[size];
|
|
||||||
if (std::strftime(buffer, size, "%x %X", timeinfo) > 0)
|
|
||||||
text << buffer << "\n";
|
|
||||||
|
|
||||||
// reset
|
|
||||||
setlocale(LC_TIME, oldLctime);
|
|
||||||
|
|
||||||
text << "#{sLevel} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
|
text << "#{sLevel} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
|
||||||
text << "#{sCell=" << mCurrentSlot->mProfile.mPlayerCell << "}\n";
|
text << "#{sCell=" << mCurrentSlot->mProfile.mPlayerCell << "}\n";
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
#include "miscextensions.hpp"
|
#include "miscextensions.hpp"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
#include <components/compiler/opcodes.hpp>
|
#include <components/compiler/opcodes.hpp>
|
||||||
#include <components/compiler/locals.hpp>
|
#include <components/compiler/locals.hpp>
|
||||||
|
|
||||||
|
#include <components/debug/debuglog.hpp>
|
||||||
|
|
||||||
#include <components/interpreter/interpreter.hpp>
|
#include <components/interpreter/interpreter.hpp>
|
||||||
#include <components/interpreter/runtime.hpp>
|
#include <components/interpreter/runtime.hpp>
|
||||||
#include <components/interpreter/opcodes.hpp>
|
#include <components/interpreter/opcodes.hpp>
|
||||||
|
@ -1222,6 +1225,11 @@ namespace MWScript
|
||||||
|
|
||||||
std::stringstream msg;
|
std::stringstream msg;
|
||||||
|
|
||||||
|
msg << "Report time: ";
|
||||||
|
|
||||||
|
std::time_t currentTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||||
|
msg << std::put_time(std::gmtime(¤tTime), "%Y.%m.%d %T UTC") << std::endl;
|
||||||
|
|
||||||
msg << "Content file: ";
|
msg << "Content file: ";
|
||||||
|
|
||||||
if (!ptr.getCellRef().hasContentFile())
|
if (!ptr.getCellRef().hasContentFile())
|
||||||
|
@ -1263,6 +1271,8 @@ namespace MWScript
|
||||||
--arg0;
|
--arg0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log(Debug::Warning) << "\n" << msg.str();
|
||||||
|
|
||||||
runtime.getContext().report(msg.str());
|
runtime.getContext().report(msg.str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue