Refactor calendar context functions to use parameter aliases for improved clarity

This commit is contained in:
2025-05-18 00:50:42 +02:00
parent 5f352cbfbe
commit 9ee4bb792c
13 changed files with 72 additions and 104 deletions

View File

@@ -1,13 +1,16 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param monthOffset CalendarContextSelectEvent
---@param -1
---@param 0
---@param 1
---@param nil CalendarContextSelectEvent
---@param day number
---@param index number
---@return boolean canReport
---Returns whether the player can report an event invitation as spam. If all arguments are omitted, uses the event selected by CalendarContextSelectEvent.
function CalendarContextEventCanComplain(monthOffset, -1, 0, 1, nil, day, index) end
---@alias monthOffset
---| -1 month preceding the calendar's current month
---| 0 The calendar's current month (i.e. same month as CalendarGetMonth())
---| 1 month after the calendar's current month
---| nil Use the event selected by CalendarContextSelectEvent and ignore further arguments
---@param monthOffset monthOffset
---@param day number
---@param index number
---@return boolean canReport
---Returns whether the player can report an event invitation as spam. If all arguments are omitted
---uses the event selected by CalendarContextSelectEvent.
function CalendarContextEventCanComplain(monthOffset, day, index) end