Compare commits

...

8 Commits

Author SHA1 Message Date
Andrew Cassidy 970a69be11 Release 0.2.10
### 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
2 years ago
Andrew Cassidy dddb7f09f3 make log message make a bit more sense 2 years ago
Andrew Cassidy 3cd229bc23 Fix decals not projecting when loading prefabs
• Add support for regex shader blacklisting
• Re-allow projecting onto transparentFX
2 years ago
Andrew Cassidy 4948818065
Remove Travis badge 2 years ago
Andrew Cassidy 036b084d34 Fix remote version file url 2 years ago
Andrew Cassidy 1e3addeb4d Include Harmony in build 2 years ago
Andrew Cassidy 47c70d3071 Fix actions 2 years ago
Andrew Cassidy 9955b9ce30
Don't version the Readme 2 years ago

@ -1,5 +1,7 @@
name: Fast-Forward Release Branch
on: [ release ]
on:
release:
types: [published]
jobs:
fast-forward:
@ -12,8 +14,7 @@ jobs:
fetch-depth: 0
- name: Merge into Release
run: |
git merge ${{github.ref_name}} --ff-only
run: git merge ${{github.ref_name}} --ff-only
- name: Push Changes
uses: ad-m/github-push-action@master

@ -37,7 +37,6 @@ jobs:
run: |
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
dotnet build --configuration Release ConformalDecals.sln
- name: Build DLL
working-directory: Source
@ -50,11 +49,14 @@ jobs:
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://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 B9PartSwitch B9PartSwitch*.zip
unzip -d HarmonyKSP HarmonyKSP*.zip
mv Shabby/GameData/Shabby GameData/
mv ModuleManager*.dll GameData/
mv B9PartSwitch/GameData/B9PartSwitch GameData/
mv HarmonyKSP/GameData/000_Harmony GameData/
- name: Upload Unbundled Build
uses: actions/upload-artifact@v3

@ -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 |
| author | Andrew Cassidy |
## 0.2.10 - 2022-03-14
### 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
### Fixed

@ -0,0 +1,7 @@
// Prevent projection onto Waterfall plumes
CONFORMALDECALS:NEEDS[Waterfall] {
SHADERBLACKLIST {
shaderRegex = Waterfall/.*
}
}

@ -4,21 +4,13 @@ CONFORMALDECALS {
SHADERBLACKLIST {
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/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 (Transparent)
shader = Solid Color (Alpha)
shaderRegex = KSP/Alpha/.*
shaderRegex = KSP/Particles/.*
}
FONT {

@ -1,6 +1,6 @@
{
"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",
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/drewcassidy/KSP-Conformal-Decals/release/CHANGELOG.md",
"VERSION": {

@ -1,5 +1,5 @@
# Conformal Decals v0.2.8
[![Build Status](https://travis-ci.com/drewcassidy/KSP-Conformal-Decals.svg?branch=release)](https://travis-ci.com/drewcassidy/KSP-Conformal-Decals) [![Art: CC BY-SA 4.0](https://img.shields.io/badge/Art%20License-CC%20BY--SA%204.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![Code: GPL v3](https://img.shields.io/badge/Code%20License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
# Conformal Decals
[![Art: CC BY-SA 4.0](https://img.shields.io/badge/Art%20License-CC%20BY--SA%204.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![Code: GPL v3](https://img.shields.io/badge/Code%20License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![Screenshot](http://pileof.rocks/KSP/images/ConformalDecalsHeader.png)

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using ConformalDecals.Text;
using ConformalDecals.Util;
using TMPro;
@ -10,6 +11,7 @@ namespace ConformalDecals {
public static class DecalConfig {
private static Texture2D _blankNormal;
private static List<string> _shaderBlacklist;
private static List<Regex> _shaderRegexBlacklist;
private static Dictionary<string, DecalFont> _fontList;
private static int _decalLayer = 31;
private static bool _selectableInFlight;
@ -50,15 +52,23 @@ namespace ConformalDecals {
public static bool SelectableInFlight => _selectableInFlight;
public static IEnumerable<DecalFont> Fonts => _fontList.Values;
public static DecalFont FallbackFont { get; private set; }
public static bool IsBlacklisted(Shader shader) {
return IsBlacklisted(shader.name);
}
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) {
@ -91,10 +101,14 @@ namespace ConformalDecals {
foreach (var shaderName in blacklist.GetValuesList("shader")) {
_shaderBlacklist.Add(shaderName);
}
foreach (var shaderRegex in blacklist.GetValuesList("shaderRegex")) {
_shaderRegexBlacklist.Add(new Regex(shaderRegex));
}
}
var allFonts = Resources.FindObjectsOfTypeAll<TMP_FontAsset>();
foreach (var fontNode in node.GetNodes("FONT")) {
try {
var font = new DecalFont(fontNode, allFonts);
@ -128,13 +142,14 @@ namespace ConformalDecals {
// ReSharper disable once UnusedMember.Global
public static void ModuleManagerPostLoad() {
_shaderBlacklist = new List<string>();
_shaderRegexBlacklist = new List<Regex>();
_fontList = new Dictionary<string, DecalFont>();
var configs = GameDatabase.Instance.GetConfigs("CONFORMALDECALS");
if (configs.Length > 0) {
Logging.Log("loading config");
foreach (var config in configs) {
Logging.Log($"loading config node '{config.url}'");
ParseConfig(config.config);
}
}

@ -482,9 +482,6 @@ namespace ConformalDecals {
// skip disabled renderers
if (renderer.gameObject.activeInHierarchy == false) continue;
// skip transparentFX layer, which causes issues with Waterfall
if (renderer.gameObject.layer == 1) continue;
// skip blacklisted shaders
if (DecalConfig.IsBlacklisted(renderer.material.shader)) continue;

Loading…
Cancel
Save