forked from liza/Questionable
Update source generator
This commit is contained in:
parent
3800ce8b69
commit
c521860851
@ -346,6 +346,8 @@ public class QuestSourceGenerator : ISourceGenerator
|
|||||||
.AsSyntaxNodeOrToken(),
|
.AsSyntaxNodeOrToken(),
|
||||||
AssignmentList(nameof(QuestStep.KillEnemyDataIds), step.KillEnemyDataIds)
|
AssignmentList(nameof(QuestStep.KillEnemyDataIds), step.KillEnemyDataIds)
|
||||||
.AsSyntaxNodeOrToken(),
|
.AsSyntaxNodeOrToken(),
|
||||||
|
AssignmentList(nameof(QuestStep.ComplexCombatData), step.ComplexCombatData)
|
||||||
|
.AsSyntaxNodeOrToken(),
|
||||||
Assignment(nameof(QuestStep.JumpDestination), step.JumpDestination,
|
Assignment(nameof(QuestStep.JumpDestination), step.JumpDestination,
|
||||||
emptyStep.JumpDestination)
|
emptyStep.JumpDestination)
|
||||||
.AsSyntaxNodeOrToken(),
|
.AsSyntaxNodeOrToken(),
|
||||||
|
@ -162,7 +162,24 @@ public static class RoslynShortcuts
|
|||||||
else
|
else
|
||||||
throw new Exception($"Unsupported ExcelRef type {excelRef.Type}");
|
throw new Exception($"Unsupported ExcelRef type {excelRef.Type}");
|
||||||
}
|
}
|
||||||
else if (value is null)
|
else if (value is ComplexCombatData complexCombatData)
|
||||||
|
{
|
||||||
|
return ObjectCreationExpression(
|
||||||
|
IdentifierName(nameof(ComplexCombatData)))
|
||||||
|
.WithInitializer(
|
||||||
|
InitializerExpression(
|
||||||
|
SyntaxKind.ObjectInitializerExpression,
|
||||||
|
SeparatedList<ExpressionSyntax>(
|
||||||
|
SyntaxNodeList(
|
||||||
|
Assignment(nameof(ComplexCombatData.DataId), complexCombatData.DataId, default(uint))
|
||||||
|
.AsSyntaxNodeOrToken(),
|
||||||
|
Assignment(nameof(ComplexCombatData.RewardItemId), complexCombatData.RewardItemId, null)
|
||||||
|
.AsSyntaxNodeOrToken(),
|
||||||
|
Assignment(nameof(ComplexCombatData.RewardItemCount), complexCombatData.RewardItemCount, null)
|
||||||
|
.AsSyntaxNodeOrToken(),
|
||||||
|
AssignmentList(nameof(ComplexCombatData.CompletionQuestVariablesFlags), complexCombatData.CompletionQuestVariablesFlags)
|
||||||
|
.AsSyntaxNodeOrToken()))));
|
||||||
|
}else if (value is null)
|
||||||
return LiteralExpression(SyntaxKind.NullLiteralExpression);
|
return LiteralExpression(SyntaxKind.NullLiteralExpression);
|
||||||
else
|
else
|
||||||
throw new Exception($"Unsupported data type {value.GetType()} = {value}");
|
throw new Exception($"Unsupported data type {value.GetType()} = {value}");
|
||||||
|
Loading…
Reference in New Issue
Block a user