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

Teleport: Angolwen will take you back to the correct worldmap

git-svn-id: http://svn.net-core.org/repos/t-engine4@1103 51575b47-30f0-44d4-a5cc-537603b46e54
parent 93acf336
No related branches found
No related tags found
No related merge requests found
......@@ -52,10 +52,10 @@ function _M:loadMap(file)
defineTile = function(char, grid, obj, actor, trap, status, spot)
t[char] = {grid=grid, object=obj, actor=actor, trap=trap, status=status, define_spot=spot}
end,
quickEntity = function(char, e, status)
quickEntity = function(char, e, status, spot)
if type(e) == "table" then
local e = self.zone.grid_class.new(e)
t[char] = {grid=e, status=status}
t[char] = {grid=e, status=status, define_spot=spot}
else
t[char] = t[e]
end
......
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
quickEntity('^', {name='blue mountains', display='^', color=colors.LIGHT_BLUE, image="terrain/mountain.png", block_move=true, block_sight=true})
quickEntity('<', {show_tooltip=true, name='portal to the wilds', display='<', color=colors.WHITE, change_level=1, change_zone=game.player.last_wilderness})
quickEntity('<', {show_tooltip=true, name='portal to the wilds', display='<', color=colors.WHITE, change_level=1, change_zone=game.player.last_wilderness}, nil, {type="portal", subtype="back"})
quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move=true, block_sight=true, image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/tree_alpha2.png"}}})
quickEntity('o', {name='fountain', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png", add_displays = mod.class.Grid:makeWater(true)})
quickEntity(' ', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"})
......
......@@ -40,5 +40,10 @@ return {
class = "engine.generator.object.Random",
nb_object = {0, 0},
},
}
},
on_enter = function(lev, old_lev, zone)
-- Update the stairs
local spot = game.level:pickSpot{type="portal", subtype="back"}
if spot then game.level.map(spot.x, spot.y, engine.Map.TERRAIN).change_zone = game.player.last_wilderness 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