暂存condition desc
This commit is contained in:
@@ -85,7 +85,20 @@ namespace WulaFallenEmpire
|
||||
|
||||
HandleAction(def.immediateEffects);
|
||||
|
||||
// Format the description AFTER immediate effects have run
|
||||
// Append conditional descriptions
|
||||
if (!def.conditionalDescriptions.NullOrEmpty())
|
||||
{
|
||||
foreach (var condDesc in def.conditionalDescriptions)
|
||||
{
|
||||
string reason;
|
||||
if (AreConditionsMet(condDesc.conditions, out reason))
|
||||
{
|
||||
selectedDescription += "\n\n" + condDesc.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Format the description AFTER immediate effects have run and conditional text is appended
|
||||
selectedDescription = FormatDescription(selectedDescription);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace WulaFallenEmpire
|
||||
public string backgroundImagePath;
|
||||
public List<ConditionalEffects> immediateEffects;
|
||||
public List<ConditionalEffects> dismissEffects;
|
||||
public List<ConditionalDescription> conditionalDescriptions;
|
||||
|
||||
public override void PostLoad()
|
||||
{
|
||||
base.PostLoad();
|
||||
@@ -71,4 +73,10 @@ namespace WulaFallenEmpire
|
||||
public List<Condition> conditions;
|
||||
public List<Effect> effects;
|
||||
}
|
||||
|
||||
public class ConditionalDescription
|
||||
{
|
||||
public List<Condition> conditions;
|
||||
public string text;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user