Skip to content

Commit

Permalink
🤖 Merge PR #69405 [@types/screeps-arena]update to game's current typi…
Browse files Browse the repository at this point in the history
…ng lib version v1.0.6 (for v0.1.18 game) by @AutumnSaury
  • Loading branch information
AutumnSaury committed Apr 29, 2024
1 parent f5f0186 commit 86759ed
Show file tree
Hide file tree
Showing 52 changed files with 1,217 additions and 1,108 deletions.
4 changes: 2 additions & 2 deletions types/screeps-arena/arena/index.d.ts
@@ -1,5 +1,5 @@
/// <reference path="prototypes/index.d.ts" />
/// <reference path="season_alpha/index.d.ts" />

declare module "arena" {
export * from "arena/prototypes";

}
18 changes: 0 additions & 18 deletions types/screeps-arena/arena/prototypes/body-part.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions types/screeps-arena/arena/prototypes/flag.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions types/screeps-arena/arena/prototypes/index.d.ts

This file was deleted.

@@ -0,0 +1,7 @@
/// <reference path="advanced/prototypes/flag.d.ts" />
/// <reference path="advanced/prototypes/body-part.d.ts" />

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
}
@@ -0,0 +1,16 @@
/// <reference path="../../../../../game/prototypes/creep.d.ts" />
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />

declare module "arena/season_alpha/capture_the_flag/advanced/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;

/** The number of ticks until this object disappears */
ticksToDecay: number;
}
}
@@ -0,0 +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";

/** 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
}
}
@@ -0,0 +1,7 @@
/// <reference path="basic/prototypes/flag.d.ts" />
/// <reference path="basic/prototypes/body-part.d.ts" />

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
}
@@ -0,0 +1,16 @@
/// <reference path="../../../../../game/prototypes/creep.d.ts" />
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />

declare module "arena/season_alpha/capture_the_flag/basic/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;

/** The number of ticks until this object disappears */
readonly ticksToDecay: number;
}
}
@@ -0,0 +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";

/** 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
}
}
@@ -0,0 +1,2 @@
/// <reference path="advanced.d.ts" />
/// <reference path="basic.d.ts" />
@@ -0,0 +1,8 @@
/// <reference path="advanced/constants.d.ts" />
/// <reference path="advanced/prototypes/area-effect.d.ts" />
/// <reference path="advanced/prototypes/score-collector.d.ts" />

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";
}
@@ -0,0 +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';
}
@@ -0,0 +1,19 @@
/// <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";

type AreaEffectType =
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 {
/** The effect type */
readonly effect: AreaEffectType;
}
}
@@ -0,0 +1,21 @@
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />
/// <reference path="../../../../../game/prototypes/store.d.ts" />

declare module "arena/season_alpha/collect_and_control/advanced/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 {
/** Whether you have control over this collector */
my?: boolean;

/**The type of the resource this collector accepts */
resourceType: ResourceType;

/** Current collected score number of the owner */
score: number;

/** Total number of score needed to win instantly */
scoreTotal: number;
}
}
@@ -0,0 +1,8 @@
/// <reference path="basic/constants.d.ts" />
/// <reference path="basic/prototypes/area-effect.d.ts" />
/// <reference path="basic/prototypes/score-collector.d.ts" />

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";
}
@@ -0,0 +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';
}
@@ -0,0 +1,17 @@
/// <reference path="../../advanced/constants.d.ts" />

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

type AreaEffectType =
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 {
/** The effect type */
readonly effect: AreaEffectType;
}
}
@@ -0,0 +1,21 @@
/// <reference path="../../../../../game/prototypes/game-object.d.ts" />
/// <reference path="../../../../../game/prototypes/store.d.ts" />

declare module "arena/season_alpha/collect_and_control/basic/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 {
/** Whether you have control over this collector */
my?: boolean;

/**The type of the resource this collector accepts */
resourceType: ResourceType;

/** Current collected score number of the owner */
score: number;

/** Total number of score needed to win instantly */
scoreTotal: number;
}
}
@@ -0,0 +1,2 @@
/// <reference path="advanced.d.ts" />
/// <reference path="basic.d.ts" />
6 changes: 6 additions & 0 deletions types/screeps-arena/arena/season_alpha/index.d.ts
@@ -0,0 +1,6 @@
/// <reference path="capture_the_flag/index.d.ts" />
/// <reference path="collect_and_control/index.d.ts" />

declare module "arena/season-alpha" {

}

0 comments on commit 86759ed

Please sign in to comment.