From 74bf1e32f125045438c6a56a56d79816ac6a7216 Mon Sep 17 00:00:00 2001 From: JArlinghaus <18181026+JArlinghaus@users.noreply.github.com> Date: Sat, 9 May 2020 17:43:35 -0400 Subject: [PATCH] Changed spawning safe mode duration from being a hardcoded value --- lib/game/api/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/game/api/game.js b/lib/game/api/game.js index 257ac40..f73c648 100644 --- a/lib/game/api/game.js +++ b/lib/game/api/game.js @@ -395,7 +395,7 @@ router.post('/place-spawn', auth.tokenAuth, jsonResponse((request) => { }))) : q.when()) .then(() => db['rooms.objects'].removeWhere({$and: [{room: request.body.room}, {user: {$ne: null}}, {type: {$in: _.keys(C.CONSTRUCTION_COST)}}]})) .then(() => db['rooms.objects'].update({$and: [{room: request.body.room}, {type: 'controller'}, {level: 0}]}, - {$set: {user: ""+request.user._id, level: 1, progress: 0, downgradeTime: null, safeMode: gameTime + 20000}})) + {$set: {user: ""+request.user._id, level: 1, progress: 0, downgradeTime: null, safeMode: gameTime + C.SAFE_MODE_DURATION }})) .then(() => db['rooms.objects'].update({$and: [{room: request.body.room}, {type: 'source'}]}, {$set: {invaderHarvested: 0}})) .then(() => db['rooms.objects'].insert(objectsToInsert))