Skip to content

Commit a6c047e

Browse files
committed
Update changelog #204,#205
Adds 204,205 to Unreleased section Adds test for #205
1 parent a8f68e6 commit a6c047e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- Updates `ticksToRegeneration` to be optional in `Minerals` ([#204](https://github.com/screepers/typed-screeps/pull/204))
11+
- Updates `level` to be optional in `StructureFactory` ([#205](https://github.com/screepers/typed-screeps/pull/205))
12+
1013
## [3.2.4] - 2021-08-21
1114

1215
### Added

dist/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5554,7 +5554,7 @@ interface StructureFactory extends OwnedStructure<STRUCTURE_FACTORY> {
55545554
* Can be set by applying the PWR_OPERATE_FACTORY power to a newly built factory.
55555555
* Once set, the level cannot be changed.
55565556
*/
5557-
level: number;
5557+
level?: number;
55585558
/**
55595559
* An object with the structure contents.
55605560
*/

dist/screeps-tests.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,10 @@ function atackPower(creep: Creep) {
939939
{
940940
const factory = new StructureFactory("" as Id<StructureFactory>);
941941

942+
if (!factory.level) {
943+
powerCreep.usePower(PWR_OPERATE_FACTORY, factory);
944+
}
945+
942946
creep.transfer(factory, RESOURCE_CELL, 20);
943947
creep.transfer(factory, RESOURCE_OXIDANT, 36);
944948
creep.transfer(factory, RESOURCE_LEMERGIUM_BAR, 16);

0 commit comments

Comments
 (0)