Skip to content

Commit

Permalink
馃 dprint fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Apr 29, 2024
1 parent 86759ed commit 0474990
Show file tree
Hide file tree
Showing 31 changed files with 366 additions and 354 deletions.
1 change: 0 additions & 1 deletion types/screeps-arena/arena/index.d.ts
@@ -1,5 +1,4 @@
/// <reference path="season_alpha/index.d.ts" />

declare module "arena" {

}
Expand Up @@ -4,4 +4,4 @@
declare module "arena/season_alpha/capture_the_flag/advanced" {
export * from "arena/season_alpha/capture_the_flag/advanced/prototypes";
// export * from "arena/season_alpha/capture_the_flag/advanced/constants"; // missing too
}
}
Expand Up @@ -2,11 +2,10 @@
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />

declare module "arena/season_alpha/capture_the_flag/advanced/prototypes" {
import {BodyPartType, GameObject} from "game/prototypes";
import { BodyPartType, GameObject } from "game/prototypes";

/** A separate part of creep body */
export class BodyPart extends GameObject {

/** The type of the body part */
type: BodyPartType;

Expand Down
@@ -1,11 +1,11 @@
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />

declare module "arena/season_alpha/capture_the_flag/advanced/prototypes" {
import {GameObject} from "game/prototypes";
import { GameObject } from "game/prototypes";

/** A flag is a key game object for this arena. Capture all flags to win the game */
export class Flag extends GameObject {
/** Equals to true or false if the flag is owned. Returns undefined if it is neutral */
readonly my?: boolean
readonly my?: boolean;
}
}
Expand Up @@ -4,4 +4,4 @@
declare module "arena/season_alpha/capture_the_flag/basic" {
export * from "arena/season_alpha/capture_the_flag/basic/prototypes";
// export * from "arena/season_alpha/capture_the_flag/basic/constants"; // looks like file's missing
}
}
Expand Up @@ -2,11 +2,10 @@
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />

declare module "arena/season_alpha/capture_the_flag/basic/prototypes" {
import {BodyPartType, GameObject} from "game/prototypes";
import { BodyPartType, GameObject } from "game/prototypes";

/** A separate part of creep body */
export class BodyPart extends GameObject {

/** The type of the body part */
readonly type: BodyPartType;

Expand Down
@@ -1,11 +1,11 @@
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />

declare module "arena/season_alpha/capture_the_flag/basic/prototypes" {
import {GameObject} from "game/prototypes";
import { GameObject } from "game/prototypes";

/** A flag is a key game object for this arena. Capture all flags to win the game */
export class Flag extends GameObject {
/** Equals to true or false if the flag is owned. Returns undefined if it is neutral */
readonly my?: boolean
readonly my?: boolean;
}
}
@@ -1,2 +1,2 @@
/// <reference path="advanced.d.ts" />
/// <reference path="basic.d.ts" />
/// <reference path="basic.d.ts" />
Expand Up @@ -5,4 +5,4 @@
declare module "arena/season_alpha/collect_and_control/advanced" {
export * from "arena/season_alpha/collect_and_control/advanced/prototypes";
export * from "arena/season_alpha/collect_and_control/advanced/constants";
}
}
@@ -1,8 +1,8 @@
declare module "arena/season_alpha/collect_and_control/advanced/constants" {
export const RESOURCE_SCORE_X = 'score_x';
export const RESOURCE_SCORE_Y = 'score_y';
export const RESOURCE_SCORE_Z = 'score_z';
export const EFFECT_FREEZE = 'freeze';
export const EFFECT_HEAL = 'heal';
export const EFFECT_DAMAGE = 'damage';
export const RESOURCE_SCORE_X = "score_x";
export const RESOURCE_SCORE_Y = "score_y";
export const RESOURCE_SCORE_Z = "score_z";
export const EFFECT_FREEZE = "freeze";
export const EFFECT_HEAL = "heal";
export const EFFECT_DAMAGE = "damage";
}
@@ -1,15 +1,18 @@
/// <reference path="../constants.d.ts" />
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />


declare module "arena/season_alpha/collect_and_control/advanced/prototypes" {
import { GameObject } from "game/prototypes";
import { EFFECT_FREEZE, EFFECT_DAMAGE, EFFECT_HEAL } from "arena/season_alpha/collect_and_control/advanced/constants";
import {
EFFECT_DAMAGE,
EFFECT_FREEZE,
EFFECT_HEAL,
} from "arena/season_alpha/collect_and_control/advanced/constants";

type AreaEffectType =
typeof EFFECT_FREEZE |
typeof EFFECT_DAMAGE |
typeof EFFECT_HEAL;
| typeof EFFECT_FREEZE
| typeof EFFECT_DAMAGE
| typeof EFFECT_HEAL;

/** An object that applies an effect of the specified type to all creeps at the same time */
export class AreaEffect extends GameObject {
Expand Down
Expand Up @@ -2,7 +2,7 @@
/// <reference path="../../../../../game/prototypes/store.d.ts" />

declare module "arena/season_alpha/collect_and_control/advanced/prototypes" {
import {GameObject, ResourceType} from "game/prototypes";
import { GameObject, ResourceType } from "game/prototypes";

/** Key game object for this arena. Transfer the corresponding resource to the collector to win the game */
export class ScoreCollector extends GameObject {
Expand Down
Expand Up @@ -5,4 +5,4 @@
declare module "arena/season_alpha/collect_and_control/basic" {
export * from "arena/season_alpha/collect_and_control/basic/prototypes";
export * from "arena/season_alpha/collect_and_control/basic/constants";
}
}
@@ -1,6 +1,6 @@
declare module "arena/season_alpha/collect_and_control/basic/constants" {
export const RESOURCE_SCORE = 'score';
export const EFFECT_FREEZE = 'freeze';
export const EFFECT_HEAL = 'heal';
export const EFFECT_DAMAGE = 'damage';
export const RESOURCE_SCORE = "score";
export const EFFECT_FREEZE = "freeze";
export const EFFECT_HEAL = "heal";
export const EFFECT_DAMAGE = "damage";
}
Expand Up @@ -2,12 +2,16 @@

declare module "arena/season_alpha/collect_and_control/basic/prototypes" {
import { GameObject } from "game/prototypes";
import { EFFECT_FREEZE, EFFECT_DAMAGE, EFFECT_HEAL } from "arena/season_alpha/collect_and_control/advanced/constants"; // doesn't seem right
import {
EFFECT_DAMAGE,
EFFECT_FREEZE,
EFFECT_HEAL,
} from "arena/season_alpha/collect_and_control/advanced/constants"; // doesn't seem right

type AreaEffectType =
typeof EFFECT_FREEZE |
typeof EFFECT_DAMAGE |
typeof EFFECT_HEAL;
| typeof EFFECT_FREEZE
| typeof EFFECT_DAMAGE
| typeof EFFECT_HEAL;

/** An object that applies an effect of the specified type to all creeps at the same time */
export class AreaEffect extends GameObject {
Expand Down
Expand Up @@ -2,7 +2,7 @@
/// <reference path="../../../../../game/prototypes/store.d.ts" />

declare module "arena/season_alpha/collect_and_control/basic/prototypes" {
import {GameObject, ResourceType} from "game/prototypes";
import { GameObject, ResourceType } from "game/prototypes";

/** Key game object for this arena. Transfer the corresponding resource to the collector to win the game */
export class ScoreCollector extends GameObject {
Expand Down
1 change: 0 additions & 1 deletion types/screeps-arena/arena/season_alpha/index.d.ts
Expand Up @@ -2,5 +2,4 @@
/// <reference path="collect_and_control/index.d.ts" />

declare module "arena/season-alpha" {

}
38 changes: 19 additions & 19 deletions types/screeps-arena/game/constants.d.ts
Expand Up @@ -15,13 +15,13 @@ declare module "game/constants" {
export const ERR_NO_BODYPART = -12;
export const ERR_NOT_ENOUGH_EXTENSIONS = -6;

export const MOVE = 'move';
export const RANGED_ATTACK = 'ranged_attack';
export const HEAL = 'heal';
export const ATTACK = 'attack';
export const CARRY = 'carry';
export const TOUGH = 'tough';
export const WORK = 'work';
export const MOVE = "move";
export const RANGED_ATTACK = "ranged_attack";
export const HEAL = "heal";
export const ATTACK = "attack";
export const CARRY = "carry";
export const TOUGH = "tough";
export const WORK = "work";

export const TOP = 1;
export const TOP_RIGHT = 2;
Expand All @@ -40,10 +40,10 @@ declare module "game/constants" {

export const RANGED_ATTACK_POWER = 10;
export const RANGED_ATTACK_DISTANCE_RATE: {
0: 1,
1: 1,
2: 0.4,
3: 0.1
0: 1;
1: 1;
2: 0.4;
3: 0.1;
};
export const ATTACK_POWER = 30;
export const HEAL_POWER = 12;
Expand All @@ -56,7 +56,7 @@ declare module "game/constants" {
export const HARVEST_POWER = 2;
export const BUILD_POWER = 5;

export const OBSTACLE_OBJECT_TYPES: ['creep', 'tower', 'constructedWall' ,'spawn' ,'extension' ,'link'];
export const OBSTACLE_OBJECT_TYPES: ["creep", "tower", "constructedWall", "spawn", "extension", "link"];

export const TOWER_ENERGY_COST = 10;
export const TOWER_RANGE = 50;
Expand All @@ -71,13 +71,13 @@ declare module "game/constants" {
export const TOWER_COOLDOWN = 10;

export const BODYPART_COST: {
work: 100,
move: 50,
carry: 50,
attack: 80,
ranged_attack: 150,
heal: 250,
tough: 10
work: 100;
move: 50;
carry: 50;
attack: 80;
ranged_attack: 150;
heal: 250;
tough: 10;
};

export const MAX_CREEP_SIZE = 50;
Expand Down
2 changes: 0 additions & 2 deletions types/screeps-arena/game/index.d.ts
Expand Up @@ -4,7 +4,5 @@
/// <reference path="visual.d.ts" />
/// <reference path="prototypes/index.d.ts" />


declare module "game" {

}
2 changes: 1 addition & 1 deletion types/screeps-arena/game/path-finder.d.ts
Expand Up @@ -74,7 +74,7 @@ declare module "game/path-finder" {
clone(): CostMatrix;
}

export type Goal = Position | {pos: Position, range: number};
export type Goal = Position | { pos: Position; range: number };

/**
* Find an optimal path between origin and goal.
Expand Down

0 comments on commit 0474990

Please sign in to comment.