Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added novice and respawn zones to runtimeData #28

Closed
wants to merge 1 commit into from

Conversation

SyluxImmortal
Copy link

@SyluxImmortal SyluxImmortal commented Apr 16, 2018

This caches the novice and respawn zone values and places them into runtimeData each tick. This cache is cleared once a tick, but could be setup to cache until the nearest novice/respawn zone will expire. The reason I didn't set it up this way is because I do not know the exact procedures on novice/respawn zone creation, so I do not know if they can invalidate the cache.

I have not tested this with IVM, but a quick glance through the ivm branch suggests it should work the same way, but I could be very wrong on that.

This is an attempted revision of this concept:
screeps/engine#88

This is the PR to access these dates:
screeps/engine#89

It's worth noting that some other files could be refactored to use this data. The primary example being the nuker structure.

@artch
Copy link
Contributor

artch commented Apr 16, 2018

Unfortunately, we're not accepting PRs that introduce performance-sensitive functionality to the low level runtime/processor driver loops such as additional direct database requests. Properly optimizing them in our main world cluster is very sophisticated, and we don't want to differentiate community server driver and our cluster driver too much if we're not able to merge them easily.

This functionality will probably be introduced in official patches in the future, thank you for your contribution anyway.

@artch artch closed this Apr 16, 2018
laverdet pushed a commit to laverdet/driver that referenced this pull request Oct 22, 2018
This change properly applies the `costCallback` for `RoomPosition#findClosestByPath`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants