Implement set variable annotation.

This commit is contained in:
2023-03-09 11:38:49 +08:00
parent 505b826627
commit 76df4929a7
4 changed files with 69 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ namespace Cryville.Crtr {
else if (name == _var_null) { LoadIdent(0); type = PdtInternalType.Undefined; value = _numbuf; }
else {
var id = new Identifier(name);
PropSrc prop;
PropSrc prop; SkinVariable variable;
if (ContextEvent != null && ContextEvent.PropSrcs.TryGetValue(name, out prop)) {
prop.Get(out type, out value);
}
@@ -45,6 +45,9 @@ namespace Cryville.Crtr {
prop.Get(out type, out value);
RevokePotentialConstant();
}
else if (ContextSkinContainer != null && ContextSkinContainer.Variables.TryGetValue(name, out variable)) {
variable.Src.Get(out type, out value);
}
else if (ContextJudge != null && ContextJudge.TryGetScoreSrc(name, out prop)) {
prop.Get(out type, out value);
RevokePotentialConstant();
@@ -106,6 +109,7 @@ namespace Cryville.Crtr {
public ChartEvent ContextEvent { get; set; }
public ContainerState ContextState { get; set; }
public SkinContainer ContextSkinContainer { get; set; }
public Transform ContextTransform { get; set; }
public Judge ContextJudge { get; set; }
public PropSrc ContextSelfValue { get; set; }