2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-06 16:57:25 +00:00

ZoneCodeGenerator: Make unions work with conditions and only load one union member at a time consistently

This commit is contained in:
Jan
2019-12-06 16:33:05 +01:00
parent f4a2639e30
commit 9253ac14fa
9 changed files with 196 additions and 17 deletions

View File

@@ -1,29 +1,34 @@
using System.Collections.Generic;
using System.Linq;
using ZoneCodeGenerator.Domain.Evaluation;
using ZoneCodeGenerator.Domain.FastFileStructure;
using ZoneCodeGenerator.Generating.Computations;
namespace ZoneCodeGenerator.Domain.Information
{
class MemberInformation
{
public StructureInformation Parent { get; }
public StructureInformation StructureType { get; }
public Variable Member { get; set; }
public bool IsString { get; set; }
public bool IsScriptString { get; set; }
public bool IsReusable { get; set; }
public bool IsLeaf { get; set; }
public IEvaluation Condition { get; set; }
public FastFileBlock Block { get; set; }
public MemberComputations Computations => new MemberComputations(this);
public MemberInformation(Variable member, StructureInformation structureType)
public MemberInformation(StructureInformation parent, Variable member, StructureInformation structureType)
{
Parent = parent;
Member = member;
StructureType = structureType;
IsString = false;
IsScriptString = false;
IsReusable = false;
IsLeaf = false;
Condition = null;
Block = null;
}