A game about forced loneliness, made by TACStudios
1using System.Collections.Generic;
2
3namespace Unity.VisualScripting
4{
5 [Analyser(typeof(INesterState))]
6 public class NesterStateAnalyser<TNesterState> : StateAnalyser<TNesterState>
7 where TNesterState : class, INesterState
8 {
9 public NesterStateAnalyser(GraphReference reference, TNesterState state) : base(reference, state) { }
10
11 protected override IEnumerable<Warning> Warnings()
12 {
13 foreach (var baseWarning in base.Warnings())
14 {
15 yield return baseWarning;
16 }
17
18 if (state.childGraph == null)
19 {
20 yield return Warning.Caution("Missing nested graph.");
21 }
22
23 if (state.nest.hasBackgroundEmbed)
24 {
25 yield return Warning.Caution("Background embed graph detected.");
26 }
27 }
28 }
29}