-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathGalaxyModifiable.cs
More file actions
28 lines (25 loc) · 931 Bytes
/
GalaxyModifiable.cs
File metadata and controls
28 lines (25 loc) · 931 Bytes
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
using PatchManager.SassyPatching;
using PatchManager.SassyPatching.Modifiables;
using PatchManager.Planets.Selectables;
namespace PatchManager.Planets.Modifiables
{
public class GalaxyModifiable : JTokenModifiable
{
private GalaxySelectable _galaxySelectable;
/// <summary>
/// Creates a new <see cref="GalaxyModifiable"/> for the given <see cref="GalaxyModifiable"/>.
/// </summary>
/// <param name="selectable">The selectable to modify.</param>
public GalaxyModifiable(GalaxySelectable selectable) : base(selectable.GalaxyObject, selectable.SetModified) => _galaxySelectable = selectable;
/// <inheritdoc/>
public override void Set(DataValue dataValue)
{
if (dataValue.IsDeletion)
{
_galaxySelectable.SetDeleted();
return;
}
base.Set(dataValue);
}
}
}