Skip to content

Commit

Permalink
1.1.2 Added Version-Injector
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaimodo committed Nov 23, 2021
1 parent 1e0203e commit b803deb
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 37 deletions.
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# Screeps-Typescript-Starer-Modded
# Screeps21_kAI3

![ ](https://screeps.com/images/logotype-animated.svg)

Expand All @@ -9,8 +8,6 @@ Screeps-Inscribe from ([resir014](https://github.com/resir014/screeps-inscribe))

Logger from ([resir014](https://github.com/resir014/Stonehenge))

Traveler from ([bonzaiferroni](https://github.com/bonzaiferroni/Traveler)) - not working atm.

JS2FlowChart from ([Bogdan-Lyashenko](https://github.com/Bogdan-Lyashenko/js-code-to-svg-flowchart))

## Info 4 JS2Flow
Expand All @@ -19,27 +16,27 @@ JS2Flow throws some errors in the way i use it. i couldn't find out how to use i

## Console Commands

Commands are defined in Consolecommands.ts
Test if they work by typing in
```bash
cc.test()
```
in the Console.
Commands are defined in Consolecommands.ts
Test if they work by typing in

```bash
cc.test()
```

# This is a slightly modded Version, so it fits to my depends. Feel free to use it.
in the Console.

## Helper

| RCL | ROAD | Container | Spawn | Extension | Rampart | Walls | Tower | Storage | Link | Extrakt | Lab | Terminal | Observe | P-Spawn |
| :---: | :-----: | :-------: | :---: | :-------: | :-----: | :---: | :---: | :-----: | :---: | :-----: | :---: | :------: | :-----: | :-----: |
| 1 | 200 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 45k | 5 | 1 | 5 | 300k | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | 135k | 5 | 1 | 10 | 1m | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 4 | 405k | 5 | 1 | 20 | 3m | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 5 | 1.215m | 5 | 1 | 30 | 1b | 1 | 2 | 1 | 2 | 0 | 0 | 0 | 0 | 0 |
| 6 | 3.645m | 5 | 1 | 40 | 3b | 1 | 2 | 1 | 3 | 1 | 3 | 1 | 0 | 0 |
| 7 | 1.0935b | 5 | 1 | 50 | 1t | 1 | 3 | 1 | 4 | 1 | 6 | 1 | 0 | 0 |
| 8 | 9.999b | 5 | 1 | 60 | 3t | 1 | 6 | 1 | 6 | 1 | 10 | 1 | 1 | 1 |
| RCL | ROAD | Container | Spawn | Extension | Rampart | Walls | Tower | Storage | Link | Extrakt | Lab | Terminal | Observe | P-Spawn |
| :-: | :-----: | :-------: | :---: | :-------: | :-----: | :---: | :---: | :-----: | :--: | :-----: | :-: | :------: | :-----: | :-----: |
| 1 | 200 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 45k | 5 | 1 | 5 | 300k | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | 135k | 5 | 1 | 10 | 1m | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 4 | 405k | 5 | 1 | 20 | 3m | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 5 | 1.215m | 5 | 1 | 30 | 1b | 1 | 2 | 1 | 2 | 0 | 0 | 0 | 0 | 0 |
| 6 | 3.645m | 5 | 1 | 40 | 3b | 1 | 2 | 1 | 3 | 1 | 3 | 1 | 0 | 0 |
| 7 | 1.0935b | 5 | 1 | 50 | 1t | 1 | 3 | 1 | 4 | 1 | 6 | 1 | 0 | 0 |
| 8 | 9.999b | 5 | 1 | 60 | 3t | 1 | 6 | 1 | 6 | 1 | 10 | 1 | 1 | 1 |

# Origin from here

Expand Down
2 changes: 1 addition & 1 deletion Screeps-Visual.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "screeps-typescript-starter-modded",
"version": "1.2.0",
"version": "1.2.1",
"description": "Screeps TS starter slightly modded",
"main": "index.js",
"//": "If you add or change the names of destinations in screeps.json, make sure you update these scripts to reflect the changes",
Expand Down Expand Up @@ -70,6 +70,7 @@
"rollup-plugin-nodent": "^0.2.2",
"rollup-plugin-screeps": "^1.0.1",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-version-injector": "^1.3.3",
"rollup-plugin-visualizer": "^5.5.2",
"screeps-profiler": "^2.0.1",
"sinon": "^6.3.5",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import typescript from 'rollup-plugin-typescript2';
import screeps from 'rollup-plugin-screeps';
import visualizer from "rollup-plugin-visualizer";
import json from '@rollup/plugin-json';
import versionInjector from 'rollup-plugin-version-injector';

const Global = `var process = {
env: {
Expand Down Expand Up @@ -41,6 +42,7 @@ export default {
screeps({config: cfg, dryRun: cfg == null}),
visualizer({filename: "Screeps-Visual.html",
sourcemap: true,
template: "treemap"})
template: "treemap"}),
versionInjector()
]
};
1 change: 1 addition & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Game Memory
interface Memory {
version?: string;
date?: string;
uuid: number;
log: any;
}
Expand Down
45 changes: 32 additions & 13 deletions src/tools/Emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,42 @@ export const Emoji = {
};

export const Splash = () => {

try {
const version = process.env.npm_package_version;
if (!Memory.version || Memory.version !== version) {
Memory.version = version;
}
} catch (error) {
console.log(error);
}

const version = `[VI]{version}[/VI]`;
const date = `[VI]{date}[/VI]`;
if (!Memory.version || Memory.version !== version) {
Memory.version = version;
}
if (!Memory.date || Memory.date !== date) {
Memory.date = date;
}
} catch (error) {
console.log(error);
}

console.log(`<p style="color:#AE81FF">
╔═══╗
║╔═╗║
║╚══╗╔══╗╔═╗╔══╗╔══╗╔══╗╔══╗
╚══╗║║╔═╝║╔╝║╔╗║║╔╗║║╔╗║║══╣
║╚═╝║║╚═╗║║ ║║═╣║║═╣║╚╝║╠══║
╚═══╝╚══╝╚╝ ╚══╝╚══╝║╔═╝╚══╝
║║
╚╝
=========================================================
= Version: ${Memory.version} BuildDate: ${Memory.date} =
=========================================================
</p>
`);
};
/**
_____ _____ _____ _____ _____ _____ _____ _____ __ _____ _____
| __| | __ | __| __| _ | __| | |__| | __ | | |
|__ | --| -| __| __| __|__ | | | | | | __ -| -|
|_____|_____|__|__|_____|_____|__| |_____| |_____|_____|_____|__|__|
Version: ${Memory.version}
</p>
`);
};
*/




Binary file modified true
Binary file not shown.

0 comments on commit b803deb

Please sign in to comment.