@arsdragonfly not like I can do something with the code you provided... well, I'll try to build the minimal reproduction code myself.
Group Details Private
Group for members of the CoPS alliance. If you are interested in joining, join #cops_public on the slack.
PTR Changelog 2019-12-21
This post describes changes on the Public Test Realm.
Added new method
Game.map.getRoomStatusto determine is the room located in Novice or Respawn Area (see discussion). This outdates
Game.map.isRoomAvailablewhich is deprecated now.
Game.map.isRoomProtectedhas been removed since it's been deprecated long time ago.
Added UI option to hide the link to Steam profile (see discussion).
Changed error codes of
StructureNuker.launchNuke: now it returns
ERR_INVALID_TARGETif either source room or target room is part of a Novice or Respawn Area
Changed error codes of
Room.createConstructionSite: now it returns
ERR_NOT_OWNERif the room is owned or reserved by another player.
Creep.upgradeControllerso that controller level-up happens on the same tick when
Changed pathfinding default value of
heuristicWeightfrom 1 to 1.2 for better performance. This affects
Room.nameproperty is now immutable.
Changed behavior or NPC invaders, now they shouldn't attack structures which are not on their way.
Fixed some edge case inconsistencies in
This update is deployed to
ptrprivate server branch (version
4.1.0-beta.1) on both npm and Steam:
npm install screeps@ptr
RE: claimController not attacking downgrade timer of opponent controller
@just-j we'll fix this tip, thanks.
5 CLAIM parts rule is no longer a thing, as well as attacking controllers with
Creep.claimController. Currently, the only way to accelerate the downgrade process is
Creep.attackControllermethod. Both are documented, just like every method in the game API: https://docs.screeps.com/api/
RE: The repair command returned OK, but repair never happened.
construction of a previously placed construction site should fail if the RCL isn't high enough?
Bad idea. We had this behavior some time ago and faced the exact same issue as you describe now, just for another method (
.repair). But it was even worse because (unlike your case) checking structures availability based on controller's level is not a trivial task.
AND/OR, the repair command should at least return an ERR_CODE so that my creep can move on to a different task.
No, it should not. The
OKresult doesn't mean that the operation has been executed successfully, what it does mean is that it has been scheduled successfully (which explicitly stated in the documentation). Players supposed to write their own target selection (filtering and selecting according to their own strategies), and the documentation contains a correct sample of it. Handling edge cases is something to be done by players, not instead of players.