1 local http, env, storage
2 local C = minetest.get_color_escape_sequence
4 furrybot.commands.cry = furrybot.solo_roleplay_command("cries")
5 furrybot.commands.laugh = furrybot.solo_roleplay_command("laughs")
6 furrybot.commands.confused = furrybot.solo_roleplay_command("is confused")
7 furrybot.commands.smile = furrybot.solo_roleplay_command("smiles")
8 furrybot.commands.hug = furrybot.interactive_roleplay_command("hugs")
9 furrybot.commands.cuddle = furrybot.interactive_roleplay_command("cuddles")
10 furrybot.commands.kiss = furrybot.interactive_roleplay_command("kisses")
11 furrybot.commands.hit = furrybot.interactive_roleplay_command("hits")
12 furrybot.commands.slap = furrybot.interactive_roleplay_command("slaps")
13 furrybot.commands.beat = furrybot.interactive_roleplay_command("beats")
14 furrybot.commands.lick = furrybot.interactive_roleplay_command("licks")
16 furrybot.commands.marry = furrybot.request_command(function(name, target)
17 if storage:contains(name .. ".partner", target) then
18 furrybot.error_message(name, "You are already married to", storage:get_string(name .. ".partner"))
20 elseif storage:contains(target .. ".partner", name) then
21 furrybot.error_message(name, target .. " is already married to", storage:get_string(target .. ".partner"))
24 furrybot.ping_message(target, name .. " proposes to you. Type !accept to accept or !deny to deny.", furrybot.colors.system)
26 end, function(name, target)
27 storage:set_string(name .. ".partner", target)
28 storage:set_string(target .. ".partner", name)
29 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)
31 furrybot.commands.propose = furrybot.commands.marry
32 furrybot.unsafe_commands.marry = true
33 furrybot.unsafe_commands.propose = true
35 function furrybot.commands.divorce(name)
36 if storage:contains(name .. ".partner") then
37 local partner = storage:get_string(name .. ".partner")
38 storage:set_string(name .. ".partner", "")
39 storage:set_string(partner .. ".partner", "")
40 furrybot.ping_message(name, "divorces from " .. partner .. " :(", furrybot.colors.roleplay)
42 furrybot.error_message(name, "You are not married")
45 furrybot.unsafe_commands.divorce = true
47 function furrybot.commands.partner(name, target)
48 target = target or name
49 if storage:contains(target .. ".partner") then
50 furrybot.ping_message(name, (target == name and "You are" or target .. " is") .. " married to " .. storage:get_string(target .. ".partner"), furrybot.colors.system)
52 furrybot.error_message(name, (target == name and "You are" or target .. " is") .. " not married")
55 furrybot.commands.married = furrybot.commands.partner
57 return function(_http, _env, _storage)
58 http, env, storage = _http, _env, _storage