Jump to content

[Help] Possible to hook into SectorNameGenerator?


Whypay

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
Link to comment
Share on other sites

SectorNameGenerator.generateSectorName_orig = SectorNameGenerator.generateSectorName
 
function SectorNameGenerator.generateSectorName(xycountseed)
    return "Prefix " .. SectorNameGenerator.generateSectorName_orig(x, y, count, seed)
end
  • Thanks 1
Link to comment
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
×
×
  • Create New...