Skip to content
Snippets Groups Projects
Commit f7f86d40 authored by dg's avatar dg
Browse files

Most lore notes will not popup if already known (aka: via the sher'tul fortress library)

git-svn-id: http://svn.net-core.org/repos/t-engine4@3410 51575b47-30f0-44d4-a5cc-537603b46e54
parent 375700ad
No related branches found
No related tags found
No related merge requests found
......@@ -1394,6 +1394,7 @@ function _M:placeRandomLoreObject(define, zone)
if type(define) == "table" then define = rng.table(define) end
local o = self.zone:makeEntityByName(self.level, "object", define)
if not o then return end
if o.checkFilter and not o:checkFilter({}) then return end
local x, y = rng.range(0, self.level.map.w-1), rng.range(0, self.level.map.h-1)
local tries = 0
......
......@@ -107,7 +107,7 @@ newEntity{
unided_name = "scroll", identified=true,
display = "?", color=colors.ANTIQUE_WHITE, image="object/scroll-lore.png",
encumber = 0,
checkFilter = function(self) if self.lore and game:getPlayer(true):knownLore(self.lore) then return false else return true end end,
checkFilter = function(self) if self.lore and game:getPlayer(true):knownLore(self.lore) then print('[LORE] refusing', self.lore) return false else return true end end,
desc = [[This parchment contains some lore.]],
}
......
......@@ -72,8 +72,11 @@ function _M:use(item)
self.actor:doTakeoff(self.inven, self.item, self.object)
self.onuse(self.inven, self.item, self.object, stop)
elseif act == "transmo" then
item.transmo:transmo_inven(self.actor, self.inven, self.item, self.object)
self.onuse(self.inven, self.item, self.object, stop)
self:yesnoPopup("Transmogrify", "Really transmogrify "..self.object:getName{}, function(ret)
if not ret then return end
item.transmo:transmo_inven(self.actor, self.inven, self.item, self.object)
self.onuse(self.inven, self.item, self.object, stop)
end)
end
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