24 lines
635 B
JavaScript
Raw Normal View History

2022-05-16 14:59:55 -04:00
class Mod
2022-05-16 17:31:22 +01:00
{
// Perform these actions before server fully loads
2022-05-16 14:59:55 -04:00
load(container)
{
2022-05-16 17:31:22 +01:00
// get watermarkLocale class from server
2022-05-16 14:59:55 -04:00
const watermarkLocale = container.resolve("WatermarkLocale");
2022-05-16 17:31:22 +01:00
// Replace the getDescription() function with the one below called 'replacementFunction()'
watermarkLocale.getDescription = this.replacementFunction;
}
// not used for this example
2022-05-16 14:59:55 -04:00
delayedLoad(container)
2022-05-16 17:31:22 +01:00
{ return }
// our new replacement function, ready to be used
2022-05-16 14:59:55 -04:00
replacementFunction()
2022-05-16 17:31:22 +01:00
{
return ["SPT AKI, WOW VERY COOL"];
}
}
module.exports = { mod: new Mod() }