I'm requesting a function that would allow to get all sectors controlled by a faction through influence (client-side and maybe server-side):
local sectors = {Galaxy():getFactionControlledSectors(int factionIndex)}
Why?
Right now on both client & server we can get all sectors that are owned (have stations in them) by a faction (at least the ones that player/alliance know about):
local sectors = {Player():getKnownSectorsOfFaction(int factionIndex)}
But all owned sectors have influence that spreads in a circle shape around them. And currently there is no performance-friendly way to get list of sectors controlled by a faction through influence.
Currently to get that list I have to do the following:
Get all owned sectors of a faction
Get the "influence" stat from their SectorView
Transform this influence value into a radius (which is bigger than it actually is for some reason)
local approximateRadius = math.sqrt(influenceValue / math.pi)
Get all sectors that completely fit in that radius
For each of them call this function:
Galaxy():getControllingFaction(n, m)
It takes 1-1.2 seconds to get this info for 1/7 of a galaxy. Not very fast, but right now there is just no other way to do this.
Suggestion
Rinart73
I'm requesting a function that would allow to get all sectors controlled by a faction through influence (client-side and maybe server-side):
local sectors = {Galaxy():getFactionControlledSectors(int factionIndex)}
Why?
Right now on both client & server we can get all sectors that are owned (have stations in them) by a faction (at least the ones that player/alliance know about):
local sectors = {Player():getKnownSectorsOfFaction(int factionIndex)}
But all owned sectors have influence that spreads in a circle shape around them. And currently there is no performance-friendly way to get list of sectors controlled by a faction through influence.
Currently to get that list I have to do the following:
local approximateRadius = math.sqrt(influenceValue / math.pi)
Galaxy():getControllingFaction(n, m)
It takes 1-1.2 seconds to get this info for 1/7 of a galaxy. Not very fast, but right now there is just no other way to do this.
Link to comment
Share on other sites
0 answers to this suggestion
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now