]> git.lizzy.rs Git - furrybot.git/blob - marriage.lua
Japanese waifu names
[furrybot.git] / marriage.lua
1 local http, env, storage
2 local C = minetest.get_color_escape_sequence
3
4 furrybot.request_command("marry", "marry another player", function(name, target)
5         if storage:contains(name .. ".partner", target) then
6                 furrybot.error_message(name, "You are already married to", storage:get_string(name .. ".partner"))
7                 return false
8         elseif storage:contains(target .. ".partner", name) then
9                 furrybot.error_message(name, target .. " is already married to", storage:get_string(target .. ".partner"))
10                 return false
11         else
12                 furrybot.ping_message(target, name .. " proposes to you. Type !accept to accept or !deny to deny.", furrybot.colors.system)
13         end
14 end, function(name, target)
15         storage:set_string(name .. ".partner", target)
16         storage:set_string(target .. ".partner", name)
17         furrybot.send("Congratulations, " .. furrybot.ping(name, furrybot.colors.roleplay) .. "&" .. furrybot.ping(target, furrybot.colors.roleplay) .. ", you are married. You may now kiss :).", furrybot.colors.roleplay)
18 end, true)
19
20 furrybot.commands.divorce = {
21         unsafe = true,
22         func = function(name)
23                 if storage:contains(name .. ".partner") then
24                         local partner = storage:get_string(name .. ".partner")
25                         storage:set_string(name .. ".partner", "")
26                         storage:set_string(partner .. ".partner", "")
27                         furrybot.ping_message(name, "divorces from " .. partner .. " :(", furrybot.colors.roleplay)
28                 else
29                         furrybot.error_message(name, "You are not married")
30                 end
31         end,
32 }
33
34 furrybot.commands.partner = {
35         func = function(name, target)
36                 target = target or name
37                 if storage:contains(target .. ".partner") then
38                         furrybot.ping_message(name, (target == name and "You are" or target .. " is") .. " married to " .. storage:get_string(target .. ".partner"), furrybot.colors.system)
39                 else
40                         furrybot.error_message(name, (target == name and "You are" or target .. " is") .. " not married")
41                 end
42         end,
43 }
44
45 return function(_http, _env, _storage)
46         http, env, storage = _http, _env, _storage
47 end