lua/wrappers/game/lua_door.cpp
/**
	 * Sets the door closed tile type.
	 * When the is closed this tile type is applied to the 
	 * tile the door is over. When the door is opened the tile
	 * type is unaffected.
	 *
	 * @param am.tile_type tile_type The tile type to set.
	 * @returns am.door This
	 */
Sets the door closed tile type.
When the is closed this tile type is applied to the
tile the door is over. When the door is opened the tile
type is unaffected.

@param am.tile_type tile_type The tile type to set.
Sets the door closed tile type . When the is closed this tile type is applied to the tile the door is over . When the door is opened the tile type is unaffected . @param am . tile_type tile_type The tile type to set .
int Door_tile_type(lua_State *lua)
	{
		Door *door = castUData<Door>(lua, 1);
		if (door)
		{
			if (lua_gettop(lua) == 1)
			{
				TileType *type = door->getDoorType();
				if (type)
				{
					wrapRefObject<TileType>(lua, type);
				}
				else
				{
					lua_pushnil(lua);
				}
				return 1;
			}
			else
			{
				TileType *tileType = nullptr;
				if (getTileType(lua, 2, tileType))
				{
					door->setDoorType(tileType);
					lua_first(lua);
				}
				return LuaState::expectedArgs(lua, "tile_type", 3, "string tile_type_name", "am.tile_type tile_type", "nil");
			}
		}
		return LuaState::expectedContext(lua, "tile_type", "am.door");
	}
int Door_tile_type ( lua_State * lua ) { Door * door = castUData < Door > ( lua , 1 ) ; if ( door ) { if ( lua_gettop ( lua ) == 1 ) { TileType * type = door -> getDoorType ( ) ; if ( type ) { wrapRefObject < TileType > ( lua , type ) ; } else { lua_pushnil ( lua ) ; } return 1 ; } else { TileType * tileType = nullptr ; if ( getTileType ( lua , 2 , tileType ) ) { door -> setDoorType ( tileType ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , 3 , " " , " " , " " ) ; } } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the door closed tile type.
Sets the door closed tile type .