-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
playerfactions support #1
Comments
Now that there's mailing list support maybe this can be somehow combined with mailing lists? Possibly with simple mailing list sync or lookup API that allows registering dynamic mailing list builders, that would allow easily creating mailing lists for any purpose like for example mailing list for players who
|
I suggest allowing mods to register special mailing lists that, when being selected to be the receiver, executes a function provided by the mod which returns a list of player names. |
Yes, that would something like in bash : |
If you like you could also allow mailing lists to handle more complicated situations without increasing complexity of code: Doing this would allow fully dynamic lists (no need to know list name beforehand), not sure if this is really useful but good to consider this possibility. Basically most significant thing is that instead of this logic: -- mail mod side
if name == "our-vip-recipients" then -- if custom list name is registered
recipients = get_custom_recipient_list["our-vip-recipients"]() -- then execute specific registered function
end
-- other mod / customization side
get_custom_recipient_list["our-vip-recipients"] = function()
return {"name1", "name2", "name3"} -- return names
end would become something like this: -- mail mod side
recipients = get_custom_recipient_list("our-vip-recipients") -- execute all registered functions
-- other mod / customization side
local original_get_custom_recipient_list = get_custom_recipient_list
function get_custom_recipient_list(name)
if name == "our-vip-recipients" then -- if asked list name is our list
return {"name1", "name2", "name3"} -- return names
end
return original_get_custom_recipient_list(name) -- not our list, call through rest of the chain
end Which makes all registered custom lookup functions to run until match is found. This is a lot more useful in some situations but can also cause more complicated issues and conflicts. |
Lacking an ability to send mail to all players who are in the same faction as you.
The text was updated successfully, but these errors were encountered: