lua/wrappers/game/lua_dialogue.cpp
/**
	 * Sets the dialogue action, these trigger special events when the
	 * dialogue is used.
	 * @param string action Either "none", "shop" or "close"
	 * @returns am.dialogue This
	 */
Sets the dialogue action, these trigger special events when the
dialogue is used.
Sets the dialogue action these trigger special events when the dialogue is used .
int Dialogue_dialogue_action(lua_State *lua)
	{
		Dialogue *diag = castUData<Dialogue>(lua, 1);
		if (diag)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushstring(lua, Dialogue::getDialogueActionName(diag->getDialogueAction()));
				return 1;
			}
			else if (lua_isstr(lua, 2))
			{
				Dialogue::DialogueAction action = getDialogueAction(lua, 2);
				if (action != Dialogue::ACTION_UNKNOWN)
				{
					diag->setDialogueAction(action);
				}
				else
				{
					LuaState::warning(lua, "Valid dialogue action values are \"none\", \"shop\" or \"close\"");
				}
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "action", "string action");
		}
		return LuaState::expectedContext(lua, "action", "am.dialogue");
	}
int Dialogue_dialogue_action ( lua_State * lua ) { Dialogue * diag = castUData < Dialogue > ( lua , 1 ) ; if ( diag ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushstring ( lua , Dialogue :: getDialogueActionName ( diag -> getDialogueAction ( ) ) ) ; return 1 ; } else if ( lua_isstr ( lua , 2 ) ) { Dialogue :: DialogueAction action = getDialogueAction ( lua , 2 ) ; if ( action != Dialogue :: ACTION_UNKNOWN ) { diag -> setDialogueAction ( action ) ; } else { LuaState :: warning ( lua , " \" \" \" \" \" \" " ) ; } lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the dialogue action, these trigger special events when the
 dialogue is used.
Sets the dialogue action these trigger special events when the dialogue is used .