diff --git a/src/prototypes/prototypes_Room.ts b/src/prototypes/prototypes_Room.ts index 08567eadf..f6d38267e 100644 --- a/src/prototypes/prototypes_Room.ts +++ b/src/prototypes/prototypes_Room.ts @@ -1,7 +1,6 @@ // Room prototypes - commonly used room properties and methods -import {myUsername} from '../settings/settings_user'; -import {overmindSignature} from '../settings/do-not-modify'; +import {myUsername, signature} from '../settings/settings_user'; // Logging ============================================================================================================= Object.defineProperty(Room.prototype, 'print', { @@ -26,7 +25,7 @@ Object.defineProperty(Room.prototype, 'reservedByMe', { Object.defineProperty(Room.prototype, 'signedByMe', { get() { - return this.controller && this.controller.sign && this.controller.sign.text == overmindSignature; + return this.controller && this.controller.sign && this.controller.sign.text == signature; }, }); diff --git a/src/prototypes/prototypes_Structures.ts b/src/prototypes/prototypes_Structures.ts index 110835fcb..3bdeab957 100644 --- a/src/prototypes/prototypes_Structures.ts +++ b/src/prototypes/prototypes_Structures.ts @@ -2,8 +2,7 @@ // General structure prototypes ======================================================================================== -import {overmindSignature} from '../settings/do-not-modify'; -import {myUsername} from '../settings/settings_user'; +import {myUsername, signature} from '../settings/settings_user'; import {DirectiveLabMineral} from '../directives/logistics/directive_labMineralType'; Object.defineProperty(StructureContainer.prototype, 'isPassible', { @@ -44,7 +43,7 @@ Object.defineProperty(StructureController.prototype, 'reservedByMe', { Object.defineProperty(StructureController.prototype, 'signedByMe', { get: function () { - return this.sign && this.sign.text == overmindSignature; + return this.sign && this.sign.text == signature; }, }); diff --git a/src/settings/settings_user.ts b/src/settings/settings_user.ts index d6a4b9d30..003f2fc87 100644 --- a/src/settings/settings_user.ts +++ b/src/settings/settings_user.ts @@ -29,7 +29,7 @@ export var myUsername: string = getUsername(); // Your username // will eventually include features limiting aggression toward new players on public servers and preferably targeting // other bots. -var overmindSignature = 'Overmind Screeps AI'; // see license for details +let overmindSignature = 'Overmind Screeps AI'; // see license for details let suffix = ''; // Put your signature suffix here; will be signed as "Overmind Screeps AI: " diff --git a/src/tasks/task_signController.ts b/src/tasks/task_signController.ts index 58d6c2e8f..e3073c448 100644 --- a/src/tasks/task_signController.ts +++ b/src/tasks/task_signController.ts @@ -1,6 +1,6 @@ import {Task} from './Task'; import {profile} from '../profiler/decorator'; -import {overmindSignature} from '../settings/do-not-modify'; +import {signature} from '../settings/settings_user'; export type signControllerTargetType = StructureController; export const signControllerTaskName = 'signController'; @@ -19,11 +19,11 @@ export class TaskSignController extends Task { isValidTarget() { let controller = this.target; - return (!controller.sign || controller.sign.text != overmindSignature); + return (!controller.sign || controller.sign.text != signature); } work() { - return this.creep.signController(this.target, overmindSignature); + return this.creep.signController(this.target, signature); } }