Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new subset of AnyOwnedStructures, excluding KeeperLairs, etc. #229

Open
DiamondMofeng opened this issue Feb 20, 2023 · 0 comments
Open
Labels
BREAKING CHANGE A breaking change would be introduced enhancement good first issue Good for newcomers

Comments

@DiamondMofeng
Copy link
Member

DiamondMofeng commented Feb 20, 2023

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 DiamondMofeng added enhancement good first issue Good for newcomers BREAKING CHANGE A breaking change would be introduced labels Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE A breaking change would be introduced enhancement good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant