mirror of
https://github.com/PorktoberRevolution/ReStocked
synced 2024-09-01 17:34:42 +00:00
Glowy test
This commit is contained in:
parent
d50c8ad21c
commit
a930b09165
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -27,6 +27,44 @@
|
||||
scale = 1,-1,1
|
||||
rotation = 0, 0, 0
|
||||
}
|
||||
|
||||
@MODULE[ModuleColorChanger]
|
||||
{
|
||||
moduleID = hullLightColor
|
||||
}
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = true
|
||||
toggleInEditor = false
|
||||
toggleInFlight = false
|
||||
unfocusedRange = 5
|
||||
toggleAction = false
|
||||
redCurve
|
||||
{
|
||||
key = 0 0 0 3
|
||||
key = 1 1 0 0
|
||||
}
|
||||
greenCurve
|
||||
{
|
||||
key = 0 0 0 1
|
||||
key = 1 1 1 0
|
||||
}
|
||||
blueCurve
|
||||
{
|
||||
key = 0 0 0 0
|
||||
key = 1 0.7 1.5 0
|
||||
}
|
||||
alphaCurve
|
||||
{
|
||||
key = 0 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mk1 Pod
|
||||
|
@ -29,6 +29,46 @@
|
||||
scale = 1,1,1
|
||||
rotation = 0, 0, 0
|
||||
}
|
||||
|
||||
@MODULE[ModuleColorChanger]
|
||||
{
|
||||
moduleID = hullLightColor
|
||||
}
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = true
|
||||
toggleInEditor = false
|
||||
toggleInFlight = false
|
||||
unfocusedRange = 5
|
||||
toggleAction = false
|
||||
redCurve
|
||||
{
|
||||
key = 0 0 0 3
|
||||
key = 1 1 0 0
|
||||
}
|
||||
greenCurve
|
||||
{
|
||||
key = 0 0 0 1
|
||||
key = 1 1 1 0
|
||||
}
|
||||
blueCurve
|
||||
{
|
||||
key = 0 0 0 0
|
||||
key = 1 0.7 1.5 0
|
||||
}
|
||||
alphaCurve
|
||||
{
|
||||
key = 0 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Hitchhiker
|
||||
|
Binary file not shown.
43
Source/Restock/ModuleRestockLinkedColorChanger.cs
Normal file
43
Source/Restock/ModuleRestockLinkedColorChanger.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Restock
|
||||
{
|
||||
public class ModuleRestockLinkedColorChanger : ModuleColorChanger
|
||||
{
|
||||
|
||||
// The module to link this ColorChanger to
|
||||
[KSPField] public string parentModuleID = "moduleName";
|
||||
|
||||
public ModuleColorChanger parentModuleColorChanger;
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
if (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneIsEditor)
|
||||
{
|
||||
|
||||
foreach (ModuleColorChanger mcc in part.GetComponents<ModuleColorChanger>())
|
||||
{
|
||||
Debug.Log(mcc.moduleID);
|
||||
if (mcc.moduleID == parentModuleID)
|
||||
{
|
||||
parentModuleColorChanger = mcc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void FixedUpdate()
|
||||
{
|
||||
base.FixedUpdate();
|
||||
if (!parentModuleColorChanger)
|
||||
return;
|
||||
|
||||
SetScalar(parentModuleColorChanger.GetScalar);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -33,14 +33,17 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AnimationModule">
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -55,6 +58,7 @@
|
||||
<Compile Include="MaterialModifiers\MaterialModifierParser.cs" />
|
||||
<Compile Include="MaterialModifiers\TexturePropertyMaterialModifier.cs" />
|
||||
<Compile Include="ModuleRestockLaunchClamp.cs" />
|
||||
<Compile Include="ModuleRestockLinkedColorChanger.cs" />
|
||||
<Compile Include="ModuleRestockLinkedMesh.cs" />
|
||||
<Compile Include="ModuleRestockDepthMask.cs" />
|
||||
<Compile Include="ModuleRestockHeatEffects.cs" />
|
||||
@ -66,8 +70,12 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ResourceBlacklist.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>sh -e -c "cp -v '$(TargetPath)' '$(SolutionDir)/../Distribution/Restock/GameData/ReStock/Plugins'"</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user