typed-screeps icon indicating copy to clipboard operation
typed-screeps copied to clipboard

Add a new subset of `AnyOwnedStructures`, excluding `KeeperLairs`, etc.

Open DiamondMofeng opened this issue 2 years ago • 0 comments

Brief Description

In the source of @screeps/engine, we can see that StructurePowerBank,StructureKeeperLair,StructureInvaderCore are derived from OwnedStructure prototype. This was designed to support FIND_HOSTILE_STRUCTURES(especially PowerBank) 图片

However, real players can never own those structures (in the official server).

We can add a new union of structures, excluding those unownable structures.

Considering that there is a Game.structures and typing it's value as AnyOwnedStructure is incorrect, it would be good to introduce this new union type.

DiamondMofeng avatar Feb 20 '23 06:02 DiamondMofeng