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

fixes

Maybe finally fixed disappearing zones; please keep your eyes open


git-svn-id: http://svn.net-core.org/repos/t-engine4@4708 51575b47-30f0-44d4-a5cc-537603b46e54
parent e36d2954
No related branches found
No related tags found
No related merge requests found
...@@ -159,7 +159,7 @@ function _M:generateList(kind) ...@@ -159,7 +159,7 @@ function _M:generateList(kind)
end end
end end
if kind == "self" and self.player and self.player.achievements then if kind == "self" and self.player and self.player.achievements then
for id, data in pairs(self.player.achievements) do handle(id, world.achieved[id]) end for id, data in pairs(self.player.achievements) do handle(id, world.achieved[id] or {notdone=true, when="--", who="--"}) end
elseif kind == "main" then elseif kind == "main" then
for id, data in pairs(world.achieved) do handle(id, data or {notdone=true, when="--", who="--"}) end for id, data in pairs(world.achieved) do handle(id, data or {notdone=true, when="--", who="--"}) end
elseif kind == "all" then elseif kind == "all" then
......
...@@ -2755,6 +2755,8 @@ end ...@@ -2755,6 +2755,8 @@ end
--- Return the full description of a talent --- Return the full description of a talent
-- You may overload it to add more data (like power usage, ...) -- You may overload it to add more data (like power usage, ...)
function _M:getTalentFullDescription(t, addlevel, config) function _M:getTalentFullDescription(t, addlevel, config)
if not t then return tstring{"no talent"} end
config = config or {} config = config or {}
local old = self.talents[t.id] local old = self.talents[t.id]
if config.force_level then if config.force_level then
......
...@@ -75,7 +75,13 @@ end ...@@ -75,7 +75,13 @@ end
function _M:replaceAll(level) function _M:replaceAll(level)
for i = 1, #self.repl do for i = 1, #self.repl do
local r = self.repl[i] local r = self.repl[i]
level.map(r[1], r[2], Map.TERRAIN, r[3]) -- Safety check
local og = level.map(r[1], r[2], Map.TERRAIN)
if og and (og.change_zone or og.change_level) then
print("[NICE TILER] *warning* refusing to remove zone/level changer at ", r[1], r[2], og.change_zone, og.change_level)
else
level.map(r[1], r[2], Map.TERRAIN, r[3])
end
end end
self.repl = {} self.repl = {}
......
...@@ -25,10 +25,12 @@ I cannot stay. I still have much to do. But take this-- it should help you. ...@@ -25,10 +25,12 @@ I cannot stay. I still have much to do. But take this-- it should help you.
answers = { answers = {
{"Ok...", action = function(npc, player) {"Ok...", action = function(npc, player)
local o = game.zone:makeEntityByName(game.level, "object", "RUNE_RIFT") local o = game.zone:makeEntityByName(game.level, "object", "RUNE_RIFT")
o:identify(true) if o then
game.zone:addEntity(game.level, o, "object") o:identify(true)
player:addObject(player.INVEN_INVEN, o) game.zone:addEntity(game.level, o, "object")
game.log("The temporal warden gives you: %s.", o:getName{do_color=true}) player:addObject(player.INVEN_INVEN, o)
game.log("The temporal warden gives you: %s.", o:getName{do_color=true})
end
game:setAllowedBuild("chronomancer") game:setAllowedBuild("chronomancer")
game:setAllowedBuild("chronomancer_temporal_warden", true) game:setAllowedBuild("chronomancer_temporal_warden", true)
......
...@@ -135,7 +135,7 @@ newTalent{ ...@@ -135,7 +135,7 @@ newTalent{
local x, y = self:getTarget(tg) local x, y = self:getTarget(tg)
if not x or not y then return nil end if not x or not y then return nil end
self:project(tg, x, y, DamageType.IMPLOSION, {dur=dur, dam=dam}) self:project(tg, x, y, DamageType.IMPLOSION, {dur=dur, dam=dam})
target:crossTierEffect(target.EFF_OFFBALANCE, self:combatMindpower()) -- target:crossTierEffect(target.EFF_OFFBALANCE, self:combatMindpower())
return true return true
end, end,
......
...@@ -56,7 +56,7 @@ function _M:init(title, actor, filter, action) ...@@ -56,7 +56,7 @@ function _M:init(title, actor, filter, action)
} }
self.key:addBinds{ self.key:addBinds{
ACCEPT = function() ACCEPT = function()
self:use(self.c_list.list[self.c_list.sel]) -- self:use(self.c_list.list[self.c_list.sel])
end, end,
EXIT = function() game:unregisterDialog(self) end, EXIT = function() game:unregisterDialog(self) 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