Skip to content
Snippets Groups Projects
Commit bcd21655 authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'others_work_incorporated' into 'master'

Others work incorporated

Ported some of Marson's old work about autoexplore. Is that ever a bad thing?
parents 4c0c76e8 08a377c6
No related branches found
No related tags found
No related merge requests found
......@@ -228,7 +228,7 @@ function _M:runStep()
ret, msg = self:runCheck()
if not ret then
self:runStop(msg)
return false
return true
end
if self.running.busy and self.running.busy.no_energy then
return self:runStep()
......
......@@ -374,9 +374,15 @@ function _M:act()
end
-- Resting ? Running ? Otherwise pause
if not self:restStep() and not self:runStep() and self.player and self:enoughEnergy() then
game.paused = true
if game.uiset.logdisplay:getNewestLine() ~= "" then game.log("") end
if self.player and self:enoughEnergy() then
if self:restStep() then
while self:enoughEnergy() do self:restStep() end
elseif self:runStep() then
while self:enoughEnergy() do self:runStep() end
else
game.paused = true
if game.uiset.logdisplay:getNewestLine() ~= "" then game.log("") end
end
elseif not self.player then
self:useEnergy()
end
......@@ -1017,6 +1023,20 @@ function _M:restCheck()
self.resting.wait_cooldowns = nil
-- Enter recall waiting rest if we are at max already
if self.resting.cnt == 0 and self:hasEffect(self.EFF_RECALL) then
self.resting.wait_recall = true
end
if self.resting.wait_recall then
if self:hasEffect(self.EFF_RECALL) then
return true
end
end
self.resting.wait_recall = nil
-- Enter full recharge rest if we waited for cooldowns already
if self.resting.cnt == 0 then
self.resting.wait_powers = true
......@@ -1034,18 +1054,6 @@ function _M:restCheck()
self.resting.wait_powers = nil
-- Enter recall waiting rest if we are at max already
if self.resting.cnt == 0 and self:hasEffect(self.EFF_RECALL) then
self.resting.wait_recall = true
end
if self.resting.wait_recall then
if self:hasEffect(self.EFF_RECALL) then
return true
end
end
self.resting.wait_recall = nil
self.resting.rested_fully = true
return false, "all resources and life at maximum"
......
......@@ -92,7 +92,10 @@ function _M:learnLore(lore, nopopup, silent, nostop)
self.lore_known = self.lore_known or {}
if not config.settings.tome.lore_popup and profile.mod.lore and profile.mod.lore.lore and profile.mod.lore.lore[lore] and not l.always_pop then nopopup = true end
if not config.settings.tome.lore_popup and profile.mod.lore and profile.mod.lore.lore and profile.mod.lore.lore[lore] and not l.always_pop then
nopopup = true
nostop = true
end
if not self:knownLore(lore) or l.always_pop then
game.logPlayer(self, "Lore found: #0080FF#%s", l.name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment