View Issue Details

IDProjectCategoryView StatusLast Update
0009673New Feature RequestsGeneralpublic2017-07-04 03:43
Reporterqaisjp Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0009673: Make cancelEvent take any type of reason

cancelEvent serverside currently supports an optional "reason" string argument, that can be retrieved by getCancelReason

This "reason" argument is server-side only (why?).

I propose this (for both the server and client):

  • allow cancelEvent to take a single mixed argument instead of a string
  • make getCancelReason return that mixed argument instead of just a string

Although this situation is relatively odd, any resource could cancel an event, and return whatever they want (not just a string).

If we also return the resource that canceled the event (nil if it wasn't a resource...), we can determine what kind of "reason" we expect from cancelEvent, and whether we want to act on it or not.

For example, here are two situations:

  • Situation 1: a friends resource
    • myFreeroam resource attempts to warp to a player
    • friends resource cancels event with a reason like { isTargetFriend: false }
    • myFreeroam checks if cancelled, and doesn't know about friends's behaviour, so just doesn't warp the player
  • Situation 2: a permissions resource
    • myFreeroam resource attempts to warp to a player
    • permissions resource cancels event with reason { canSourceWarp: false } or { canTargetAccept: false }
    • myFreeroam checks if cancelled, and knows about permissions's behaviour, so shows feedback right within the freeroam GUI
Additional Information

The use cases seems a little odd, since you'd expect the freeroam resource to do an exports call to the friends or permissions resource.

This is a bit over the top, and is just a random thought.

TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change