File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments