exaV / screeps-kotlin-types

Screep's Kotlin type definitions
MIT License
17 stars 18 forks source link

Structure interface #40

Closed exaV closed 5 years ago

exaV commented 5 years ago

Allows EnergyContainer and Store to be used like Structures.

exaV commented 5 years ago

E.g. This allows to have val energyProviders : Array<EnergyContainer which contains both StructureSpawn and StructureExtension in a way that still allows creeps to transfer to them. The last bit was previously not possible because we could not transfer to an EnergyContainer.

magnusesp commented 5 years ago

Why do you override the functions in Structure, when they are identically defined in IStructure?

exaV commented 5 years ago

Good catch. I don't.