1) Eliminated conflict between regen mode sleep commands and custom exits that require sleeping

master
Durel 7 years ago
parent 1962924765
commit 43598fc8bc

@ -89,7 +89,7 @@ dbot.version : Module to track version and changelog information and update the
save_state="y" save_state="y"
date_written="2017-08-12 08:45:15" date_written="2017-08-12 08:45:15"
requires="4.98" requires="4.98"
version="2.0032" version="2.0033"
> >
<description trim="y"> <description trim="y">
<![CDATA[ <![CDATA[
@ -17686,6 +17686,13 @@ function inv.regen.onSleep(sleepLoc)
local retval = DRL_RET_SUCCESS local retval = DRL_RET_SUCCESS
local sleepCmd
if (sleepLoc == nil) or (sleepLoc == "") then
sleepCmd = "sleep"
else
sleepCmd = "sleep " .. sleepLoc
end -- if
if (inv.config.table.isRegenEnabled) then if (inv.config.table.isRegenEnabled) then
if (inv.regen.pkg ~= nil) then if (inv.regen.pkg ~= nil) then
@ -17693,12 +17700,13 @@ function inv.regen.onSleep(sleepLoc)
retval = DRL_RET_BUSY retval = DRL_RET_BUSY
else else
inv.regen.pkg = {} inv.regen.pkg = {}
inv.regen.pkg.sleepLoc = sleepLoc inv.regen.pkg.sleepCmd = sleepCmd
wait.make(inv.regen.onSleepCR) wait.make(inv.regen.onSleepCR)
end -- if end -- if
else else
check (Send("sleep " .. (sleepLoc or ""))) dbot.info("FIXME DEBUG: sending sleep command \"" .. sleepCmd .. "\"")
check (Send(sleepCmd))
end -- if end -- if
return retval return retval
@ -17712,7 +17720,7 @@ function inv.regen.onSleepCR()
return DRL_RET_INTERNAL_ERROR return DRL_RET_INTERNAL_ERROR
end -- if end -- if
local sleepCmd = "sleep " .. inv.regen.pkg.sleepLoc local sleepCmd = inv.regen.pkg.sleepCmd
-- First look if the user has at least one item providing the regeneration effect. Get an ID array -- First look if the user has at least one item providing the regeneration effect. Get an ID array
-- for all regen items (currently just regen rings have this effect.) -- for all regen items (currently just regen rings have this effect.)

Loading…
Cancel
Save