Integrate fuel line and strut variants

1-10-updates
Andrew Cassidy 4 years ago
parent 2e6a9d5190
commit 1671a65656
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1

@ -64,7 +64,6 @@ Localization
#LOC_Restock_variant-mounting_compact = Compact #LOC_Restock_variant-mounting_compact = Compact
#LOC_Restock_variant-mounting_mounted = Mounted #LOC_Restock_variant-mounting_mounted = Mounted
#LOC_Restock_variant-gold-truss = Gold (Mounted) #LOC_Restock_variant-gold-truss = Gold (Mounted)
#LOC_Restock_variant-silver-truss = Silver (Mounted) #LOC_Restock_variant-silver-truss = Silver (Mounted)
@ -96,13 +95,19 @@ Localization
#LOC_Restock_variant-surface_truss = Truss #LOC_Restock_variant-surface_truss = Truss
#LOC_Restock_variant-surface_warningStripes = Warning Stripes #LOC_Restock_variant-surface_warningStripes = Warning Stripes
#LOC_Restock_variant-surface_thermalblankets = Insulated #LOC_Restock_variant-surface_thermalblankets = Insulated
#LOC_Restock_variant-surface_yellow = Yellow
#LOC_Restock_variant-surface_black = Black
#LOC_Restock_variant-surface_white = White
#LOC_Restock_variant-surface_blue = Blue
#LOC_Restock_variant-strut_classic_metal = Metal
#LOC_Restock_variant-strut_classic_white = White
#LOC_Restock_variant-strut_compact_metal = Metal (Compact)
#LOC_Restock_variant-strut_compact_white = White (Compact)
#LOC_Restock_variant-decoupler_metal = Metal #LOC_Restock_variant-decoupler_metal = Metal
#LOC_Restock_variant-decoupler_grey-orange = Orange/Grey #LOC_Restock_variant-decoupler_grey-orange = Orange/Grey
#LOC_Restock_variant-surface_yellow = Yellow
#LOC_Restock_variant-surface_black = Black
#LOC_Restock_variant-service-bay-opaque = Solid Caps #LOC_Restock_variant-service-bay-opaque = Solid Caps
#LOC_Restock_variant-service-bay-transparent = Truss Caps #LOC_Restock_variant-service-bay-transparent = Truss Caps
#LOC_Restock_variant-service-bay-hollow = No Caps #LOC_Restock_variant-service-bay-hollow = No Caps

@ -26,14 +26,16 @@
stretchAxis = x stretchAxis = x
stretchTextures = _MainTex _BumpMap stretchTextures = _MainTex _BumpMap
} }
!MODULE[ModulePartVariants] {}
MODULE MODULE
{ {
name = ModulePartVariants name = ModulePartVariants
useMultipleDragCubes = false useMultipleDragCubes = false
baseVariant = Yellow baseVariant = YellowAndWhite
VARIANT VARIANT
{ {
name = Yellow name = YellowAndWhite
displayName = #LOC_Restock_variant-surface_yellow displayName = #LOC_Restock_variant-surface_yellow
themeName = YellowAndWhite themeName = YellowAndWhite
primaryColor = #B08D43 primaryColor = #B08D43
@ -44,6 +46,8 @@
line_black = false line_black = false
line_metal = false line_metal = false
line_sofi = false line_sofi = false
line_white = false
line_blue = false
} }
} }
VARIANT VARIANT
@ -59,6 +63,8 @@
line_black = true line_black = true
line_metal = false line_metal = false
line_sofi = false line_sofi = false
line_white = false
line_blue = false
} }
} }
VARIANT VARIANT
@ -74,6 +80,8 @@
line_black = false line_black = false
line_metal = true line_metal = true
line_sofi = false line_sofi = false
line_white = false
line_blue = false
} }
} }
VARIANT VARIANT
@ -81,7 +89,7 @@
name = Orange name = Orange
displayName = #autoLOC_8007123 displayName = #autoLOC_8007123
themeName = Orange themeName = Orange
primaryColor = #B08D43 primaryColor = #A55929
secondaryColor = #999999 secondaryColor = #999999
GAMEOBJECTS GAMEOBJECTS
{ {
@ -89,6 +97,42 @@
line_black = false line_black = false
line_metal = false line_metal = false
line_sofi = true line_sofi = true
line_white = false
line_blue = false
}
}
VARIANT
{
name = White
displayName = #LOC_Restock_variant-surface_white
themeName = White
primaryColor = #ffffff
secondaryColor = #999999
GAMEOBJECTS
{
line_yellow = false
line_black = false
line_metal = false
line_sofi = false
line_white = true
line_blue = false
}
}
VARIANT
{
name = Blue
displayName = #LOC_Restock_variant-surface_blue
themeName = White
primaryColor = #426573
secondaryColor = #999999
GAMEOBJECTS
{
line_yellow = false
line_black = false
line_metal = false
line_sofi = false
line_white = false
line_blue = true
} }
} }
} }

@ -26,16 +26,18 @@
stretchAxis = x stretchAxis = x
stretchTextures = _MainTex _BumpMap stretchTextures = _MainTex _BumpMap
} }
!MODULE[ModulePartVariants] {}
MODULE MODULE
{ {
name = ModulePartVariants name = ModulePartVariants
useMultipleDragCubes = false useMultipleDragCubes = false
baseVariant = Classic baseVariant = Gray
VARIANT VARIANT
{ {
name = Classic name = Gray
displayName = #LOC_Restock_variant-mounting_classic displayName = #LOC_Restock_variant-strut_classic_metal
themeName = White themeName = Metal
primaryColor = #6f6e6d primaryColor = #6f6e6d
secondaryColor = #999999 secondaryColor = #999999
GAMEOBJECTS GAMEOBJECTS
@ -44,13 +46,19 @@
strut_target_body_classic = true strut_target_body_classic = true
strut_main_body_compact = false strut_main_body_compact = false
strut_target_body_compact = false strut_target_body_compact = false
strut_main_body_classic_white = false
strut_target_body_classic_white = false
strut_main_body_compact_white = false
strut_target_body_compact_white = false
strut_metal = true
strut_white = false
} }
} }
VARIANT VARIANT
{ {
name = Compact name = Compact
displayName = #LOC_Restock_variant-mounting_compact displayName = #LOC_Restock_variant-strut_compact_metal
themeName = White themeName = Metal
primaryColor = #6f6e6d primaryColor = #6f6e6d
secondaryColor = #999999 secondaryColor = #999999
GAMEOBJECTS GAMEOBJECTS
@ -59,6 +67,54 @@
strut_target_body_classic = false strut_target_body_classic = false
strut_main_body_compact = true strut_main_body_compact = true
strut_target_body_compact = true strut_target_body_compact = true
strut_main_body_classic_white = false
strut_target_body_classic_white = false
strut_main_body_compact_white = false
strut_target_body_compact_white = false
strut_metal = true
strut_white = false
}
}
VARIANT
{
name = White
displayName = #LOC_Restock_variant-strut_classic_white
themeName = White
primaryColor = #ffffff
secondaryColor = #999999
GAMEOBJECTS
{
strut_main_body_classic = false
strut_target_body_classic = false
strut_main_body_compact = false
strut_target_body_compact = false
strut_main_body_classic_white = true
strut_target_body_classic_white = true
strut_main_body_compact_white = false
strut_target_body_compact_white = false
strut_metal = false
strut_white = true
}
}
VARIANT
{
name = White_Compact
displayName = #LOC_Restock_variant-strut_compact_white
themeName = White
primaryColor = #ffffff
secondaryColor = #999999
GAMEOBJECTS
{
strut_main_body_classic = false
strut_target_body_classic = false
strut_main_body_compact = false
strut_target_body_compact = false
strut_main_body_classic_white = false
strut_target_body_classic_white = false
strut_main_body_compact_white = true
strut_target_body_compact_white = true
strut_metal = false
strut_white = true
} }
} }
} }

@ -1,5 +1,6 @@
v1.2.0 v1.2.0
------ ------
- KSP 1.10
- New stock part replacements - New stock part replacements
- Resources - Resources
-FTE-1 Drain Valve (Andrew Cassidy): now has metal and warning stripe variants -FTE-1 Drain Valve (Andrew Cassidy): now has metal and warning stripe variants
@ -11,6 +12,9 @@ v1.2.0
- Mk2 Command Pod (Andrew Cassidy): Now has dark and white variants. - Mk2 Command Pod (Andrew Cassidy): Now has dark and white variants.
- Coupling - Coupling
- Inflatable Airlock (Andrew Cassidy): now has built in decoupler and optional ring to connect seamlessly with KV-series pods. Has a new IVA. - Inflatable Airlock (Andrew Cassidy): now has built in decoupler and optional ring to connect seamlessly with KV-series pods. Has a new IVA.
- Bugfixes and tweaks
- New White and White (compact) variants for EAS-4 Strut Connector
- New White and Blue variants for the FTX-2 External Fuel Duct
v1.1.2 v1.1.2
------ ------

@ -9,13 +9,11 @@ namespace Restock
public class ModuleRestockLinkedMesh : CModuleLinkedMesh public class ModuleRestockLinkedMesh : CModuleLinkedMesh
{ {
// the direction along the texture that the pipe points. set to "x" or "y" // the direction along the texture that the pipe points. set to "x" or "y"
[KSPField] [KSPField] public string stretchAxis = "x";
public string stretchAxis = "x";
// space-seperated list of textures to be effected by the length, preferably all of the ones on the material // space-seperated list of textures to be effected by the length, preferably all of the ones on the material
// Unity has no good way to get all the texture names attached to a material so it has to be set manually, unfortunately // Unity has no good way to get all the texture names attached to a material so it has to be set manually, unfortunately
[KSPField] [KSPField] public string stretchTextures = "_MainTex";
public string stretchTextures = "_MainTex";
// reference to the material we will be modifying // reference to the material we will be modifying
@ -100,12 +98,12 @@ namespace Restock
texScale[pipeStretchIndex] = stretch; texScale[pipeStretchIndex] = stretch;
texOffset[pipeStretchIndex] = (1 - stretch) / 2; texOffset[pipeStretchIndex] = (1 - stretch) / 2;
for (var i = 0; i < pipeMaterials.Length; i++) foreach (var material in pipeMaterials)
{ {
var material = pipeMaterials[i]; foreach (var id in pipeMaterialIDs)
for (var j = 0; j < pipeMaterialIDs.Length; j++) {
if (material.HasProperty(id))
{ {
var id = pipeMaterialIDs[j];
material.SetTextureScale(id, texScale); material.SetTextureScale(id, texScale);
material.SetTextureOffset(id, texOffset); material.SetTextureOffset(id, texOffset);
} }
@ -113,3 +111,4 @@ namespace Restock
} }
} }
} }
}
Loading…
Cancel
Save