Lua-Modules icon indicating copy to clipboard operation
Lua-Modules copied to clipboard

Check for all forms of display name

Open robbai opened this issue 1 year ago • 2 comments

Summary

Check for alternative storage names of "display name" since they are not always the same

How did you test this change?

/dev

robbai avatar Sep 28 '24 13:09 robbai

not a fan, annotations state that the function is expecting standardPlayer and not match2player or an abitrary table

I've changed it now to only be used where necessary

robbai avatar Sep 29 '24 17:09 robbai

alternative solution (personally do not have a preference, just leaving it here as an option; untested fwiw):

---@param opponent table
---@return boolean
function MatchFunctions._checkForNonEmptyOpponent(opponent)
	return not Opponent.isTbd(Opponent.fromMatch2Record(opponent))
end

hjpalpha avatar Sep 30 '24 07:09 hjpalpha