Client.getCraftFilename C# (CSharp) Method

getCraftFilename() protected method

protected getCraftFilename ( String craft_name, byte craft_type ) : String
craft_name String
craft_type byte
return String
    protected String getCraftFilename(String craft_name, byte craft_type)
    {
        //Filter the craft name for illegal characters
        String filtered_craft_name = KLFCommon.filteredFileName(craft_name.Replace('.', '_'));

        if (currentGameTitle.Length <= 0 || filtered_craft_name.Length <= 0)
            return null;

        switch (craft_type)
        {
            case KLFCommon.CRAFT_TYPE_VAB:
                return "saves/" + currentGameTitle + "/Ships/VAB/" + filtered_craft_name + CRAFT_FILE_EXTENSION;

            case KLFCommon.CRAFT_TYPE_SPH:
                return "saves/" + currentGameTitle + "/Ships/SPH/" + filtered_craft_name + CRAFT_FILE_EXTENSION;
        }

        return null;
    }