Skip to content

Commit 5d7c150

Browse files
authored
Merge pull request #43 from KSP2Community/shoemaker-integration
Integrate Shoemaker
2 parents e68d10c + 17535fd commit 5d7c150

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1350
-1
lines changed

.idea/.idea.PatchManager/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.PatchManager/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.PatchManager/.idea/projectSettingsUpdater.xml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/PatchManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public void Awake()
3030
ModuleManager.Register(typeof(PartsModule));
3131
ModuleManager.Register(typeof(ResourcesModule));
3232
ModuleManager.Register(typeof(ScienceModule));
33+
ModuleManager.Register(typeof(PlanetsModule));
3334
Logging.Initialize(SWLogger);
3435
foreach (var module in ModuleManager.Modules)
3536
{

Runtime/Planets.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/Planets/Modifiables.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using PatchManager.SassyPatching;
2+
using PatchManager.SassyPatching.Modifiables;
3+
using PatchManager.Planets.Selectables;
4+
5+
namespace PatchManager.Planets.Modifiables
6+
{
7+
public class AtmosphereOverrideModifiable : JTokenModifiable
8+
{
9+
private AtmosphereOverrideSelectable _atmosphereOverrideSelectable;
10+
11+
/// <summary>
12+
/// Creates a new <see cref="GalaxyModifiable"/> for the given <see cref="GalaxyModifiable"/>.
13+
/// </summary>
14+
/// <param name="selectable">The selectable to modify.</param>
15+
public AtmosphereOverrideModifiable(AtmosphereOverrideSelectable selectable) : base(selectable.AtmosphereOverrideObject, selectable.SetModified) => _atmosphereOverrideSelectable = selectable;
16+
17+
/// <inheritdoc/>
18+
public override void Set(DataValue dataValue)
19+
{
20+
if (dataValue.IsDeletion)
21+
{
22+
_atmosphereOverrideSelectable.SetDeleted();
23+
return;
24+
}
25+
base.Set(dataValue);
26+
}
27+
}
28+
}

Runtime/Planets/Modifiables/AtmosphereOverrideModifiable.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using PatchManager.SassyPatching;
2+
using PatchManager.SassyPatching.Modifiables;
3+
using PatchManager.Planets.Selectables;
4+
5+
namespace PatchManager.Planets.Modifiables
6+
{
7+
public class CelestialBodyModifiable : JTokenModifiable
8+
{
9+
private CelestialBodySelectable _celestialBodySelectable;
10+
11+
/// <summary>
12+
/// Creates a new <see cref="CelestialBodyModifiable"/> for the given <see cref="CelestialBodyModifiable"/>.
13+
/// </summary>
14+
/// <param name="selectable">The selectable to modify.</param>
15+
public CelestialBodyModifiable(CelestialBodySelectable selectable) : base(selectable.DataObject, selectable.SetModified) => _celestialBodySelectable = selectable;
16+
17+
/// <inheritdoc/>
18+
public override void Set(DataValue dataValue)
19+
{
20+
if (dataValue.IsDeletion)
21+
{
22+
_celestialBodySelectable.SetDeleted();
23+
return;
24+
}
25+
base.Set(dataValue);
26+
}
27+
}
28+
}

Runtime/Planets/Modifiables/CelestialBodyModifiable.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)