Facepunch.Steamworks/Generator/Cleanup.cs
2019-04-16 12:17:24 +01:00

53 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
public static class Cleanup
{
public static string ConvertType( string type )
{
type = type.Replace( "CSteamID", "SteamId" );
type = type.Replace( "CGameID", "GameId" );
type = type.Replace( "PersonaState", "FriendState" );
type = type.Replace( "AudioPlayback_Status", "MusicStatus" );
type = type.Replace( "AuthSessionResponse", "AuthResponse" );
type = type.Replace( "FriendRelationship", "Relationship" );
type = type.Replace( "BeginAuthSessionResult", "BeginAuthResult" );
return type;
}
public static bool ShouldCreate( string type )
{
if ( type == "SteamId" ) return false;
return true;
}
internal static string Expose( string name )
{
if ( name == "FriendState" ) return "public";
if ( name == "MusicStatus" ) return "public";
if ( name == "ParentalFeature" ) return "public";
if ( name == "AuthResponse" ) return "public";
if ( name == "Relationship" ) return "public";
if ( name == "BeginAuthResult" ) return "public";
if ( name == "Universe" ) return "public";
if ( name == "NotificationPosition" ) return "public";
if ( name == "GamepadTextInputMode" ) return "public";
if ( name == "GamepadTextInputLineMode" ) return "public";
if ( name == "CheckFileSignature" ) return "public";
if ( name == "BroadcastUploadResult" ) return "public";
return "internal";
}
}