mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-12 23:23:20 +00:00
Merge pull request #2611 from IvarK/fix-no-prototype-builtins
This commit is contained in:
commit
4a046ee3c1
@ -97,7 +97,7 @@ const ReactivityComplainer = {
|
||||
throw new Error(`Boi you fukked up - ${path} became REACTIVE (oh shite)`);
|
||||
}
|
||||
for (const key in obj) {
|
||||
if (!obj.hasOwnProperty(key)) continue;
|
||||
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
||||
const prop = obj[key];
|
||||
if (typeof prop === "object") {
|
||||
this.checkReactivity(prop, `${path}.${key}`);
|
||||
|
@ -166,7 +166,7 @@ dev.resetDilation = function() {
|
||||
// when making a special glyph, so no max-params
|
||||
// eslint-disable-next-line max-params
|
||||
dev.giveSpecialGlyph = function(color, symbol, level, rawLevel = level) {
|
||||
if (!specialGlyphSymbols.hasOwnProperty(symbol)) return;
|
||||
if (!Object.prototype.hasOwnProperty.call(specialGlyphSymbols, symbol)) return;
|
||||
if (Glyphs.freeInventorySpace === 0) return;
|
||||
const glyph = GlyphGenerator.randomGlyph({ actualLevel: level, rawLevel });
|
||||
glyph.symbol = symbol;
|
||||
|
@ -30,7 +30,10 @@ export const GameIntervals = (function() {
|
||||
// Not a getter because getter will cause stack overflow
|
||||
all() {
|
||||
return Object.values(GameIntervals)
|
||||
.filter(i => i.hasOwnProperty("start") && i.hasOwnProperty("stop"));
|
||||
.filter(i =>
|
||||
Object.prototype.hasOwnProperty.call(i, "start") &&
|
||||
Object.prototype.hasOwnProperty.call(i, "stop")
|
||||
);
|
||||
},
|
||||
start() {
|
||||
// eslint-disable-next-line no-shadow
|
||||
|
@ -49,7 +49,7 @@ export const PerformanceStats = {
|
||||
function render(rootBlock) {
|
||||
indentLevel++;
|
||||
for (const blockName in rootBlock) {
|
||||
if (!rootBlock.hasOwnProperty(blockName)) continue;
|
||||
if (!Object.prototype.hasOwnProperty.call(rootBlock, blockName)) continue;
|
||||
const block = rootBlock[blockName];
|
||||
const records = block.records;
|
||||
while (records.length > 1 && records.last().timestamp - records.first().timestamp > samplePeriod) {
|
||||
|
@ -984,7 +984,7 @@ export function guardFromNaNValues(obj) {
|
||||
}
|
||||
|
||||
for (const key in obj) {
|
||||
if (!obj.hasOwnProperty(key)) continue;
|
||||
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
||||
|
||||
// TODO: rework autobuyer saving
|
||||
if (key === "automator") continue;
|
||||
|
Loading…
Reference in New Issue
Block a user