Facepunch.Steamworks/Generator/CodeWriter/CustomEnums.cs

22 lines
445 B
C#
Raw Normal View History

2020-02-22 23:16:04 +03:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Generator
{
public partial class CodeWriter
{
void CustomEnums()
{
StartBlock( "enum CallbackType" );
foreach ( var c in def.callback_structs.OrderBy( x => x.CallbackId ) )
{
WriteLine( $"{c.Name.Replace( "_t", "" ) } = {c.CallbackId}," );
}
EndBlock();
}
}
}