Skip to content

2.5.0 code changes

Solanya edited this page Apr 16, 2023 · 3 revisions

Some system changes in the latest Total RP 3 version will be breaking commonly used functions, this should help fixing issues arising from these in third party modules.

  • Old function >
    • New function

Events

Firing TRP event

  • TRP3_API.events.fireEvent(TRP3_API.events.EVENT_NAME, ...) >
    • TRP3_Addon:TriggerEvent(TRP3_Addon.Events.EVENT_NAME, ...)

Registering TRP event

  • TRP3_API.events.listenToEvent(TRP3_API.events.EVENT_NAME, ...) >
    • TRP3_API.RegisterCallback(TRP3_Addon, TRP3_Addon.Events.EVENT_NAME, ...)

Registering game event

  • TRP3_API.utils.event.registerHandler("GAME_EVENT", function(...) [...] end) >
    • TRP3_API.RegisterCallback(TRP3_API.GameEvents, "GAME_EVENT", function(_, ...) [...] end)

/trp3 roll event

  • "TRP3_ROLL" >
    • "DICE_ROLL" or TRP3_Addon.Events.DICE_ROLL

Colors

Nobody seemed to rely on the Color and ColorManager classes from Ellyb, but if you did, see totalRP3/Core/Color.lua and totalRP3/Core/ColorData.lua for the new functions and color arrays.

Clone this wiki locally