Skip to content
Snippets Groups Projects
Commit 087b1cca authored by Otowa Kotori's avatar Otowa Kotori
Browse files

change a few game.log in engine

parent 31fbfe91
No related branches found
No related tags found
No related merge requests found
......@@ -34,13 +34,13 @@ function _M:restInit(turns, what, past, on_end, on_very_end)
on_end = on_end,
on_very_end = on_very_end,
cnt = 0,
dialog = Dialog:simplePopup(what:capitalize().."...", ("You are %s, press Enter to stop."):tformat(what), function()
dialog = Dialog:simplePopup(("%s..."):tformat(what:capitalize()), ("You are %s, press Enter to stop."):tformat(what), function()
self:restStop()
end),
}
self.resting.dialog.__showup = nil
game.log(what:capitalize().." starts...")
game.log("%s starts...", what:capitalize())
self:onRestStart()
......@@ -99,9 +99,9 @@ function _M:restStop(msg)
game:unregisterDialog(self.resting.dialog)
if msg then
game.log(self.resting.past:capitalize().." for %d turns (stop reason: %s).", self.resting.cnt, msg)
game.log("%s for %d turns (stop reason: %s).", self.resting.past:capitalize(), self.resting.cnt, msg)
else
game.log(self.resting.past:capitalize().." for %d turns.", self.resting.cnt)
game.log("%s for %d turns.", self.resting.past:capitalize(), self.resting.cnt)
end
local finish = self.resting.cnt and self.resting.rest_turns and self.resting.cnt > self.resting.rest_turns
......
......@@ -110,8 +110,8 @@ function _M:gainPersonalAchievement(silent, id, src, ...)
src.achievements[id] = {turn=game.turn, who=self:achievementWho(src), when=os.date("%Y-%m-%d %H:%M:%S")}
if not silent then
local color = a.huge and "GOLD" or "LIGHT_GREEN"
game.log("#"..color.."#Personal New Achievement: %s!", a.name)
self:showAchievement("Personal New Achievement: #"..color.."#"..a.name, a)
game.log("#%s#Personal New Achievement: %s!". color, a.name)
self:showAchievement(("Personal New Achievement: #%s#%s"):tformat(color, a.name), a)
if not a.no_chat_broadcast then profile.chat:achievement(a.name, a.huge, false) end
end
if a.on_gain then a:on_gain(src, true) end
......@@ -152,7 +152,7 @@ function _M:gainAchievement(id, src, ...)
self.achieved[id] = {turn=game.turn, who=self:achievementWho(src), when=os.date("%Y-%m-%d %H:%M:%S")}
if not config.settings.cheat then profile:saveModuleProfile("achievements", {id=id, turn=game.turn, who=self:achievementWho(src), gained_on=os.date("%Y-%m-%d %H:%M:%S")}) end
local color = a.huge and "GOLD" or "LIGHT_GREEN"
game.log("#"..color.."#New Achievement: %s!", a.name)
game.log("#%s#New Achievement: %s!", color, a.name)
self:showAchievement(("New Achievement: #%s#%s"):tformat(color, a.name), a)
if not a.no_chat_broadcast then profile.chat:achievement(a.name, a.huge, true) end
......
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