I'd say that the algorithm should be "previous safe mode cooldown time + 200 ticks". Of course, it could be a way of playing since every bug gets its own use, as long as they don't make some players absolutely invulnerable - which I believe wouldn't happen, this tactic actually hits the best player back. Or in a way we can accept the assertion of nuke landing only available in other players' rooms.
Your code is not executed on shard where you don't have any creeps or structures. In order to clear the memory on another shard, you may send a scout to the target shard via portals and maybe wait couple of minutes. This would activate your code on the target shard and you'll be able to clear the memory.
As for displaying excess CPU, it should be fixed for you currently.
You need to create a list of sources in Memory and add a free spot counter there. Usually the source ID is stored in creep.memory and creeps only harvest resources from it.
Perhaps it will also help you:
const target = creep.pos.findClosestByRange(FIND_SOURCES_ACTIVE);
const count = source.pos.findInRange(FIND_CREEPS, 1).length;
(RC1<RC2 || RL1<RL2).
I think this is a great idea, but you need to add disabling this functionality for experts:
(RC1<RC2 || RL1<RL2) && (RC1 < 4) && (RL1 < 8).
You may want to join the discord server https://discord.gg/screeps and ask for help in the #world-help channel. There people can provide in-depth help easily
Anyways to give you a brief answer, you'll want to use FIND_TOMBSTONES instead of FIND_DROPPED_RESOURCES. Then filter tombstones with store.* values matching what resources you want. https://docs.screeps.com/api/#Room.find
@artch could we please update the documentation to reflect this change? I'm not sure how somebody would know about this other than finding this article or perhaps reading screeps source code.
https://docs.screeps.com/api/#Game.cpu.generatePixel
[edit] Sorry, I didn't read the full thread but it sounds like intents are no longer cancelled. Docs are up to date then. Thx.
I think the Dev's are targeting a tick duration of 5 seconds. So 11 was quite bad, likely a something went wrong. I think the devs are kinda best effort on fixing these. They'll usually poke / restart or whatever during their workday but otherwise a server might remain quite bad for a day or more on a weekend.