v2.7.9 Release Commit...

* Companions no longer target cronenberg'ed enemies transformed via
Cronenberg bullets.
* Fixed Pirate Shotgun Kin and Pirate BulletKin corpse hat zDepth bug.
* Clownkin Companion no longer spawns second bugged/detached balloon on
new floor.
* Exception in ClownKin Friend Companion controller when encountering
new floor or first pickup fixed.
This commit is contained in:
ApacheThunder 2022-12-31 22:57:03 -06:00
parent d5cba5a6b1
commit 3ce2d91023
17 changed files with 84 additions and 26 deletions

View File

@ -1,5 +1,5 @@
ManifestFileVersion: 0 ManifestFileVersion: 0
CRC: 3935064738 CRC: 2940580124
AssetBundleManifest: AssetBundleManifest:
AssetBundleInfos: AssetBundleInfos:
Info_0: Info_0:

View File

@ -1,9 +1,9 @@
ManifestFileVersion: 0 ManifestFileVersion: 0
CRC: 448914758 CRC: 67696902
Hashes: Hashes:
AssetFileHash: AssetFileHash:
serializedVersion: 2 serializedVersion: 2
Hash: 2ae2cf88026e0f4048d648031c5627e4 Hash: 9deb45a9503e598885a647facfc500e6
TypeTreeHash: TypeTreeHash:
serializedVersion: 2 serializedVersion: 2
Hash: 2241b0dac22d22b9de2222ad79842819 Hash: 2241b0dac22d22b9de2222ad79842819

View File

@ -19,7 +19,7 @@ GameObject:
serializedVersion: 5 serializedVersion: 5
m_Component: m_Component:
- component: {fileID: 4816379484175378} - component: {fileID: 4816379484175378}
m_Layer: 0 m_Layer: 22
m_Name: Clownkin_Wig m_Name: Clownkin_Wig
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -313,6 +313,12 @@ public class ExpandBalloonController : BraveBehaviour {
Destroy(gameObject); Destroy(gameObject);
return; return;
} }
/*if (!AttachTarget && !AlternateAttachTarget && !DoDetachAndFloatAfterTargetDeath && !DestroyOnDeath) {
Destroy(m_BalloonString);
Destroy(gameObject);
return;
}*/
} }

View File

@ -1,4 +1,5 @@
using System; using Dungeonator;
using System;
using UnityEngine; using UnityEngine;
namespace ExpandTheGungeon.ExpandComponents { namespace ExpandTheGungeon.ExpandComponents {
@ -19,9 +20,12 @@ public class ExpandCompanionManager : BraveBehaviour {
Scale = 0.65f; Scale = 0.65f;
m_WasRescaled = false; m_WasRescaled = false;
m_Awake = false;
UpdateTimer = 1.5f; UpdateTimer = 1.5f;
m_Timer = UpdateTimer; m_Timer = UpdateTimer;
m_AwakeTimer = 1;
} }
public AIAnimator.FacingType NoTargetFaceType; public AIAnimator.FacingType NoTargetFaceType;
@ -34,6 +38,7 @@ public class ExpandCompanionManager : BraveBehaviour {
public bool SwapFaceTypesOnTarget; public bool SwapFaceTypesOnTarget;
public bool ToggleFaceSouthWhenStopped; public bool ToggleFaceSouthWhenStopped;
public bool HideGunsWhenNoTarget; public bool HideGunsWhenNoTarget;
[NonSerialized] [NonSerialized]
private AIActor m_AIActor; private AIActor m_AIActor;
@ -42,19 +47,44 @@ public class ExpandCompanionManager : BraveBehaviour {
[NonSerialized] [NonSerialized]
private bool m_WasRescaled; private bool m_WasRescaled;
[NonSerialized] [NonSerialized]
private bool m_Awake;
[NonSerialized]
private float m_Timer; private float m_Timer;
[NonSerialized]
private float m_AwakeTimer;
private void Awake() { private void Awake() {
m_AIActor = aiActor; m_Awake = false;
m_AIShooter = aiShooter; m_AwakeTimer = 1f;
if (HideGunsWhenNoTarget && (!m_AIActor | !m_AIShooter | m_AIActor.TargetRigidbody)) { return; }
m_AIShooter.ToggleGunAndHandRenderers(false, "Companion gun toggle for target change");
} }
private void Start() { } private void Start() { }
private void LateUpdate() {
if (Dungeon.IsGenerating | GameManager.Instance.IsLoadingLevel | m_Awake) { return; }
m_AwakeTimer -= BraveTime.DeltaTime;
if (m_AwakeTimer < 0) {
m_Awake = true;
m_AIActor = aiActor;
m_AIShooter = aiShooter;
if (HideGunsWhenNoTarget && (!m_AIActor | !m_AIShooter | m_AIActor.TargetRigidbody)) { return; }
try {
m_AIShooter.ToggleGunAndHandRenderers(false, "Companion gun toggle for target change");
} catch (Exception ex) {
if (ExpandSettings.debugMode) { Debug.LogException(ex); }
}
}
}
private void Update() { private void Update() {
if (!m_Awake) { return; }
if (!m_AIActor) { Destroy(this); return; } if (!m_AIActor) { Destroy(this); return; }
if (m_Awake && (!m_AIShooter | !m_AIActor)) {
}
if (Rescale && !m_WasRescaled) { if (Rescale && !m_WasRescaled) {
m_WasRescaled = true; m_WasRescaled = true;
@ -64,6 +94,7 @@ public class ExpandCompanionManager : BraveBehaviour {
sprite.UpdateZDepth(); sprite.UpdateZDepth();
} }
if (UpdateTimer != -1 && m_AIActor && !m_AIActor.TargetRigidbody) { if (UpdateTimer != -1 && m_AIActor && !m_AIActor.TargetRigidbody) {
m_Timer -= BraveTime.DeltaTime; m_Timer -= BraveTime.DeltaTime;
} else if (UpdateTimer != -1 && m_AIActor && m_AIActor.TargetRigidbody && m_Timer != UpdateTimer) { } else if (UpdateTimer != -1 && m_AIActor && m_AIActor.TargetRigidbody && m_Timer != UpdateTimer) {

View File

@ -206,7 +206,7 @@ public static class ExpandCustomEnemyDatabase {
BuildJungleBossPrefab(out com4nd0BossPrefab); BuildJungleBossPrefab(out com4nd0BossPrefab);
// Add R&G enemies to MTG spawn command because Zatherz hasn't done it. :P // Add R&G enemies to MTG spawn command because Zatherz hasn't done it. :P
UpdateMTGSpawnPool(); // UpdateMTGSpawnPool();
} }
public static AIActor GetOrLoadByGuidHook(Func<string, AIActor> orig, string guid) { public static AIActor GetOrLoadByGuidHook(Func<string, AIActor> orig, string guid) {
@ -321,7 +321,6 @@ public static class ExpandCustomEnemyDatabase {
ExpandUtility.DuplicateSpriteAnimation(BulletManEyepatchCollection, BulletManEyepatchCollection.AddComponent<tk2dSpriteAnimation>(), BulletManEyepatchEnemy.spriteAnimator.Library, BulletManEyepatchCollectionData); ExpandUtility.DuplicateSpriteAnimation(BulletManEyepatchCollection, BulletManEyepatchCollection.AddComponent<tk2dSpriteAnimation>(), BulletManEyepatchEnemy.spriteAnimator.Library, BulletManEyepatchCollectionData);
BulletManEyepatchEnemy.spriteAnimator.Library = BulletManEyepatchCollection.GetComponent<tk2dSpriteAnimation>(); BulletManEyepatchEnemy.spriteAnimator.Library = BulletManEyepatchCollection.GetComponent<tk2dSpriteAnimation>();
BulletManEyepatchEnemy.optionalPalette = null; BulletManEyepatchEnemy.optionalPalette = null;
} }
public static void AddEnemyToDatabase(GameObject EnemyPrefab, string EnemyGUID, bool IsNormalEnemy = false, bool AddToMTGSpawnPool = true) { public static void AddEnemyToDatabase(GameObject EnemyPrefab, string EnemyGUID, bool IsNormalEnemy = false, bool AddToMTGSpawnPool = true) {
@ -3106,6 +3105,7 @@ public static class ExpandCustomEnemyDatabase {
AIActor m_CachedAIActor = m_CachedTargetObject.GetComponent<AIActor>(); AIActor m_CachedAIActor = m_CachedTargetObject.GetComponent<AIActor>();
m_CachedAIActor.IsHarmlessEnemy = true;
m_CachedAIActor.HasShadow = false; m_CachedAIActor.HasShadow = false;
m_CachedAIActor.MovementSpeed = 0.65f; m_CachedAIActor.MovementSpeed = 0.65f;
m_CachedAIActor.PathableTiles = CellTypes.FLOOR; m_CachedAIActor.PathableTiles = CellTypes.FLOOR;

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using Dungeonator; using Dungeonator;
using ExpandTheGungeon.ExpandComponents;
using ExpandTheGungeon.ExpandUtilities; using ExpandTheGungeon.ExpandUtilities;
using ExpandTheGungeon.SpriteAPI; using ExpandTheGungeon.SpriteAPI;

View File

@ -228,6 +228,10 @@ public class ExpandPrefabs {
public static GameObject CandleGuy; public static GameObject CandleGuy;
public static GameObject WallMimic; public static GameObject WallMimic;
public static GameObject AK47BulletKin; public static GameObject AK47BulletKin;
public static GameObject PirateShotgunKin;
public static GameObject PirateShotgunKinHat;
public static GameObject PirateBulletKin;
public static GameObject PirateBulletKinHat;
public static GameObject RatJailDoor; public static GameObject RatJailDoor;
public static GameObject CurrsedMirror; public static GameObject CurrsedMirror;
@ -1370,10 +1374,26 @@ public class ExpandPrefabs {
SerManuel = EnemyDatabase.GetOrLoadByGuid("fc809bd43a4d41738a62d7565456622c").gameObject; SerManuel = EnemyDatabase.GetOrLoadByGuid("fc809bd43a4d41738a62d7565456622c").gameObject;
SkusketHead = EnemyDatabase.GetOrLoadByGuid("c2f902b7cbe745efb3db4399927eab34").gameObject; SkusketHead = EnemyDatabase.GetOrLoadByGuid("c2f902b7cbe745efb3db4399927eab34").gameObject;
AK47BulletKin = EnemyDatabase.GetOrLoadByGuid("db35531e66ce41cbb81d507a34366dfe").gameObject; AK47BulletKin = EnemyDatabase.GetOrLoadByGuid("db35531e66ce41cbb81d507a34366dfe").gameObject;
PirateShotgunKin = EnemyDatabase.GetOrLoadByGuid("86dfc13486ee4f559189de53cfb84107").gameObject;
PirateShotgunKinHat = PirateShotgunKin.GetComponent<AIAnimator>().OtherVFX[0].vfxPool.effects[0].effects[0].effect;
PirateBulletKin = EnemyDatabase.GetOrLoadByGuid("6f818f482a5c47fd8f38cce101f6566c").gameObject;
PirateBulletKinHat = PirateBulletKin.GetComponent<AIAnimator>().OtherVFX[0].vfxPool.effects[0].effects[0].effect;
// Fix missing death sound // Fix missing death sound
AK47BulletKin.GetComponent<AIActor>().EnemySwitchState = EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5").EnemySwitchState; AK47BulletKin.GetComponent<AIActor>().EnemySwitchState = EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5").EnemySwitchState;
// Fix corpse hat zDepth
PirateShotgunKinHat.GetComponent<tk2dSprite>().CachedPerpState = tk2dBaseSprite.PerpendicularState.FLAT;
PirateShotgunKin.GetComponent<AIAnimator>().OtherVFX[0].vfxPool.effects[0].effects[0].usesZHeight = true;
PirateShotgunKin.GetComponent<AIAnimator>().OtherVFX[0].vfxPool.effects[0].effects[0].zHeight = -1.5f;
PirateBulletKinHat.GetComponent<tk2dSprite>().CachedPerpState = tk2dBaseSprite.PerpendicularState.FLAT;
PirateBulletKin.GetComponent<AIAnimator>().OtherVFX[0].vfxPool.effects[0].effects[0].usesZHeight = true;
PirateBulletKin.GetComponent<AIAnimator>().OtherVFX[0].vfxPool.effects[0].effects[0].zHeight = -1.5f;
RatJailDoor = ratDungeon.PatternSettings.flows[0].AllNodes[13].overrideExactRoom.placedObjects[1].nonenemyBehaviour.gameObject; RatJailDoor = ratDungeon.PatternSettings.flows[0].AllNodes[13].overrideExactRoom.placedObjects[1].nonenemyBehaviour.gameObject;
CurrsedMirror = basic_special_rooms.includedRooms.elements[1].room.placedObjects[0].nonenemyBehaviour.gameObject; CurrsedMirror = basic_special_rooms.includedRooms.elements[1].room.placedObjects[0].nonenemyBehaviour.gameObject;

View File

@ -23,7 +23,7 @@ public class ExpandTheGungeon : BaseUnityPlugin {
public const string GUID = "ApacheThunder.etg.ExpandTheGungeon"; public const string GUID = "ApacheThunder.etg.ExpandTheGungeon";
public const string ModName = "ExpandTheGungeon"; public const string ModName = "ExpandTheGungeon";
public const string VERSION = "2.7.8"; public const string VERSION = "2.7.9";
public static string ZipFilePath; public static string ZipFilePath;
public static string FilePath; public static string FilePath;
public static string ResourcesPath; public static string ResourcesPath;
@ -525,7 +525,6 @@ private enum WaitType { ShotgunSecret, LanguageFix, DebugFlow };
} }
/*private void ExpandTestCommand(string[] consoleText) { /*private void ExpandTestCommand(string[] consoleText) {
GameStatsManager.Instance.ClearStatValueGlobal(TrackedStats.META_CURRENCY); GameStatsManager.Instance.ClearStatValueGlobal(TrackedStats.META_CURRENCY);
GameStatsManager.Instance.SetStat(TrackedStats.META_CURRENCY, float.Parse(consoleText[0])); GameStatsManager.Instance.SetStat(TrackedStats.META_CURRENCY, float.Parse(consoleText[0]));
// GameStatsManager.Instance.RegisterStatChange(TrackedStats.META_CURRENCY_SPENT_AT_META_SHOP, 0); // GameStatsManager.Instance.RegisterStatChange(TrackedStats.META_CURRENCY_SPENT_AT_META_SHOP, 0);

View File

@ -143,6 +143,10 @@ public class ClownFriend : PassiveItem {
private void DestroyCompanion() { private void DestroyCompanion() {
if (!m_extantCompanion) { return; } if (!m_extantCompanion) { return; }
if (m_extantCompanion.GetComponent<ExpandClownKinBalloonManager>() && m_extantCompanion.GetComponent<ExpandClownKinBalloonManager>().m_Balloon) {
Destroy(m_extantCompanion.GetComponent<ExpandClownKinBalloonManager>().m_Balloon);
Destroy(m_extantCompanion.GetComponent<ExpandClownKinBalloonManager>());
}
Destroy(m_extantCompanion); Destroy(m_extantCompanion);
m_extantCompanion = null; m_extantCompanion = null;
} }

View File

@ -456,15 +456,14 @@ public class TheLeadKey : PlayerItem {
FXController.UseCorruptionAmbience = m_CopyCurrentRoom; FXController.UseCorruptionAmbience = m_CopyCurrentRoom;
GlitchShaderObject.transform.SetParent(dungeon.gameObject.transform); GlitchShaderObject.transform.SetParent(dungeon.gameObject.transform);
} }
GameObject[] Objects = FindObjectsOfType<GameObject>();
try { try {
foreach (GameObject Object in Objects) { for(int i = 0; i < currentRoom.hierarchyParent.childCount; i++) {
if (Object && Object.transform.parent == currentRoom.hierarchyParent && IsValidObject(Object)) { Transform childTransform = currentRoom.hierarchyParent.GetChild(i);
Vector3 OrigPosition = (Object.transform.position - currentRoom.area.basePosition.ToVector3()); if (childTransform?.gameObject && IsValidObject(childTransform.gameObject)) {
Vector3 OrigPosition = (childTransform.position - currentRoom.area.basePosition.ToVector3());
Vector3 NewPosition = (OrigPosition + GlitchRoom.area.basePosition.ToVector3()); Vector3 NewPosition = (OrigPosition + GlitchRoom.area.basePosition.ToVector3());
GameObject newObject = Instantiate(Object, NewPosition, Quaternion.identity); GameObject newObject = Instantiate(childTransform.gameObject, NewPosition, Quaternion.identity);
newObject.transform.SetParent(GlitchRoom.hierarchyParent); newObject.transform.SetParent(GlitchRoom.hierarchyParent);
if (newObject.GetComponent<BaseShopController>()) { Destroy(newObject.GetComponent<BaseShopController>()); } if (newObject.GetComponent<BaseShopController>()) { Destroy(newObject.GetComponent<BaseShopController>()); }
@ -496,7 +495,7 @@ public class TheLeadKey : PlayerItem {
ExpandShaders.Instance.BecomeGlitched(newObject, RandomIntervalFloat, RandomDispFloat, RandomDispIntensityFloat, RandomColorProbFloat, RandomColorIntensityFloat); ExpandShaders.Instance.BecomeGlitched(newObject, RandomIntervalFloat, RandomDispFloat, RandomDispIntensityFloat, RandomColorProbFloat, RandomColorIntensityFloat);
} }
} }
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
if (ExpandSettings.debugMode) { if (ExpandSettings.debugMode) {

View File

@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.7.8")] [assembly: AssemblyVersion("2.7.9")]
[assembly: AssemblyFileVersion("2.7.8")] [assembly: AssemblyFileVersion("2.7.9")]

View File

@ -8,8 +8,8 @@
namespace ExpandTheGungeon.SpriteAPI { namespace ExpandTheGungeon.SpriteAPI {
public static class SpriteSerializer { public static class SpriteSerializer {
private static tk2dSpriteCollectionData newCollection; private static tk2dSpriteCollectionData newCollection;
private static RuntimeAtlasPacker AtlasPacker; private static RuntimeAtlasPacker AtlasPacker;

Binary file not shown.