PTR Changelog 2019-06-24: Store and market
-
Code deployed to PTR doesn't match PTR branch on github, creep to creep transfer broken on currently deployed code. Line 25 of function prevents transfer to anything not a structure.
if(!register.structures[target.id] || !utils.capacityForResource(data(target.id), resourceType)) { return C.ERR_INVALID_TARGET; }
-
When iterating through
Storage.store
(or any other.store
) viafor (var key in room.storage.store)
one of the keys returned is.toString
function, which I think it should not be returned.
-
@demawi said in PTR Changelog 2019-06-24: Store and market:
and PowerCreeps can not withdraw generally also with a OK result.. but using GENERATE_OPS power works
their carryCapacity is undefined..
Edit: ops consuming powers don't seem to work (at least OPERATE_EXTENSION). it returns with -6 ERR_NOT_ENOUGH_RESOURCES
Still an issue. Without PowerCreeps also factories can hardly be tested
-
tombstone-pickup and usePower.PWR_OPERATE_FACTORY now working... but still having problems with PWR_OPERATE_EXTENSION it returns 0 but nothing happens (no cooldown nor extensions will be filled)
-
PTR is updated with the latest fixes. Thanks for your reports!
-
I think we may want to create an official reverse shim before moving the
.store
to MMO.I had focused on whether the new
.store
would be backward compatible with the old plainObject
. As far as I can tell that is the case. However, I discovered another failure that I fear might be quite common. In my case I was using something likeif(!!struct.store)
to change creep behavior when distributing energy among my structures. The new.store
property didn't break my code (no errors) but my creeps stopped filling extensions.I worry that other players will get frustrated if they run into a similar issue. If we had an official snippet that might help a frustrated player quickly avoid the change to see if their problem goes away (prove to themselves that it's not the new
.store
at fault).I'm imagining something like mirroring
.store
to.cargo
and removing.store
from the structures that didn't have it previously. If.cargo
is the wrong color of bikeshed it's an easy find replace in the snippet to pick a new one.Also the new name makes a clear verification path. Change all of your code to use
.cargo
instead of.store
fixing it along the way. Once you no longer refer to.store
anywhere remove the shim and Replaces/\.cargo/.store/g
.if(globals.Store) { for (klass of [StructureExtension, StructureStorage ...]) { Object.setProperty( klass.prototype, 'cargo', Object.getOwnPropertyDescriptor(klass.prototype, 'store'); } for (klass of [StructureExtension, ...]) { delete klass.prototype.store; Object.setProperty( klass.prototype, 'energy', { get() { return this.cargo? this.cargo.energy: 0; } } ) } } // also clean up non-energy properties in StructurePowerSpawn, StructureLab, and StructureNuker
-
This update has been deployed to
ptr
private server branch (version4.0.0-beta.1
) on both npm and Steam:npm install screeps@ptr
Please note that this change includes backwards-incompatible data migration! It will upgrade your
db.json
file permanently on the first launch. New Steam client (currently inpublic-test-realm
beta branch) will only connect to servers with version4.0.0-beta.1
and later. After this change goes to production, Steam clients will no longer be able to connect to3.x.x
server version.
-
The release date of this feature: October 15. It will go live to production along with all other planned features.
-
Seems to few market orders for the compressed minerals? Most of the bars dont have any active buy orders. Probably due to its now profitable to buy normal minerals, compress and then sell them again.
-
@geir1983 said in PTR Changelog 2019-06-24: Store and market:
Seems to few market orders for the compressed minerals? Most of the bars dont have any active buy orders. Probably due to its now profitable to buy normal minerals, compress and then sell them again.
I think we should wait for the market to adjust to cut down on the profit margin from buying minerals, barring, and selling before changing anything.
All the commodities are also mineral sinks and it seems still relatively few people are touching them yet. That'll provide other sinks beyond bars.