function rob_opr_base.adjust_anger(name, value)
   local amount = tonumber(value)
   if amount then
      local anger = rob_opr_base.anger
      local new_anger = anger + amount
      print ('boss\'s anger level is '..new_anger)
      if new_anger >= 10 and new_anger < 20 then
         minetest.chat_send_player(name, (minetest.colorize('#49adff', '{I\'m starting to like you.}')))
      elseif new_anger >= 20 and new_anger < 21 then
         minetest.chat_send_player(name, (minetest.colorize('#49adff', '{You know, maybe you have what it takes.}')))
      elseif new_anger >= 90 and new_anger < 21 then
         minetest.chat_send_player(name, (minetest.colorize('#49adff', '{I\'ve about had it with you.}')))
      elseif new_anger >= 95 and new_anger < 96 then
         minetest.chat_send_player(name, (minetest.colorize('#49adff', '{I swear, if you keep this up I will trigger the alarm system, so help me.}')))
      elseif new_anger == 100 then
         minetest.chat_send_player(name, (minetest.colorize('#49adff', '{Good luck, I\'m done with your stupidity}')))
         local player = minetest.get_player_by_name(name)
         local pos = player:get_pos()
         rob_opr_base.trigger_alarm(pos)
      end
      rob_opr_base.anger = new_anger
   end
end

local function cooldown()
   minetest.set_timeofday(0)
   local anger = rob_opr_base.anger
   if anger > 50 then
      anger = anger - 1
   end
   rob_opr_base.anger = anger
   minetest.after(120.0, cooldown)
end

minetest.after(30, cooldown)


--Add a set_time(0) to the cooldown function to keep it night.
