diff --git a/README.md b/README.md index 490ed9b..1db6b28 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,7 @@ Known Issues Licence ------- -Copyright © 2013-2016 Davorin Učakar, Ryan Bray, RangeMachine +Copyright © 2013-2018 Davorin Učakar, Ryan Bray, RangeMachine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/Sources/Loader.cs b/Sources/Loader.cs index 971e7a7..9f03e30 100644 --- a/Sources/Loader.cs +++ b/Sources/Loader.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * Copyright © 2013 Ryan Bray * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/Sources/Personaliser.cs b/Sources/Personaliser.cs index a93ad31..bd85889 100644 --- a/Sources/Personaliser.cs +++ b/Sources/Personaliser.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -529,7 +529,7 @@ private void personaliseKerbal(Component component, ProtoCrewMember kerbal, Part kerbalIVA.textureVeteran = newTexture; } break; - + case "helmet": case "mesh_female_kerbalAstronaut01_helmet": if (isEva) @@ -562,7 +562,8 @@ private void personaliseKerbal(Component component, ProtoCrewMember kerbal, Part } break; - default: // Jetpack. + default: + // Jetpack. if (isEva) { smr.enabled = needsSuit; @@ -583,11 +584,31 @@ private void personaliseKerbal(Component component, ProtoCrewMember kerbal, Part material.SetTexture(Util.BUMPMAP_PROPERTY, newNormalMap); } } + + if (isEva) + { + foreach (Transform trans in component.GetComponentsInChildren()) + { + if (trans.name == "EVAparachute") + { + foreach (Renderer renderer in trans.GetComponentsInChildren(true)) + { + if (!needsSuit) + { + renderer.transform.localPosition += Vector3.forward * 0.1f; + renderer.transform.localPosition += Vector3.up * -0.03f; + } + else + renderer.transform.localPosition = Vector3.zero; + } + } + } + } } /** - * Personalise Kerbals in an internal space of a vessel. Used by IvaModule. - */ + * Personalise Kerbals in an internal space of a vessel. Used by IvaModule. + */ public void personaliseIva(Kerbal kerbal) { diff --git a/Sources/Properties/AssemblyInfo.cs b/Sources/Properties/AssemblyInfo.cs index a163a6f..812426d 100644 --- a/Sources/Properties/AssemblyInfo.cs +++ b/Sources/Properties/AssemblyInfo.cs @@ -5,9 +5,9 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TextureReplacer")] -[assembly: AssemblyCopyright("© 2013-2017 Davorin Učakar, Ryan Bray, RangeMachine")] +[assembly: AssemblyCopyright("© 2013-2018 Davorin Učakar, Ryan Bray, RangeMachine")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("2.6.0.0")] +[assembly: AssemblyVersion("2.7.0.0")] -[assembly: KSPAssembly("Texture Replacer", 2, 6)] \ No newline at end of file +[assembly: KSPAssembly("Texture Replacer", 2, 7)] \ No newline at end of file diff --git a/Sources/Reflections.cs b/Sources/Reflections.cs index 4a206c4..cb7366d 100644 --- a/Sources/Reflections.cs +++ b/Sources/Reflections.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -309,7 +309,7 @@ public void setReflectionType(Type type) material.shader = enableStatic ? visorShader : transparentSpecularShader; /////////////////////////////////////////////////////////////////////////////////////////// - // In 1.2 visor texture some reason want load by default way + // In 1.2 visor texture some reason dont want load by default way /////////////////////////////////////////////////////////////////////////////////////////// Texture visorTex = GameDatabase.Instance.GetTexture(Util.DIR + "Default/EVAVisor", false); diff --git a/Sources/Replacer.cs b/Sources/Replacer.cs index ebd292c..7d7e6d9 100644 --- a/Sources/Replacer.cs +++ b/Sources/Replacer.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -58,6 +58,9 @@ private void replaceTextures() { foreach (Material material in Resources.FindObjectsOfTypeAll()) { + if (!material.HasProperty("_MainTex")) + continue; + Texture texture = material.mainTexture; if (texture == null || texture.name.Length == 0 || texture.name.StartsWith("Temp", StringComparison.Ordinal)) @@ -81,6 +84,9 @@ private void replaceTextures() } } + if (!material.HasProperty(Util.BUMPMAP_PROPERTY)) + continue; + Texture normalMap = material.GetTexture(Util.BUMPMAP_PROPERTY); if (normalMap == null) continue; diff --git a/Sources/TRActivator.cs b/Sources/TRActivator.cs index e899d9f..5420dbf 100644 --- a/Sources/TRActivator.cs +++ b/Sources/TRActivator.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Sources/TRGui.cs b/Sources/TRGui.cs index 666f061..ec4cb0c 100644 --- a/Sources/TRGui.cs +++ b/Sources/TRGui.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Sources/TRReflection.cs b/Sources/TRReflection.cs index e47991b..f0653c7 100644 --- a/Sources/TRReflection.cs +++ b/Sources/TRReflection.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Sources/TRScenario.cs b/Sources/TRScenario.cs index 399a68c..f39c03a 100644 --- a/Sources/TRScenario.cs +++ b/Sources/TRScenario.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Sources/TextureReplacer.cs b/Sources/TextureReplacer.cs index 905a206..8e40df3 100644 --- a/Sources/TextureReplacer.cs +++ b/Sources/TextureReplacer.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Sources/Util.cs b/Sources/Util.cs index f6ede23..7091b4b 100644 --- a/Sources/Util.cs +++ b/Sources/Util.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2016 Davorin Učakar, RangeMachine + * Copyright © 2013-2018 Davorin Učakar, RangeMachine * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/Unity/Assets/Scenes.meta b/Unity/Assets/Editor.meta similarity index 67% rename from Unity/Assets/Scenes.meta rename to Unity/Assets/Editor.meta index c974ad6..9b3b782 100644 --- a/Unity/Assets/Scenes.meta +++ b/Unity/Assets/Editor.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2a72922e5c258d94882a71cedb2873fb +guid: caccf25fa479022418cff9ebba29c463 folderAsset: yes -timeCreated: 1474327345 +timeCreated: 1520396332 licenseType: Free DefaultImporter: userData: diff --git a/Unity/Assets/Scripts.meta b/Unity/Assets/Editor/Scripts.meta similarity index 100% rename from Unity/Assets/Scripts.meta rename to Unity/Assets/Editor/Scripts.meta diff --git a/Unity/Assets/Scripts/BuildBundles.cs b/Unity/Assets/Editor/Scripts/BuildBundles.cs similarity index 93% rename from Unity/Assets/Scripts/BuildBundles.cs rename to Unity/Assets/Editor/Scripts/BuildBundles.cs index 31a8a23..29b158c 100644 --- a/Unity/Assets/Scripts/BuildBundles.cs +++ b/Unity/Assets/Editor/Scripts/BuildBundles.cs @@ -24,6 +24,10 @@ public class BuildShaders [MenuItem("TextureReplacer/Build Shaders")] private static void BuildForAllPlatforms() { + // Check directory + if (!Directory.Exists("Bundles")) + Directory.CreateDirectory("Bundles"); + // Cleanup File.Delete("Bundles/DirectX.bundle"); File.Delete("Bundles/OpenGL.bundle"); diff --git a/Unity/Assets/Scripts/BuildBundles.cs.meta b/Unity/Assets/Editor/Scripts/BuildBundles.cs.meta similarity index 100% rename from Unity/Assets/Scripts/BuildBundles.cs.meta rename to Unity/Assets/Editor/Scripts/BuildBundles.cs.meta diff --git a/Unity/Assets/Scenes/Shaders.unity b/Unity/Assets/Scenes/Shaders.unity deleted file mode 100644 index 8f47cb5..0000000 Binary files a/Unity/Assets/Scenes/Shaders.unity and /dev/null differ diff --git a/Unity/Assets/Scenes/Shaders.unity.meta b/Unity/Assets/Scenes/Shaders.unity.meta deleted file mode 100644 index 96f975d..0000000 --- a/Unity/Assets/Scenes/Shaders.unity.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 288cc94b8d20b634498f1c4c2b98cb0c -timeCreated: 1474327345 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity/ProjectSettings/GraphicsSettings.asset b/Unity/ProjectSettings/GraphicsSettings.asset index 8c694b0..67097fd 100644 Binary files a/Unity/ProjectSettings/GraphicsSettings.asset and b/Unity/ProjectSettings/GraphicsSettings.asset differ diff --git a/Unity/ProjectSettings/ProjectSettings.asset b/Unity/ProjectSettings/ProjectSettings.asset index 3dfc7a0..ee1f549 100644 Binary files a/Unity/ProjectSettings/ProjectSettings.asset and b/Unity/ProjectSettings/ProjectSettings.asset differ diff --git a/Unity/ProjectSettings/ProjectVersion.txt b/Unity/ProjectSettings/ProjectVersion.txt index 96b25e7..aba115f 100644 --- a/Unity/ProjectSettings/ProjectVersion.txt +++ b/Unity/ProjectSettings/ProjectVersion.txt @@ -1,2 +1 @@ -m_EditorVersion: 5.4.1f1 -m_StandardAssetsVersion: 0 +m_EditorVersion: 2017.1.3f1