Loading packages/server/src/models/User.ts +10 −0 Original line number Diff line number Diff line Loading @@ -124,9 +124,19 @@ export class User { async modifyStack(modifyBy: number): Promise<any> { const CONFIG = ClientConfigService.getConfig(); await this.update(true); let new_date = new Date(); if (modifyBy > 0) { let cooldown_to_add = 0.0; if (this.pixelStack + modifyBy > CONFIG.canvas.pixel.maxStack) { Logger.debug( `${this.sub} attempted to claim another pixel, but would go over the max stack` ); return; } for (let i = 0; i < modifyBy; i++) { cooldown_to_add += CanvasLib.getPixelCooldown( this.pixelStack + i + 1, Loading Loading
packages/server/src/models/User.ts +10 −0 Original line number Diff line number Diff line Loading @@ -124,9 +124,19 @@ export class User { async modifyStack(modifyBy: number): Promise<any> { const CONFIG = ClientConfigService.getConfig(); await this.update(true); let new_date = new Date(); if (modifyBy > 0) { let cooldown_to_add = 0.0; if (this.pixelStack + modifyBy > CONFIG.canvas.pixel.maxStack) { Logger.debug( `${this.sub} attempted to claim another pixel, but would go over the max stack` ); return; } for (let i = 0; i < modifyBy; i++) { cooldown_to_add += CanvasLib.getPixelCooldown( this.pixelStack + i + 1, Loading