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
CRC: 3935064738
CRC: 2940580124
AssetBundleManifest:
AssetBundleInfos:
Info_0:

View File

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

View File

@ -19,7 +19,7 @@ GameObject:
serializedVersion: 5
m_Component:
- component: {fileID: 4816379484175378}
m_Layer: 0
m_Layer: 22
m_Name: Clownkin_Wig
m_TagString: Untagged
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);
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;
namespace ExpandTheGungeon.ExpandComponents {
@ -19,9 +20,12 @@ public class ExpandCompanionManager : BraveBehaviour {
Scale = 0.65f;
m_WasRescaled = false;
m_Awake = false;
UpdateTimer = 1.5f;
m_Timer = UpdateTimer;
m_AwakeTimer = 1;
}
public AIAnimator.FacingType NoTargetFaceType;
@ -35,6 +39,7 @@ public class ExpandCompanionManager : BraveBehaviour {
public bool ToggleFaceSouthWhenStopped;
public bool HideGunsWhenNoTarget;
[NonSerialized]
private AIActor m_AIActor;
[NonSerialized]
@ -42,20 +47,45 @@ public class ExpandCompanionManager : BraveBehaviour {
[NonSerialized]
private bool m_WasRescaled;
[NonSerialized]
private bool m_Awake;
[NonSerialized]
private float m_Timer;
[NonSerialized]
private float m_AwakeTimer;
private void Awake() {
m_AIActor = aiActor;
m_AIShooter = aiShooter;
if (HideGunsWhenNoTarget && (!m_AIActor | !m_AIShooter | m_AIActor.TargetRigidbody)) { return; }
m_AIShooter.ToggleGunAndHandRenderers(false, "Companion gun toggle for target change");
m_Awake = false;
m_AwakeTimer = 1f;
}
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() {
if (!m_Awake) { return; }
if (!m_AIActor) { Destroy(this); return; }
if (m_Awake && (!m_AIShooter | !m_AIActor)) {
}
if (Rescale && !m_WasRescaled) {
m_WasRescaled = true;
gameObject.layer = LayerMask.NameToLayer("Unpixelated");
@ -64,6 +94,7 @@ public class ExpandCompanionManager : BraveBehaviour {
sprite.UpdateZDepth();
}
if (UpdateTimer != -1 && m_AIActor && !m_AIActor.TargetRigidbody) {
m_Timer -= BraveTime.DeltaTime;
} 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);
// 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) {
@ -321,7 +321,6 @@ public static class ExpandCustomEnemyDatabase {
ExpandUtility.DuplicateSpriteAnimation(BulletManEyepatchCollection, BulletManEyepatchCollection.AddComponent<tk2dSpriteAnimation>(), BulletManEyepatchEnemy.spriteAnimator.Library, BulletManEyepatchCollectionData);
BulletManEyepatchEnemy.spriteAnimator.Library = BulletManEyepatchCollection.GetComponent<tk2dSpriteAnimation>();
BulletManEyepatchEnemy.optionalPalette = null;
}
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>();
m_CachedAIActor.IsHarmlessEnemy = true;
m_CachedAIActor.HasShadow = false;
m_CachedAIActor.MovementSpeed = 0.65f;
m_CachedAIActor.PathableTiles = CellTypes.FLOOR;

View File

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

View File

@ -228,6 +228,10 @@ public class ExpandPrefabs {
public static GameObject CandleGuy;
public static GameObject WallMimic;
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 CurrsedMirror;
@ -1370,10 +1374,26 @@ public class ExpandPrefabs {
SerManuel = EnemyDatabase.GetOrLoadByGuid("fc809bd43a4d41738a62d7565456622c").gameObject;
SkusketHead = EnemyDatabase.GetOrLoadByGuid("c2f902b7cbe745efb3db4399927eab34").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
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;
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 ModName = "ExpandTheGungeon";
public const string VERSION = "2.7.8";
public const string VERSION = "2.7.9";
public static string ZipFilePath;
public static string FilePath;
public static string ResourcesPath;
@ -525,7 +525,6 @@ private enum WaitType { ShotgunSecret, LanguageFix, DebugFlow };
}
/*private void ExpandTestCommand(string[] consoleText) {
GameStatsManager.Instance.ClearStatValueGlobal(TrackedStats.META_CURRENCY);
GameStatsManager.Instance.SetStat(TrackedStats.META_CURRENCY, float.Parse(consoleText[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() {
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);
m_extantCompanion = null;
}

View File

@ -457,14 +457,13 @@ public class TheLeadKey : PlayerItem {
GlitchShaderObject.transform.SetParent(dungeon.gameObject.transform);
}
GameObject[] Objects = FindObjectsOfType<GameObject>();
try {
foreach (GameObject Object in Objects) {
if (Object && Object.transform.parent == currentRoom.hierarchyParent && IsValidObject(Object)) {
Vector3 OrigPosition = (Object.transform.position - currentRoom.area.basePosition.ToVector3());
for(int i = 0; i < currentRoom.hierarchyParent.childCount; i++) {
Transform childTransform = currentRoom.hierarchyParent.GetChild(i);
if (childTransform?.gameObject && IsValidObject(childTransform.gameObject)) {
Vector3 OrigPosition = (childTransform.position - currentRoom.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);
if (newObject.GetComponent<BaseShopController>()) { Destroy(newObject.GetComponent<BaseShopController>()); }

View File

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

Binary file not shown.