From 39b993491113cc199c74bfbd212477a4e6f45238 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sun, 30 Dec 2012 14:53:17 +0000 Subject: [PATCH] Orb of Scrying, Orb of Many Ways, Staff of Absorption are marked as plot items git-svn-id: http://svn.net-core.org/repos/t-engine4@6287 51575b47-30f0-44d4-a5cc-537603b46e54 --- .../default/engine/dialogs/VideoOptions.lua | 2 +- game/modules/tome/class/Player.lua | 15 ++++++++++----- .../tome/data/general/objects/quest-artifacts.lua | 8 ++++++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/game/engines/default/engine/dialogs/VideoOptions.lua b/game/engines/default/engine/dialogs/VideoOptions.lua index f4286eaba9..e32e706916 100644 --- a/game/engines/default/engine/dialogs/VideoOptions.lua +++ b/game/engines/default/engine/dialogs/VideoOptions.lua @@ -145,7 +145,7 @@ function _M:generateList() end), 50) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Disallow boot images that could be fuond 'offensive'.#WHITE#"} + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Disallow boot images that could be found 'offensive'.#WHITE#"} list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Censor boot#WHITE##{normal}#", status=function(item) return tostring(config.settings.censor_boot and "enabled" or "disabled") end, fct=function(item) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 263bf0c5c4..5c0d6f339c 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -973,11 +973,16 @@ function _M:doDrop(inven, item, on_done, nb) Dialog:yesnoLongPopup("Warning", "You cannot drop items on the world map.\nIf you drop it, it will be lost forever.", 300, function(ret) -- The test is reversed because the buttons are reversed, to prevent mistakes if not ret then - local o = self:removeObject(inven, item, true) - game.logPlayer(self, "You destroy %s.", o:getName{do_colour=true, do_count=true}) - self:sortInven() - self:useEnergy() - if on_done then on_done() end + local o = self:getInven(inven) and self:getInven(inven)[item] + if o and not o.plot then + local o = self:removeObject(inven, item, true) + game.logPlayer(self, "You destroy %s.", o:getName{do_colour=true, do_count=true}) + self:sortInven() + self:useEnergy() + if on_done then on_done() end + elseif o then + game.logPlayer(self, "You can not destroy %s.", o:getName{do_colour=true}) + end end end, "Cancel", "Destroy") return diff --git a/game/modules/tome/data/general/objects/quest-artifacts.lua b/game/modules/tome/data/general/objects/quest-artifacts.lua index 401e239fec..74a55d8036 100644 --- a/game/modules/tome/data/general/objects/quest-artifacts.lua +++ b/game/modules/tome/data/general/objects/quest-artifacts.lua @@ -32,6 +32,7 @@ newEntity{ define_as = "STAFF_ABSORPTION", level_range = {30, 30}, display = "\\", color=colors.VIOLET, image = "object/artifact/staff_absorption.png", encumber = 7, + plot = true, quest = true, desc = [[Carved with runes of power, this staff seems to have been made long ago. Yet it bears no signs of tarnishment. Light around it seems to dim and you can feel its tremendous power simply by touching it.]], @@ -80,6 +81,7 @@ newEntity{ define_as = "ORB_MANY_WAYS", level_range = {30, 30}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_many_ways.png", encumber = 1, + plot = true, quest = true, desc = [[The orb projects images of distant places, some that seem to be not of this world, switching rapidly. If used near a portal it could probably activate it.]], @@ -118,6 +120,7 @@ newEntity{ define_as = "ORB_MANY_WAYS_DEMON", level_range = {30, 30}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_many_ways.png", encumber = 1, + plot = true, quest = true, desc = [[The orb projects images of distant places, some that seem to be not of this world, switching rapidly. If used near a portal it could probably activate it.]], @@ -165,6 +168,7 @@ newEntity{ define_as = "ORB_UNDEATH", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_undeath.png", encumber = 1, + plot = true, quest = true, desc = [[Dark visions fill your mind as you lift the orb. It is cold to the touch.]], on_drop = function(self, who) @@ -194,6 +198,7 @@ newEntity{ define_as = "ORB_DRAGON", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_dragon.png", encumber = 1, + plot = true, quest = true, desc = [[This orb is warm to the touch.]], on_drop = function(self, who) @@ -223,6 +228,7 @@ newEntity{ define_as = "ORB_ELEMENTS", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/elemental_orb.png", encumber = 1, + plot = true, quest = true, desc = [[Flames swirl on the icy surface of this orb.]], on_drop = function(self, who) @@ -252,6 +258,7 @@ newEntity{ define_as = "ORB_DESTRUCTION", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_destruction.png", encumber = 1, + plot = true, quest = true, desc = [[Visions of death and destruction fill your mind as you lift this orb.]], on_drop = function(self, who) @@ -280,6 +287,7 @@ newEntity{ define_as = "ORB_SCRYING", name = "Orb of Scrying", display = "*", color=colors.VIOLET, image = "object/artifact/orb_scrying.png", encumber = 1, + plot = true, quest = true, save_hotkey = true, desc = [[This orb was given to you by Elisa the Halfling scryer. It will automatically identify normal and rare items for you and can be activated to contact Elisa for rarer items.]], -- GitLab