Annotations
Annotations are special keywords that you can use to change or extend the behavior of existing methods and classes in the base game. You cannot use annotations to modify modded methods or classes.
@wrapMethod(class)
@wrapMethod(SingleplayerMenuGameController)
private func PopulateMenuItemList() {
wrappedMethod(); // This will call the original PopulateMenuItemList
this.AddMenuItem("BUTTON 1", n"OnDebug");
}
// You can use this annotation to chain multiple functions
@wrapMethod(SingleplayerMenuGameController)
private func PopulateMenuItemList() {
wrappedMethod(); // This will run the previous function with this annotation
this.AddMenuItem("BUTTON 2", n"OnDebug");
}
// The result will be two new buttons added to the main menu@addMethod(class)
@replaceMethod(class)
@replaceGlobal()
@addField(class)
Last updated
Was this helpful?