MISC: Clarify deprecation warning of ns.getTimeSinceLastAug() (#1535)

This commit is contained in:
catloversg 2024-08-04 14:01:34 +07:00 committed by GitHub
parent 7c7293b687
commit 1b9676c68e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1633,7 +1633,11 @@ export const ns: InternalAPI<NSFull> = {
return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision);
},
getTimeSinceLastAug: () => () => {
deprecationWarning("ns.getTimeSinceLastAug()", "Use ns.getResetInfo().lastAugReset instead.");
deprecationWarning(
"ns.getTimeSinceLastAug()",
"Use `Date.now() - ns.getResetInfo().lastAugReset` instead. Please note that ns.getResetInfo().lastAugReset does NOT return the " +
"same value as ns.getTimeSinceLastAug(). Check the NS API documentation for details.",
);
return Player.playtimeSinceLastAug;
},
alert: (ctx) => (_message) => {