[Orxonox-commit 4172] r8843 - in code/branches/ai2: data/gui/scripts src/modules/questsystem
dafrick at orxonox.net
dafrick at orxonox.net
Sun Aug 14 18:45:57 CEST 2011
Author: dafrick
Date: 2011-08-14 18:45:57 +0200 (Sun, 14 Aug 2011)
New Revision: 8843
Modified:
code/branches/ai2/data/gui/scripts/QuestGUI.lua
code/branches/ai2/src/modules/questsystem/QuestManager.cc
code/branches/ai2/src/modules/questsystem/QuestManager.h
Log:
Fixing bug.
Modified: code/branches/ai2/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/branches/ai2/data/gui/scripts/QuestGUI.lua 2011-08-14 11:45:06 UTC (rev 8842)
+++ code/branches/ai2/data/gui/scripts/QuestGUI.lua 2011-08-14 16:45:57 UTC (rev 8843)
@@ -4,7 +4,6 @@
P.questManager = nil -- The QuestManager.
P.showActive = true -- Whether the active or finished quest list is displayed.
-P.currentQuest = nil -- The quest that is currently displayed.
P.player = nil -- The player the quests are displayed for.
P.quests = {}
P.subquests = {}
@@ -28,7 +27,7 @@
P.player = orxonox.GUIManager:getInstance():getPlayer(P.name)
-- Load the list of quests to be displayed.
- P.loadQuestsList(P.currentQuest)
+ P.loadQuestsList()
-- Pause the game - possible conflict for multiplayer quests
orxonox.execute("setPause 1")
end
@@ -176,8 +175,6 @@
local window = winMgr:getWindow("orxonox/QuestGUI/Quest/Wrapper")
window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize-P.scrollbarWidth), CEGUI.UDim(0,offset+P.borderSize)))
end
-
- P.currentQuest = quest
end
-- Clear the currently displayed quest.
@@ -209,8 +206,6 @@
i = i+1
end
hints:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.scrollbarWidth-P.borderSize), CEGUI.UDim(0, 0)))
-
- P.currentQuest = nil
end
-- Clear the quests list
@@ -263,7 +258,7 @@
window:setProperty("FrameEnabled", "false")
window:setID(index)
hintsWindow:addChildWindow(window)
- local description = P.questManager:getHintDescription(hint)
+ local description = P.questManager:getDescription(hint)
window:setText(description:getDescription())
window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
local height = getStaticTextWindowHeight(window)
Modified: code/branches/ai2/src/modules/questsystem/QuestManager.cc
===================================================================
--- code/branches/ai2/src/modules/questsystem/QuestManager.cc 2011-08-14 11:45:06 UTC (rev 8842)
+++ code/branches/ai2/src/modules/questsystem/QuestManager.cc 2011-08-14 16:45:57 UTC (rev 8843)
@@ -399,7 +399,7 @@
@return
Returns a pointer to the QuestDescription of the input QuestHint.
*/
- QuestDescription* QuestManager::getHintDescription(QuestHint* item)
+ QuestDescription* QuestManager::getDescription(QuestHint* item)
{
OrxAssert(item, "The input QuestHint is NULL.");
return item->getDescription();
@@ -427,7 +427,7 @@
@return
Returns the id of the input QuestHint.
*/
- const std::string QuestManager::getHintId(QuestHint* item) const
+ const std::string QuestManager::getId(QuestHint* item) const
{
OrxAssert(item, "The input QuestHint is NULL.");
return item->getId();
Modified: code/branches/ai2/src/modules/questsystem/QuestManager.h
===================================================================
--- code/branches/ai2/src/modules/questsystem/QuestManager.h 2011-08-14 11:45:06 UTC (rev 8842)
+++ code/branches/ai2/src/modules/questsystem/QuestManager.h 2011-08-14 16:45:57 UTC (rev 8843)
@@ -83,10 +83,10 @@
Quest* getParentQuest(Quest* quest); //!< Get the parent-quest of the input Quest.
QuestDescription* getDescription(Quest* item); //!< Get the QuestDescription of the input Quest.
- QuestDescription* getHintDescription(QuestHint* item); //!< Get the QuestDescription of the input QuestHint.
+ QuestDescription* getDescription(QuestHint* item); //!< Get the QuestDescription of the input QuestHint.
const std::string getId(Quest* item) const; //!< Get the id of the input Quest.
- const std::string getHintId(QuestHint* item) const; //!< Get the id of the input QuestHint.
+ const std::string getId(QuestHint* item) const; //!< Get the id of the input QuestHint.
// tolua_end
bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager.
More information about the Orxonox-commit
mailing list