Closed shanemadden closed 4 years ago
Sounds good!
I think we'll also want some methods to match Store.getCapacity(Resource) and getFreeCapacity / getUsedCapacity, since those are new and replace the specific methods like ghodium_capacity
.
Another design question, though: what do we want to do with the Store
type? We could:
HasStore
, and ignore the existence of Store
Store
type, and replace HasStore
with:
trait HasStore {
fn store(&self) -> Store { ... }
}
Store
type & keep existing HasStore
methods as well, for convenienceI'm inclined towards the last option, but any of these or any others could be good?
They added a prototype in order to make a unified interface. It feels a lot like a trait already, so my vote goes to sticking everything in HasStore
.
Screeps 4.0 deprecates
Creep.carry
and the non-.store
storage attributes on a number of structures.CanStoreEnergy
should be removed and all of these structures (and possibly also creeps?) should be added toHasStore
(removingghodium()
/ghodium_capacity()
from nukers,mineral_amount()
from labs etc) to move off of the deprecated properties.