mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
dddb7f09f3 | |||
3cd229bc23 | |||
4948818065 | |||
036b084d34 | |||
1e3addeb4d | |||
47c70d3071 | |||
9955b9ce30 |
7
.github/workflows/ff-release.yml
vendored
7
.github/workflows/ff-release.yml
vendored
@ -1,5 +1,7 @@
|
|||||||
name: Fast-Forward Release Branch
|
name: Fast-Forward Release Branch
|
||||||
on: [ release ]
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fast-forward:
|
fast-forward:
|
||||||
@ -12,8 +14,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Merge into Release
|
- name: Merge into Release
|
||||||
run: |
|
run: git merge ${{github.ref_name}} --ff-only
|
||||||
git merge ${{github.ref_name}} --ff-only
|
|
||||||
|
|
||||||
- name: Push Changes
|
- name: Push Changes
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
|
4
.github/workflows/ksp-publish.yml
vendored
4
.github/workflows/ksp-publish.yml
vendored
@ -37,7 +37,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
wget --user drewcassidy --password ${{ secrets.PILE_OF_ROCKS_PASS }} https://pileof.rocks/Secret/conformal-decals-dependencies-1.zip
|
wget --user drewcassidy --password ${{ secrets.PILE_OF_ROCKS_PASS }} https://pileof.rocks/Secret/conformal-decals-dependencies-1.zip
|
||||||
unzip conformal-decals-dependencies-*.zip -d ConformalDecals/dlls
|
unzip conformal-decals-dependencies-*.zip -d ConformalDecals/dlls
|
||||||
dotnet build --configuration Release ConformalDecals.sln
|
|
||||||
|
|
||||||
- name: Build DLL
|
- name: Build DLL
|
||||||
working-directory: Source
|
working-directory: Source
|
||||||
@ -50,11 +49,14 @@ jobs:
|
|||||||
wget http://pileof.rocks/KSP/Shabby_v0.2.0.zip
|
wget http://pileof.rocks/KSP/Shabby_v0.2.0.zip
|
||||||
wget https://ksp.sarbian.com/jenkins/job/ModuleManager/161/artifact/ModuleManager.4.2.1.dll
|
wget https://ksp.sarbian.com/jenkins/job/ModuleManager/161/artifact/ModuleManager.4.2.1.dll
|
||||||
wget https://github.com/blowfishpro/B9PartSwitch/releases/download/v2.19.0/B9PartSwitch_v2.19.0.zip
|
wget https://github.com/blowfishpro/B9PartSwitch/releases/download/v2.19.0/B9PartSwitch_v2.19.0.zip
|
||||||
|
wget https://github.com/KSPModdingLibs/HarmonyKSP/releases/download/2.0.4.0/HarmonyKSP_2.0.4.0_for_KSP1.8+.zip
|
||||||
unzip -d Shabby Shabby*.zip
|
unzip -d Shabby Shabby*.zip
|
||||||
unzip -d B9PartSwitch B9PartSwitch*.zip
|
unzip -d B9PartSwitch B9PartSwitch*.zip
|
||||||
|
unzip -d HarmonyKSP HarmonyKSP*.zip
|
||||||
mv Shabby/GameData/Shabby GameData/
|
mv Shabby/GameData/Shabby GameData/
|
||||||
mv ModuleManager*.dll GameData/
|
mv ModuleManager*.dll GameData/
|
||||||
mv B9PartSwitch/GameData/B9PartSwitch GameData/
|
mv B9PartSwitch/GameData/B9PartSwitch GameData/
|
||||||
|
mv HarmonyKSP/GameData/000_Harmony GameData/
|
||||||
|
|
||||||
- name: Upload Unbundled Build
|
- name: Upload Unbundled Build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
16
CHANGELOG.md
16
CHANGELOG.md
@ -8,6 +8,22 @@ All notable changes to this project will be documented in this file
|
|||||||
| website | https://forum.kerbalspaceprogram.com/index.php?/topic/194802-18-111-conformal-decals |
|
| website | https://forum.kerbalspaceprogram.com/index.php?/topic/194802-18-111-conformal-decals |
|
||||||
| author | Andrew Cassidy |
|
| author | Andrew Cassidy |
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed decals not projecting on loading prefabs
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Re-enabled projecting onto TransparentFX layer
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Allowed for regular expressions to be used when blacklisting shaders
|
||||||
|
- Added all Waterfall shaders to the shader blacklist when Waterfall is present
|
||||||
|
|
||||||
|
|
||||||
## 0.2.9 - 2022-03-12
|
## 0.2.9 - 2022-03-12
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
7
GameData/ConformalDecals/Patches/Waterfall.cfg
Normal file
7
GameData/ConformalDecals/Patches/Waterfall.cfg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// Prevent projection onto Waterfall plumes
|
||||||
|
|
||||||
|
CONFORMALDECALS:NEEDS[Waterfall] {
|
||||||
|
SHADERBLACKLIST {
|
||||||
|
shaderRegex = Waterfall/.*
|
||||||
|
}
|
||||||
|
}
|
@ -4,21 +4,13 @@ CONFORMALDECALS {
|
|||||||
|
|
||||||
SHADERBLACKLIST {
|
SHADERBLACKLIST {
|
||||||
shader = DepthMask
|
shader = DepthMask
|
||||||
shader = KSP/Alpha/Cutoff
|
|
||||||
shader = KSP/Alpha/Cutoff Bumped
|
|
||||||
shader = KSP/Alpha/Translucent
|
|
||||||
shader = KSP/Alpha/Translucent Additive
|
|
||||||
shader = KSP/Alpha/Translucent Specular
|
|
||||||
shader = KSP/Alpha/Unlit Transparent
|
|
||||||
shader = KSP/Bumped Specular (Transparent)
|
shader = KSP/Bumped Specular (Transparent)
|
||||||
shader = KSP/FX/ScrollingUnlit
|
shader = KSP/FX/ScrollingUnlit
|
||||||
shader = KSP/Particles/Additive
|
|
||||||
shader = KSP/Particles/Additive (Soft)
|
|
||||||
shader = KSP/Particles/Alpha Blended
|
|
||||||
shader = KSP/Particles/Alpha Blended Emissive Cutout
|
|
||||||
shader = KSP/Specular (Cutoff)
|
shader = KSP/Specular (Cutoff)
|
||||||
shader = KSP/Specular (Transparent)
|
shader = KSP/Specular (Transparent)
|
||||||
shader = Solid Color (Alpha)
|
shader = Solid Color (Alpha)
|
||||||
|
shaderRegex = KSP/Alpha/.*
|
||||||
|
shaderRegex = KSP/Particles/.*
|
||||||
}
|
}
|
||||||
|
|
||||||
FONT {
|
FONT {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"NAME": "ConformalDecals",
|
"NAME": "ConformalDecals",
|
||||||
"URL": "https://github.com/drewcassidy/KSP-Conformal-Decals/releases/latest/download/ConformalDecals.version.txt",
|
"URL": "https://github.com/drewcassidy/KSP-Conformal-Decals/releases/latest/download/ConformalDecals.version",
|
||||||
"DOWNLOAD": "https://github.com/drewcassidy/KSP-Conformal-Decals/releases/latest",
|
"DOWNLOAD": "https://github.com/drewcassidy/KSP-Conformal-Decals/releases/latest",
|
||||||
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/drewcassidy/KSP-Conformal-Decals/release/CHANGELOG.md",
|
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/drewcassidy/KSP-Conformal-Decals/release/CHANGELOG.md",
|
||||||
"VERSION": {
|
"VERSION": {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Conformal Decals v0.2.8
|
# Conformal Decals
|
||||||
[](https://travis-ci.com/drewcassidy/KSP-Conformal-Decals) [](https://creativecommons.org/licenses/by-sa/4.0/) [](https://www.gnu.org/licenses/gpl-3.0)
|
[](https://creativecommons.org/licenses/by-sa/4.0/) [](https://www.gnu.org/licenses/gpl-3.0)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using ConformalDecals.Text;
|
using ConformalDecals.Text;
|
||||||
using ConformalDecals.Util;
|
using ConformalDecals.Util;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
@ -10,6 +11,7 @@ namespace ConformalDecals {
|
|||||||
public static class DecalConfig {
|
public static class DecalConfig {
|
||||||
private static Texture2D _blankNormal;
|
private static Texture2D _blankNormal;
|
||||||
private static List<string> _shaderBlacklist;
|
private static List<string> _shaderBlacklist;
|
||||||
|
private static List<Regex> _shaderRegexBlacklist;
|
||||||
private static Dictionary<string, DecalFont> _fontList;
|
private static Dictionary<string, DecalFont> _fontList;
|
||||||
private static int _decalLayer = 31;
|
private static int _decalLayer = 31;
|
||||||
private static bool _selectableInFlight;
|
private static bool _selectableInFlight;
|
||||||
@ -50,15 +52,23 @@ namespace ConformalDecals {
|
|||||||
public static bool SelectableInFlight => _selectableInFlight;
|
public static bool SelectableInFlight => _selectableInFlight;
|
||||||
|
|
||||||
public static IEnumerable<DecalFont> Fonts => _fontList.Values;
|
public static IEnumerable<DecalFont> Fonts => _fontList.Values;
|
||||||
|
|
||||||
public static DecalFont FallbackFont { get; private set; }
|
|
||||||
|
|
||||||
public static bool IsBlacklisted(Shader shader) {
|
public static bool IsBlacklisted(Shader shader) {
|
||||||
return IsBlacklisted(shader.name);
|
return IsBlacklisted(shader.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsBlacklisted(string shaderName) {
|
public static bool IsBlacklisted(string shaderName) {
|
||||||
return _shaderBlacklist.Contains(shaderName);
|
if (_shaderBlacklist.Contains(shaderName)) return true;
|
||||||
|
|
||||||
|
foreach (var regex in _shaderRegexBlacklist) {
|
||||||
|
if (regex.IsMatch(shaderName)) {
|
||||||
|
_shaderBlacklist.Add(shaderName);
|
||||||
|
Logging.Log($"Caching blacklisted shader name '{shaderName}' which matches '{regex}'");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsLegacy(string shaderName, out string newShader, out string[] keywords) {
|
public static bool IsLegacy(string shaderName, out string newShader, out string[] keywords) {
|
||||||
@ -91,10 +101,14 @@ namespace ConformalDecals {
|
|||||||
foreach (var shaderName in blacklist.GetValuesList("shader")) {
|
foreach (var shaderName in blacklist.GetValuesList("shader")) {
|
||||||
_shaderBlacklist.Add(shaderName);
|
_shaderBlacklist.Add(shaderName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var shaderRegex in blacklist.GetValuesList("shaderRegex")) {
|
||||||
|
_shaderRegexBlacklist.Add(new Regex(shaderRegex));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var allFonts = Resources.FindObjectsOfTypeAll<TMP_FontAsset>();
|
var allFonts = Resources.FindObjectsOfTypeAll<TMP_FontAsset>();
|
||||||
|
|
||||||
foreach (var fontNode in node.GetNodes("FONT")) {
|
foreach (var fontNode in node.GetNodes("FONT")) {
|
||||||
try {
|
try {
|
||||||
var font = new DecalFont(fontNode, allFonts);
|
var font = new DecalFont(fontNode, allFonts);
|
||||||
@ -128,13 +142,14 @@ namespace ConformalDecals {
|
|||||||
// ReSharper disable once UnusedMember.Global
|
// ReSharper disable once UnusedMember.Global
|
||||||
public static void ModuleManagerPostLoad() {
|
public static void ModuleManagerPostLoad() {
|
||||||
_shaderBlacklist = new List<string>();
|
_shaderBlacklist = new List<string>();
|
||||||
|
_shaderRegexBlacklist = new List<Regex>();
|
||||||
_fontList = new Dictionary<string, DecalFont>();
|
_fontList = new Dictionary<string, DecalFont>();
|
||||||
|
|
||||||
var configs = GameDatabase.Instance.GetConfigs("CONFORMALDECALS");
|
var configs = GameDatabase.Instance.GetConfigs("CONFORMALDECALS");
|
||||||
|
|
||||||
if (configs.Length > 0) {
|
if (configs.Length > 0) {
|
||||||
Logging.Log("loading config");
|
|
||||||
foreach (var config in configs) {
|
foreach (var config in configs) {
|
||||||
|
Logging.Log($"loading config node '{config.url}'");
|
||||||
ParseConfig(config.config);
|
ParseConfig(config.config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -482,9 +482,6 @@ namespace ConformalDecals {
|
|||||||
// skip disabled renderers
|
// skip disabled renderers
|
||||||
if (renderer.gameObject.activeInHierarchy == false) continue;
|
if (renderer.gameObject.activeInHierarchy == false) continue;
|
||||||
|
|
||||||
// skip transparentFX layer, which causes issues with Waterfall
|
|
||||||
if (renderer.gameObject.layer == 1) continue;
|
|
||||||
|
|
||||||
// skip blacklisted shaders
|
// skip blacklisted shaders
|
||||||
if (DecalConfig.IsBlacklisted(renderer.material.shader)) continue;
|
if (DecalConfig.IsBlacklisted(renderer.material.shader)) continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user