mirror of
https://github.com/PorktoberRevolution/ReStocked
synced 2024-09-01 17:34:42 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3fd3a084e | |||
00b4c5ada5 | |||
2f76430ec9 | |||
8807a536fc | |||
a930b09165 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,60 @@
|
||||
// Patches applying art changes to crewed command parts
|
||||
// Contents:
|
||||
// -
|
||||
@PART[mk3Cockpit_Shuttle]:HAS[~RestockIgnore[*]]:FOR[ReStock]
|
||||
{
|
||||
@author = Chris Adderley (Nertea)
|
||||
!mesh = DELETE
|
||||
!MODEL,* {}
|
||||
MODEL
|
||||
{
|
||||
model = Squad/Parts/Command/mk3CockpitShuttle/model
|
||||
position = 0.0, 0.0, 0.0
|
||||
scale = 1,1,1
|
||||
rotation = 0, 0, 0
|
||||
}
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Command/restock-mk3-cockpit-windows-1
|
||||
position = 0.0, 0.0, 0.0
|
||||
rotation = 0, 0, 0
|
||||
texture = restock-dummy-1, Squad/Parts/Command/mk3CockpitShuttle/Mk3CockpitShuttle
|
||||
}
|
||||
@MODULE[ModuleColorChanger]
|
||||
{
|
||||
moduleID = hullLightColor
|
||||
}
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = false
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
@ -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 = false
|
||||
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
|
||||
@ -92,6 +130,44 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MODULE[ModuleColorChanger]
|
||||
{
|
||||
moduleID = hullLightColor
|
||||
}
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = false
|
||||
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-3 Pod
|
||||
@ -154,6 +230,44 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MODULE[ModuleColorChanger]
|
||||
{
|
||||
moduleID = hullLightColor
|
||||
}
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 1.6
|
||||
animState = false
|
||||
useRate = false
|
||||
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 0.95 1 0
|
||||
}
|
||||
blueCurve
|
||||
{
|
||||
key = 0 0 0 0
|
||||
key = 1 0.62 1.5 0
|
||||
}
|
||||
alphaCurve
|
||||
{
|
||||
key = 0 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mk1 Lander Can
|
||||
@ -170,6 +284,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 = false
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mk2 Lander Can
|
||||
@ -210,4 +362,42 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MODULE[ModuleColorChanger]
|
||||
{
|
||||
moduleID = hullLightColor
|
||||
}
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = false
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +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 = false
|
||||
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
|
||||
@PART[crewCabin]:HAS[~RestockIgnore[*]]:FOR[ReStock]
|
||||
@ -58,4 +97,42 @@
|
||||
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 = false
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +202,7 @@
|
||||
{
|
||||
name = ModuleColorChanger
|
||||
shaderProperty = _EmissiveColor
|
||||
moduleID = hullLightColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = true
|
||||
@ -234,6 +235,42 @@
|
||||
key = 0 1
|
||||
}
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockLinkedColorChanger
|
||||
parentModuleID = hullLightColor
|
||||
moduleID = fresnelLightColor
|
||||
shaderProperty = _TintColor
|
||||
animRate = 0.8
|
||||
animState = false
|
||||
useRate = false
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 1.25m radial attach point
|
||||
|
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>
|
Reference in New Issue
Block a user