lua/wrappers/game/lua_dialogue_component.cpp
/**
	 * Sets if the given dialogue will be available from this component.
	 * @param string dialogue_id The dialogue id to set.
	 * @param boolean available The availability of the given dialogue.
	 * @returns am.dialogue_component This
	 */
Sets if the given dialogue will be available from this component.
@param string dialogue_id The dialogue id to set.
@param boolean available The availability of the given dialogue.
Sets if the given dialogue will be available from this component . @param string dialogue_id The dialogue id to set . @param boolean available The availability of the given dialogue .
int DialogueComponent_dialogue_available(lua_State *lua)
	{
		DialogueComponent *comp = castUData<DialogueComponent>(lua, 1);
		if (comp)
		{
			if (lua_isstr(lua, 2))
			{
				if (lua_gettop(lua) == 2)
				{
					lua_pushboolean(lua, comp->isDialogueAvailable(lua_tostring(lua, 2)));
					return 1;
				}
				else
				{
					if (lua_isbool(lua, 3))
					{
						comp->setDialogueAvailable(lua_tostring(lua, 2), lua_tobool(lua, 3));
						lua_first(lua);
					}
				}
				return LuaState::expectedArgs(lua, "available", "string dialogue_id, boolean available");
			}
			return LuaState::expectedArgs(lua, "available", "string dialogue_id");
		}
		return LuaState::expectedContext(lua, "available", "am.dialogue_component");
	}
int DialogueComponent_dialogue_available ( lua_State * lua ) { DialogueComponent * comp = castUData < DialogueComponent > ( lua , 1 ) ; if ( comp ) { if ( lua_isstr ( lua , 2 ) ) { if ( lua_gettop ( lua ) == 2 ) { lua_pushboolean ( lua , comp -> isDialogueAvailable ( lua_tostring ( lua , 2 ) ) ) ; return 1 ; } else { if ( lua_isbool ( lua , 3 ) ) { comp -> setDialogueAvailable ( lua_tostring ( lua , 2 ) , lua_tobool ( lua , 3 ) ) ; lua_first ( lua ) ; } } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets if the given dialogue will be available from this component.
Sets if the given dialogue will be available from this component .