Jump to content
Sign in to follow this  
Whypay

[Help] Possible to hook into SectorNameGenerator?

Recommended Posts

I would like to create a mod that changes the names of the sectors displayed on the map.

Is it possible to overwrite/extend this function in scripts/lib/sectornamegenerator.lua:

function SectorNameGenerator.generateSectorName(xycountseed)

For example to return the current sector name but with a prefix like this:

return "prefix" .. name

Share this post


Link to post
Share on other sites
SectorNameGenerator.generateSectorName_orig = SectorNameGenerator.generateSectorName
 
function SectorNameGenerator.generateSectorName(xycountseed)
    return "Prefix " .. SectorNameGenerator.generateSectorName_orig(x, y, count, seed)
end

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...