-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathMissionFactionEffect.cs
More file actions
49 lines (38 loc) · 1.63 KB
/
MissionFactionEffect.cs
File metadata and controls
49 lines (38 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System.Collections.Generic;
using Utilities;
namespace EddiDataDefinitions
{
public class MissionFactionEffect
{
[PublicAPI("The influenced faction")]
public string faction { get; }
public List<MissionEffect> effects { get; }
[PublicAPI("Influences, as a list")]
public List<MissionInfluence> influences { get; }
[PublicAPI("The reputation impact (in plusses)")]
public string reputation { get; } // e.g. "+++"
public MissionFactionEffect(string faction, List<MissionEffect> effects, List<MissionInfluence> influences, string reputation)
{
// Replace `$#MinorFaction;` with the affected faction name
effects.ForEach(e =>
e.localizedEffect = e.localizedEffect.Replace("$#MinorFaction;", faction));
// TODO: Update the localized effects to replace `$#System;` with the affected system name
this.faction = faction;
this.effects = effects;
this.influences = influences;
this.reputation = reputation;
}
}
public class MissionEffect ( string edEffect, string localizedEffect )
{
public string edEffect { get; } = edEffect;
public string localizedEffect { get; set; } = localizedEffect;
}
public class MissionInfluence ( ulong systemAddress, string influence )
{
[PublicAPI("The system address of the influenced system")]
public ulong systemAddress { get; } = systemAddress;
[PublicAPI("The influence impact (in plusses)")]
public string influence { get; } = influence; // e.g. "++"
}
}