API:CharacterSettingsHandleDeletedCharacter
From RoR Wiki
UI Lua API · CharacterSettings functions
Version: WAR 1.4.8
Finishes the UI settings part of a character deletion, optionally deleting the character's UI settings folder.
CharacterSettingsHandleDeletedCharacter(deleteFiles)
Arguments
- deleteFiles
boolean–trueto delete the deleted character's UI settings folder,falseto keep it.
Returns
Nothing.
Details
- When a character is deleted on the character select screen, the client loads that character's UI settings and fires
SystemData.Events.CHARACTER_SETTINGS_ON_CHARACTER_DELETED. This function ends that state. - It only has an effect while that state is active. Otherwise it does nothing.
- With
deleteFiles = truethe deleted character's settings folder is deleted with everything in it. In both cases the loaded settings of the deleted character are unloaded. deleteFilesmust be a real boolean. Passingnilor a number raises an Invalid Parameters error.
Errors
None besides the generic Invalid Parameters message when the argument is not a boolean.
Example
From ea_uiprofileswindow/source/characterdeletedhandler.lua, after asking the player:
function EA_UiProfilesCharacterDeleteHandler.OnDeleteUIDataYes()
-- End handling and delete the data.
CharacterSettingsHandleDeletedCharacter( true )
DestroyWindow( "EA_Window_UiProfilePopupScreen" )
end
function EA_UiProfilesCharacterDeleteHandler.OnDeleteUIDataNo()
-- End handling and don't delete the data.
CharacterSettingsHandleDeletedCharacter( false )
DestroyWindow( "EA_Window_UiProfilePopupScreen" )
end
