lua/wrappers/game/lua_quest.cpp
/**
	 * Creates a new quest with the given quest id unless an existing quest
	 * with the same quest_id exists. If the quest was already existing
	 * then the 2nd return values is true.
	 *
	 * @param string quest_id The quest id for this quest.
	 * @returns am.quest The newly created quest or returns the quest that had the
	 *  same quest_id.
	 * @returns boolean True if the quest was newly created, false otherwise.
	 */
Creates a new quest with the given quest id unless an existing quest
with the same quest_id exists. If the quest was already existing
then the 2nd return values is true.

@param string quest_id The quest id for this quest.
@returns am.quest The newly created quest or returns the quest that had the
same quest_id.
@returns boolean True if the quest was newly created, false otherwise.
Creates a new quest with the given quest id unless an existing quest with the same quest_id exists . If the quest was already existing then the 2nd return values is true . @param string quest_id The quest id for this quest . @returns am . quest The newly created quest or returns the quest that had the same quest_id . @returns boolean True if the quest was newly created false otherwise .
int Quest_ctor(lua_State *lua)
	{
		if (lua_isstr(lua, 1))
		{
			Quest *quest = Engine::getGame()->getQuest(lua_tostring(lua, 1));
			bool newQuest = false;
			if (!quest)
			{
				quest = new Quest(lua_tostring(lua, 1));
				newQuest = true;
			}
			wrapRefObject<Quest>(lua, quest);
			lua_pushboolean(lua, newQuest);
			return 2;
		}
		return LuaState::expectedArgs(lua, "@new", "string quest_id");
	}
int Quest_ctor ( lua_State * lua ) { if ( lua_isstr ( lua , 1 ) ) { Quest * quest = Engine :: getGame ( ) -> getQuest ( lua_tostring ( lua , 1 ) ) ; bool newQuest = false ; if ( ! quest ) { quest = new Quest ( lua_tostring ( lua , 1 ) ) ; newQuest = true ; } wrapRefObject < Quest > ( lua , quest ) ; lua_pushboolean ( lua , newQuest ) ; return 2 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; }
Creates a new quest with the given quest id unless an existing quest
 with the same quest_id exists.
Creates a new quest with the given quest id unless an existing quest with the same quest_id exists .