Working on data and sztl

This commit is contained in:
2025-11-30 19:32:36 -06:00
parent b1a43d038e
commit 27d3f0b452
16 changed files with 157 additions and 142 deletions

View File

@@ -0,0 +1,10 @@
using System.Collections.Generic;
namespace SessionZero.Data.Sztl;
public class SzFieldGroup
{
public string Id { get; set; }
public Dictionary<string, SzField> Fields { get; set; } = new();
public Dictionary<string, SzFieldGroup> SubGroups { get; set; } = new();
}

View File

@@ -0,0 +1,11 @@
namespace SessionZero.Data.Sztl;
public enum SzFieldType
{
Text,
Textblock,
Number,
Bool,
Formula,
Object
}

View File

@@ -1,25 +1,11 @@
using System;
namespace SessionZero.Data.Sztl;
public class SztlField
{
public required string Id { get; set; }
public required SztlFieldType FieldType { get; set; }
public object? Value { get; set; } = null;
public bool TrySetValue()
{
throw new NotImplementedException();
}
public T TryGetValue<T>()
{
throw new NotImplementedException();
}
}
public enum SztlFieldType
{
Number, Text, Textbox, Bool, Object, Formula
public required SzFieldType Type { get; set; }
public object? DefaultValue { get; set; }
public string? Description { get; set; }
public bool IsList { get; set; }
public bool IsTextBlock { get; set; }
}

View File

@@ -4,6 +4,7 @@ namespace SessionZero.Data.Sztl;
public class SztlFieldGroup
{
public List<SztlField> Fields { get; set; } = [];
public List<SztlFieldGroup> SubGroups { get; set; } = [];
public string Id { get; set; }
public Dictionary<string, SztlField> Fields { get; set; } = new();
public Dictionary<string, SztlFieldGroup> SubGroups { get; set; } = new();
}

View File

@@ -0,0 +1,6 @@
namespace SessionZero.Data.Sztl;
public class SztlFileHandler
{
}

View File

@@ -0,0 +1,6 @@
namespace SessionZero.Data.Sztl;
public static class SztlParser
{
}

View File

@@ -1,7 +0,0 @@
namespace SessionZero.Data.Sztl;
public class SztlTemplate
{
}

View File

@@ -1,9 +0,0 @@
namespace SessionZero.Data.Sztl;
public class SztlTokenizer
{
enum TokenType
{
// TODO: Add token types
}
}