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

The Sher'tul Fortress now possess the Library of Lost Mysteries, where you can...

The Sher'tul Fortress now possess the Library of Lost Mysteries, where you can instantly learn all lore known by any of your previous characters


git-svn-id: http://svn.net-core.org/repos/t-engine4@3385 51575b47-30f0-44d4-a5cc-537603b46e54
parent 49e8e711
No related branches found
No related tags found
No related merge requests found
......@@ -143,8 +143,8 @@ function _M:use(item)
KeyBind.binds_remap[t.type][curcol] = nil
else
KeyBind.binds_remap[t.type][curcol] = KeyBind:makeGestureString(gesture)
self.gesture:addGesture(gesture, function() self.key_source:triggerVirtual(t.type) end, t.sortname)
end
self.gesture:addGesture(gesture, function() self.key_source:triggerVirtual(t.type) end, t.sortname)
self.c_tree:drawItem(item)
end,
function()
......
......@@ -73,19 +73,21 @@ function _M:additionalLore(id, name, category, lore)
self.additional_lore[id] = {id=id, name=name, category=category, lore=lore, order=self.additional_lore_nb + #self.lore_defs}
end
function _M:learnLore(lore)
function _M:learnLore(lore, nopopup)
local l = self:getLore(lore)
local learnt = false
if not self:knownLore(lore) then
LorePopup.new(l, game.w * 0.6, 0.8)
game.logPlayer(self, "Lore found: #0080FF#%s", l.name)
game.logPlayer(self, "#ANTIQUE_WHITE#%s", util.getval(l.lore))
game.logPlayer(self, "You can read all your collected lore in the game menu, by pressing Escape.")
if not nopopup then
LorePopup.new(l, game.w * 0.6, 0.8)
game.logPlayer(self, "#ANTIQUE_WHITE#%s", util.getval(l.lore))
game.logPlayer(self, "You can read all your collected lore in the game menu, by pressing Escape.")
end
learnt = true
end
self.lore_known[lore] = true
if not self.additional_lore[lore] and self.registerLoreFound then self:registerLoreFound(lore) end
if learnt and not self.additional_lore[lore] and self.registerLoreFound then self:registerLoreFound(lore) end
print("[LORE] learnt", lore)
if learnt then if l.on_learn then l.on_learn(self) end end
end
......@@ -37,6 +37,7 @@ defineTile("=", "OLD_WALL")
defineTile(".", "OLD_FLOOR")
defineTile("P", "PURPLE_DRAPPING")
defineTile(" ", "COMMAND_ORB")
defineTile("L", "LIBRARY")
-- addSpot section
addSpot({11, 29}, "door", "weirdling")
......@@ -52,6 +53,7 @@ addZone({21, 23, 33, 35}, "zonename", "Control Room")
addZone({16, 26, 18, 32}, "zonename", "Portal Room")
addZone({13, 37, 23, 41}, "zonename", "Storage Room", {sort_drops=true,})
addZone({38, 26, 44, 32}, "zonename", "Exploratory Farportal")
addZone({20, 16, 23, 20}, "zonename", "Library of Lost Mysteries")
addZone({15, 28, 19, 28}, "particle", "house_flamebeam")
addZone({15, 30, 19, 30}, "particle", "house_flamebeam", {reverse=true,})
addZone({27, 29, 28, 30}, "particle", "house_orbcontrol")
......@@ -72,15 +74,15 @@ return [[
===========#################################################
===========#################################################
===========#################################################
===========#################################################
===========#################################################
===========#########G.######################################
===========#########....####################################
===========#########L.......################################
===========#########....###.################################
===========#########G.#####.################################
===========################.################################
===========################.################################
===========#########G.#####.#####.P#########################
===========#########....###.###....#########################
===========#########...............#########################
===========#########....###.###....#########################
===========#########G.#####.#####.P#########################
===========################.################################
===========#################################################
===========##########...##...##...##########################
========..=##########.............##########################
======....=######P###.............#####P###G################
......
......@@ -138,3 +138,20 @@ newEntity{ base = "FARPORTAL", define_as = "CFARPORTAL",
level.map:particleEmitter(y, y, 3, "farportal_lightning")
end,
}
newEntity{
define_as = "LIBRARY",
name = "Library of Lost Mysteries", image = "terrain/maze_floor.png", add_displays = {class.new{image="terrain/temporal_instability_blue.png"}},
display = '*', color=colors.BLUE,
notice = true,
always_remember = true,
block_move = function(self, x, y, e, act, couldpass)
if e and e.player and act then
if profile.mod.lore and profile.mod.lore.lore then
for lore, _ in pairs(profile.mod.lore.lore) do game.player:learnLore(lore, true) end
end
game:registerDialog(require("mod.dialogs.ShowLore").new("Yiilkgur's Library of Lost Mysteries", game.player))
end
return true
end,
}
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="16" height="16" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="dg_dungeon32" tilewidth="32" tileheight="32">
<image source="gfx/dg_dungeon32.gif" width="288" height="320"/>
<tile id="0">
<properties>
<property name="display" value="#"/>
<property name="value" value="&quot;HARDWALL&quot;"/>
</properties>
</tile>
<tile id="6">
<properties>
<property name="display" value="*"/>
</properties>
</tile>
<tile id="12">
<properties>
<property name="display" value="+"/>
<property name="value" value="&quot;DOOR&quot;"/>
</properties>
</tile>
<tile id="15">
<properties>
<property name="display" value="&lt;"/>
<property name="value" value="&quot;FLAT_UP6&quot;"/>
</properties>
</tile>
<tile id="16">
<properties>
<property name="display" value="&gt;"/>
<property name="value" value="&quot;FLAT_DOWN4&quot;"/>
</properties>
</tile>
<tile id="54">
<properties>
<property name="display" value="&amp;"/>
</properties>
</tile>
<tile id="57">
<properties>
<property name="display" value="."/>
<property name="value" value="&quot;FLOOR&quot;"/>
</properties>
</tile>
<tile id="58">
<properties>
<property name="display" value=";"/>
</properties>
</tile>
</tileset>
<layer name="Terrain" width="16" height="16">
<data encoding="base64" compression="zlib">
eJxjZGBgYBxE2ByIrfBgQvrx6SVGPy5zyNVHijmE9BIyA1kemx5s+gWhYuwk2A/DAlSwn5r+H+rxT430TyoGAEMaGIE=
</data>
</layer>
<objectgroup name="Actor" width="16" height="16">
<object name="Orcs" x="1870" y="842" width="72" height="10">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="1870" y="1228" width="72" height="10">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="1893" y="1029" width="20" height="21">
<properties>
<property name="display" value="O"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=3, rank=3,}}}"/>
</properties>
</object>
<object name="Orcs" x="329" y="424" width="46" height="46">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="835" y="1893" width="16" height="81">
<properties>
<property name="display" value="g"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=1, no_loot_randart=true, rank=3,}}}"/>
</properties>
</object>
<object name="Orcs" x="329" y="74" width="46" height="46">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="199" y="234" width="14" height="78">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="199" y="234" width="14" height="78">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="295" y="227" width="16" height="81">
<properties>
<property name="display" value="g"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=1, no_loot_randart=true, rank=3,}}}"/>
</properties>
</object>
<object name="Orcs randboss" x="41" y="261" width="14" height="19">
<properties>
<property name="display" value="O"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=3, rank=3,}}}"/>
</properties>
</object>
</objectgroup>
</map>
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="64" height="64" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="dg_dungeon32" tilewidth="32" tileheight="32">
<image source="gfx/dg_dungeon32.gif" width="288" height="320"/>
<tile id="0">
<properties>
<property name="display" value="#"/>
<property name="value" value="&quot;HARDWALL&quot;"/>
</properties>
</tile>
<tile id="6">
<properties>
<property name="display" value="*"/>
</properties>
</tile>
<tile id="12">
<properties>
<property name="display" value="+"/>
<property name="value" value="&quot;DOOR&quot;"/>
</properties>
</tile>
<tile id="15">
<properties>
<property name="display" value="&lt;"/>
<property name="value" value="&quot;FLAT_UP6&quot;"/>
</properties>
</tile>
<tile id="16">
<properties>
<property name="display" value="&gt;"/>
<property name="value" value="&quot;FLAT_DOWN4&quot;"/>
</properties>
</tile>
<tile id="54">
<properties>
<property name="display" value="&amp;"/>
</properties>
</tile>
<tile id="57">
<properties>
<property name="display" value="."/>
<property name="value" value="&quot;FLOOR&quot;"/>
</properties>
</tile>
<tile id="58">
<properties>
<property name="display" value=";"/>
</properties>
</tile>
</tileset>
<layer name="Terrain" width="64" height="64">
<data encoding="base64" compression="zlib">
eJzt2zEOgkAQQNGlsjLR05jI/e9lLEyM7rImCoOzr/gN1byBZKFgKqVM0kpdG0XPtVWXzh6y76Jnzu7/ZD/RM/C3Z8sQPz8/Pz8/Pz8/Pz8/Pz8/Pz//vfmpbP7ePl7t2fy9HYzqnyuN4H/U8kfPvMYO+N87V/yHHcz7646Vayf3n7/hz7SDJc/o5z+/93/ff/z8/Pz8/Pz8/Pzxc/Pz8/Pz80f4t2jv8/F/71t6JrP7/f84nln/0w2cX2DC
</data>
</layer>
<objectgroup name="Actor" width="64" height="64">
<object name="Orcs" x="1870" y="842" width="72" height="10">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="1870" y="1228" width="72" height="10">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="1893" y="1029" width="20" height="21">
<properties>
<property name="display" value="O"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=3, rank=3,}}}"/>
</properties>
</object>
<object name="Orcs" x="39" y="1004" width="18" height="68">
<properties>
<property name="display" value="o"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end}}"/>
</properties>
</object>
<object name="Orcs" x="839" y="71" width="16" height="81">
<properties>
<property name="display" value="g"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=1, no_loot_randart=true, rank=3,}}}"/>
</properties>
</object>
<object name="Orcs" x="835" y="1893" width="16" height="81">
<properties>
<property name="display" value="g"/>
<property name="value" value="{random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == 'vor' end, random_boss={nb_classes=1, loot_quality=&quot;store&quot;, loot_quantity=1, no_loot_randart=true, rank=3,}}}"/>
</properties>
</object>
</objectgroup>
</map>
......@@ -65,6 +65,11 @@
<property name="value" value="&quot;PURPLE_DRAPPING&quot;"/>
</properties>
</tile>
<tile id="86">
<properties>
<property name="display" value="L"/>
</properties>
</tile>
<tile id="130">
<properties>
<property name="display" value="*"/>
......@@ -74,7 +79,7 @@
</tileset>
<layer name="Terrain" width="60" height="60">
<data encoding="base64" compression="zlib">
eJzt1sENgzAMBVBuvXaYSF2CEXqkK7AGE3aXigNSFBnjuEnIh3/4qgRt8cPBYRyGYTTmfYFYrfRihl566cUNvfTSixt66aXXl0AvvHdWXNrxBdQbkmhe7buo3pxcwXv1/t7t+T3qfQtTL94eUsMrPZPWY2d7t3q83p5ms+ZN69G86awp5U3/d67klerZ80o1L5lWyVFrLWjr17Ke13MvoY5/e1vTa6lpb2YdzSGvOT43RSnhfRprejgtW77Oa6zOT0GvdT3H/Q3RJ1p/PfMq9qI9v579SOvvLPxei/Tu3Np7NJ9Tn7e3mqHV/mt5n9TucylvjdT25h5D9Gr3oZWrpNe7Tunt35u715w1l3robw+h1zafUUMvvfTihl566cUNvfTSixt66aUXN3fz/gBlv640
eJzt1sENgzAMBVBuvXYYpC7BCD22K7AGs3Sg7tJyQIoi4zgmTmL4h69KoLZ+OHGYhmGYhHmeIFIrvD4DL7zw+g288MLrN/DCC6/fwHvMO/8zduCq5R2jtPZZez+EuSd/zf6e0cvt3zN6U72H17+X2r/Sa629Wz1arzStvXE9nHcx8sa/Oxt5qXr2vFTNS6aVclitBW79Stbzeu9B1HG0t5ZeSU17Mys1h7Tm8N4rSAnvXVjTTWnZ8lX+x+p8F/RK13PY3zH49NZfzbwKvd72r+Y84vo7E9/nEp87Lbyp+Rz7tL3lDLXOX8n7JPecS3ktYu3NvebRyz2HWq6SXu06hbd/b+5Z02ou9dDfHgKvbD57Dbzwwus38MILr9/ACy+8fgMvvPD6zdW8P5jwsWs=
</data>
</layer>
<objectgroup color="#ff0000" name="Actor" width="60" height="60">
......@@ -129,7 +134,7 @@
</properties>
</object>
</objectgroup>
<objectgroup name="addZone#rooms" width="60" height="60" visible="0">
<objectgroup name="addZone#rooms" width="60" height="60">
<object name="control room" x="673" y="738" width="412" height="408">
<properties>
<property name="subtype" value="&quot;Control Room&quot;"/>
......@@ -155,6 +160,12 @@
<property name="type" value="&quot;zonename&quot;"/>
</properties>
</object>
<object name="Library" x="644" y="515" width="118" height="151">
<properties>
<property name="subtype" value="&quot;Library of Lost Mysteries&quot;"/>
<property name="type" value="&quot;zonename&quot;"/>
</properties>
</object>
</objectgroup>
<objectgroup color="#ff55ff" name="addZone#particles" width="60" height="60">
<object name="flamewall" x="484" y="900" width="148" height="23">
......
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