9 Commits

Author SHA1 Message Date
c653c9efc8 Release 0.2.11
### Fixed

- PR by LinuxGuruGamer:
	- Fixed nullref caused when an entry in `_targets` was null
	- Fixed memory leak caused by the OnDestroy() methods not being called due to them being virtual
2022-10-29 18:15:13 -07:00
374fc8b753 Format changelog 2022-10-29 18:13:46 -07:00
88b2b4841a Merge pull request #38 from linuxgurugamer/main
Nullref fix and memory leak fix
2022-10-05 22:53:10 -07:00
b2da56b1ca A few more edits 2022-09-03 18:03:01 -04:00
14bc694588 Fixed nullref caused when an entry in _targets was null
Fixed memory leak caused by the OnDestroy() methods not being called
	due to them being virtual
2022-09-03 18:01:15 -04:00
7e1b993d20 Update README.md 2022-03-19 20:34:33 -07:00
f8d692352d Remove leftover files from old deploy system 2022-03-14 21:52:43 -07:00
fa4b799788 Run on create 2022-03-13 19:12:18 -07:00
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
2022-03-13 18:45:14 -07:00
8 changed files with 20 additions and 48 deletions

View File

@ -1,7 +1,7 @@
name: Fast-Forward Release Branch
on:
release:
types: [published]
types: [created]
jobs:
fast-forward:

View File

@ -1 +0,0 @@
USE_SSM_CREDENTIALS: false

View File

@ -1,34 +0,0 @@
# Example annotated build data file
mod-name: ConformalDecals
package:
include-dependencies: true # Include dependencies in the package
included-gamedata: # Include these gamedata-level folders in packages:
- ConformalDecals
included-support: # Include these root-level files in packages
- README.md
- LICENSE-ART.md
- LICENSE-SOURCE.md
- changelog.txt
dependencies: # Configure dependencies
ModuleManager:
location: url
url: https://ksp.sarbian.com/jenkins/job/ModuleManager/159/artifact/ModuleManager.4.1.4.dll
zip: false
B9PartSwitch:
location: url
url: http://pileof.rocks/KSP/B9PartSwitch-v2.18.0.zip
zip: true
Shabby:
location: url
url: http://pileof.rocks/KSP/Shabby_v0.2.0.zip
zip: true
HarmonyKSP:
location: url
url: https://github.com/KSPModdingLibs/HarmonyKSP/releases/download/2.0.4.0/HarmonyKSP_2.0.4.0_for_KSP1.8+.zip
zip: true
deploy:
SpaceDock:
enabled: true # activate/deactivate this deployment script
mod-id: 2451 # The Spacedock mod ID for deployment
GitHub:
enabled: true # activate/deactivate this deployment script

View File

@ -8,7 +8,16 @@ 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 |
## Unreleased
## 0.2.11 - 2022-10-30
### Fixed
- PR by LinuxGuruGamer:
- Fixed nullref caused when an entry in `_targets` was null
- Fixed memory leak caused by the OnDestroy() methods not being called due to them being virtual
## 0.2.10 - 2022-03-14
### Fixed

View File

@ -1,5 +1,5 @@
# 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)
[![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) [![CKAN: Indexed](https://img.shields.io/badge/CKAN-Indexed-brightgreen.svg)](https://github.com/KSP-CKAN/CKAN)
![Screenshot](http://pileof.rocks/KSP/images/ConformalDecalsHeader.png)

View File

@ -283,7 +283,7 @@ namespace ConformalDecals {
}
}
public virtual void OnDestroy() {
public void OnDestroy() {
// remove GameEvents
if (HighLogic.LoadedSceneIsEditor) {
GameEvents.onEditorPartEvent.Remove(OnEditorEvent);
@ -440,7 +440,8 @@ namespace ConformalDecals {
// update projection
foreach (var target in _targets) {
target.Project(_orthoMatrix, decalProjectorTransform, _boundsRenderer.bounds, useBaseNormal);
if (target != null)
target.Project(_orthoMatrix, decalProjectorTransform, _boundsRenderer.bounds, useBaseNormal);
}
}
else {
@ -577,7 +578,8 @@ namespace ConformalDecals {
// render on each target object
foreach (var target in _targets) {
target.Render(_decalMaterial, part.mpb, camera);
if (target != null)
target.Render(_decalMaterial, part.mpb, camera);
}
}
}

View File

@ -48,14 +48,12 @@ namespace ConformalDecals {
UpdateFlag();
}
public override void OnDestroy() {
public void OnDestroy() {
if (HighLogic.LoadedSceneIsEditor) {
// Unregister flag change event
GameEvents.onMissionFlagSelect.Remove(OnEditorFlagSelected);
}
base.OnDestroy();
}
}
[KSPEvent(guiActive = false, guiActiveEditor = true, guiName = "#LOC_ConformalDecals_gui-select-flag")]
public void SelectFlag() {

View File

@ -220,15 +220,13 @@ namespace ConformalDecals {
}
}
public override void OnDestroy() {
public void OnDestroy() {
if (HighLogic.LoadedSceneIsGame && _currentText != null) TextRenderer.UnregisterText(_currentText);
// close all UIs
if (_textEntryController != null) _textEntryController.Close();
if (_fillColorPickerController != null) _fillColorPickerController.Close();
if (_outlineColorPickerController != null) _outlineColorPickerController.Close();
base.OnDestroy();
}
protected override void OnDetach() {