Skip to content

Commit

Permalink
settings consolidation, header added to first compiled file
Browse files Browse the repository at this point in the history
  • Loading branch information
bencbartlett committed Mar 22, 2018
1 parent 8851b57 commit 98faaa7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
14 changes: 13 additions & 1 deletion src/console/globals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
// Useful functions
//
// ___________________________________________________________
//
// _____ _ _ _______ ______ _______ _____ __ _ ______
// | | \ / |______ |_____/ | | | | | \ | | \
// |_____| \/ |______ | \_ | | | __|__ | \_| |_____/
//
// _______________________ Screeps AI ________________________
//
//
// Overmind repository: github.com/bencbartlett/overmind
//

declare function deref(ref: string): RoomObject | null;

global.deref = function (ref: string): RoomObject | null { // dereference any object from identifier; see ref in RoomObjects
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
'use strict';
// Import global settings and prototypes
import './console/globals';
import './settings/settings_user';
import './prototypes/prototypes_Creep';
import './prototypes/prototypes_Flag';
import './prototypes/prototypes_RoomObject';
Expand All @@ -25,6 +24,7 @@ import './prototypes/prototypes_Room';
import './prototypes/prototypes_Structures';
import './prototypes/prototypes_other';
import './tasks/prototypes';
import './settings/settings_user';
// Configuration, logging, and profiling
import {log} from './lib/logger/log';
import {sandbox} from './sandbox';
Expand Down
10 changes: 0 additions & 10 deletions src/settings/do-not-modify.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/settings/settings_user.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Global settings file containing player information

import {overmindSignature} from './do-not-modify';

function getUsername(): string {
for (let i in Game.rooms) {
let room = Game.rooms[i];
Expand Down Expand Up @@ -31,6 +29,8 @@ 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'; // <DO-NOT-MODIFY> see license for details

let suffix = ''; // Put your signature suffix here; will be signed as "Overmind Screeps AI: <suffix>"

export var signature = overmindSignature + (suffix ? ': ' + suffix : ''); // <DO-NOT-MODIFY> see license for details
Expand Down

0 comments on commit 98faaa7

Please sign in to comment.