v2.7.2 Release Commit...

* Updated mod to be compatible with Mod the Gungeon API v1.5.0. It will
now be the minimum version supported by the mod. Do not attempt manual
install with older versions. It will NOT work!
* Added custom Old West chest to Chest spawn command (only possible in
BepInEx version of MTG)
* Added RickRoll Chest and Surprise Chest to shrine spawn command. (they
technically aren't chests so have to use this instead)
* Lowered spawn odds of RickRoll Chests
This commit is contained in:
ApacheThunder 2022-08-01 15:07:59 -05:00
parent 12909c41f8
commit ad7152f6f8
19 changed files with 52 additions and 98 deletions

View File

@ -1,5 +1,5 @@
ManifestFileVersion: 0 ManifestFileVersion: 0
CRC: 1983819566 CRC: 36798397
AssetBundleManifest: AssetBundleManifest:
AssetBundleInfos: AssetBundleInfos:
Info_0: Info_0:

View File

@ -1,9 +1,9 @@
ManifestFileVersion: 0 ManifestFileVersion: 0
CRC: 4207470725 CRC: 2273984678
Hashes: Hashes:
AssetFileHash: AssetFileHash:
serializedVersion: 2 serializedVersion: 2
Hash: 3a182b004c486813864fd873202c286d Hash: ad04d869f5cd6468058c476a5410313d
TypeTreeHash: TypeTreeHash:
serializedVersion: 2 serializedVersion: 2
Hash: 2241b0dac22d22b9de2222ad79842819 Hash: 2241b0dac22d22b9de2222ad79842819

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -168,8 +168,8 @@
<Property Name="PluginUserAcknowledge\iZotope Trash Distortion" Type="bool" Value="True"/> <Property Name="PluginUserAcknowledge\iZotope Trash Distortion" Type="bool" Value="True"/>
<Property Name="ProjectExplorer\FirstVisible_10_1" Type="string" Value="{4C96B38B-3DB4-40C7-91C9-665510E38993}"/> <Property Name="ProjectExplorer\FirstVisible_10_1" Type="string" Value="{4C96B38B-3DB4-40C7-91C9-665510E38993}"/>
<Property Name="ProjectExplorer\FirstVisible_11_1" Type="string" Value="{23EC2DE3-3ED8-4B82-AC99-92E25F2E4C6B}"/> <Property Name="ProjectExplorer\FirstVisible_11_1" Type="string" Value="{23EC2DE3-3ED8-4B82-AC99-92E25F2E4C6B}"/>
<Property Name="ProjectExplorer\FirstVisible_1_1" Type="string" Value="{FA1FCDFF-857F-4DA3-B8F7-95181B45FDBD}"/> <Property Name="ProjectExplorer\FirstVisible_1_1" Type="string" Value="{7BBB8310-92B7-43AB-AB42-1762061EC86D}"/>
<Property Name="ProjectExplorer\FirstVisible_3_1" Type="string" Value="{A4DBFF90-5E04-4FAD-AD08-F39A90B6D045}"/> <Property Name="ProjectExplorer\FirstVisible_3_1" Type="string" Value="{3DA4A3F7-BB85-48F3-B72E-9F7BCA12D2D8}"/>
<Property Name="ProjectExplorer\FirstVisible_4_1" Type="string" Value="{CB6175F1-6080-4A23-92EF-0807E304D0C1}"/> <Property Name="ProjectExplorer\FirstVisible_4_1" Type="string" Value="{CB6175F1-6080-4A23-92EF-0807E304D0C1}"/>
<Property Name="ProjectExplorer\FirstVisible_6_1" Type="string" Value="{C98E673F-A24C-48A8-960F-10565FFE70A0}"/> <Property Name="ProjectExplorer\FirstVisible_6_1" Type="string" Value="{C98E673F-A24C-48A8-960F-10565FFE70A0}"/>
<Property Name="ProjectExplorer\FirstVisible_8_1" Type="string" Value="{41093F77-829F-4D88-8601-E8B25F3D4781}"/> <Property Name="ProjectExplorer\FirstVisible_8_1" Type="string" Value="{41093F77-829F-4D88-8601-E8B25F3D4781}"/>

View File

@ -37,7 +37,6 @@ public class ExpandSharedHooks {
public static Hook arrivalElevatorUpdateHook; public static Hook arrivalElevatorUpdateHook;
public static Hook constructTK2DDungeonHook; public static Hook constructTK2DDungeonHook;
public static Hook handleGrabbyGrabHook; public static Hook handleGrabbyGrabHook;
public static Hook dungeonStartHook;
public static Hook sellPitConfigureOnPlacementHook; public static Hook sellPitConfigureOnPlacementHook;
public static Hook playerFiredHook; public static Hook playerFiredHook;
public static Hook flagCellsHook; public static Hook flagCellsHook;
@ -211,13 +210,6 @@ public class ExpandSharedHooks {
typeof(HellDragZoneController) typeof(HellDragZoneController)
); );
if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing ItemDB.DungeonStart Hook...."); }
dungeonStartHook = new Hook(
typeof(ItemDB).GetMethod("DungeonStart", BindingFlags.Public | BindingFlags.Instance),
typeof(ExpandSharedHooks).GetMethod("DungeonStartHook", BindingFlags.Public | BindingFlags.Instance),
typeof(ItemDB)
);
if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing SellCellController.ConfigureOnPlacement Hook...."); } if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing SellCellController.ConfigureOnPlacement Hook...."); }
sellPitConfigureOnPlacementHook = new Hook( sellPitConfigureOnPlacementHook = new Hook(
typeof(SellCellController).GetMethod("ConfigureOnPlacement", BindingFlags.Public | BindingFlags.Instance), typeof(SellCellController).GetMethod("ConfigureOnPlacement", BindingFlags.Public | BindingFlags.Instance),
@ -890,27 +882,7 @@ public class ExpandSharedHooks {
} }
yield break; yield break;
} }
public void DungeonStartHook(Action<ItemDB>orig, ItemDB self) {
List<WeightedGameObject> collection;
if (self.ModLootPerFloor.TryGetValue("ANY", out collection)) {
GameManager.Instance.Dungeon.baseChestContents.defaultItemDrops.elements.AddRange(collection);
}
string dungeonFloorName = GameManager.Instance.Dungeon.DungeonFloorName;
string key = string.Empty;
try {
key = dungeonFloorName.Substring(1, dungeonFloorName.IndexOf('_') - 1);
} catch (Exception ex) {
if (ExpandSettings.debugMode) { ETGModConsole.Log("WARNING: dungoenFloorname.SubString() returned a negative or 0 length value!"); }
Debug.Log("WARNING: dungoenFloorname.SubString() returned a negative or 0 length value!");
Debug.LogException(ex);
if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.WESTGEON) { key = "TEST"; } else { key = "???"; }
}
if (self.ModLootPerFloor.TryGetValue(key, out collection)) {
GameManager.Instance.Dungeon.baseChestContents.defaultItemDrops.elements.AddRange(collection);
}
}
// Fix Pit size + make sure it only creates pit on the special room from Catacombs. Creating pit under all instances of sell pit makes selling items difficult post FTA update. // Fix Pit size + make sure it only creates pit on the special room from Catacombs. Creating pit under all instances of sell pit makes selling items difficult post FTA update.
public void SellPitConfigureOnPlacementHook(Action<SellCellController, RoomHandler>orig, SellCellController self, RoomHandler room) { public void SellPitConfigureOnPlacementHook(Action<SellCellController, RoomHandler>orig, SellCellController self, RoomHandler room) {
if (room != null && room.GetRoomName().StartsWith("SubShop_SellCreep_CatacombsSpecial")) { if (room != null && room.GetRoomName().StartsWith("SubShop_SellCreep_CatacombsSpecial")) {
@ -1731,10 +1703,18 @@ public class ExpandSharedHooks {
public void FloorChestPlacerConfigureOnPlacementHook(Action<FloorChestPlacer, RoomHandler>orig, FloorChestPlacer self, RoomHandler room) { public void FloorChestPlacerConfigureOnPlacementHook(Action<FloorChestPlacer, RoomHandler>orig, FloorChestPlacer self, RoomHandler room) {
if (!self.UseOverrideChest && room.area.PrototypeRoomCategory == PrototypeDungeonRoom.RoomCategory.REWARD if (!self.UseOverrideChest && room.area.PrototypeRoomCategory == PrototypeDungeonRoom.RoomCategory.REWARD
&& UnityEngine.Random.value < 0.15f && UnityEngine.Random.value < 0.1f
) { ) {
Vector2 ChestPosition = self.transform.position.IntXY(VectorConversions.Round).ToVector3(); Vector2 ChestPosition = self.transform.position.IntXY(VectorConversions.Round).ToVector3();
GameObject chestOBJ = UnityEngine.Object.Instantiate(BraveUtility.RandomElement(ExpandLists.CustomChests), ChestPosition, Quaternion.identity); GameObject ChestReference = BraveUtility.RandomElement(ExpandLists.CustomChests);
if (ChestReference.name == ExpandPrefabs.RickRollChestObject.name && UnityEngine.Random.value < 0.8f) {
List<GameObject> ChestsWithoutRickRoll = new List<GameObject>();
foreach (GameObject chest in ExpandLists.CustomChests) {
if (chest.name != ExpandPrefabs.RickRollChestObject.name) { ChestsWithoutRickRoll.Add(ChestReference); }
}
ChestReference = BraveUtility.RandomElement(ChestsWithoutRickRoll);
}
GameObject chestOBJ = UnityEngine.Object.Instantiate(ChestReference, ChestPosition, Quaternion.identity);
ExpandFakeChest fakeChest = null; ExpandFakeChest fakeChest = null;
if (chestOBJ) { fakeChest = chestOBJ.GetComponent<ExpandFakeChest>(); } if (chestOBJ) { fakeChest = chestOBJ.GetComponent<ExpandFakeChest>(); }
if (fakeChest) { if (fakeChest) {

View File

@ -77,36 +77,14 @@ public class ExpandCustomDungeonPrefabs {
InitPhobosDungeon(expandSharedAuto1, sharedAssets2, Base_Phobos, LoadOfficialDungeonPrefab("Base_Gungeon")); InitPhobosDungeon(expandSharedAuto1, sharedAssets2, Base_Phobos, LoadOfficialDungeonPrefab("Base_Gungeon"));
InitOfficeDungeon(expandSharedAuto1, sharedAssets2, Base_Office, LoadOfficialDungeonPrefab("Base_Gungeon")); InitOfficeDungeon(expandSharedAuto1, sharedAssets2, Base_Office, LoadOfficialDungeonPrefab("Base_Gungeon"));
} }
public void DungeonStart_Hook(Action<ItemDB>orig, ItemDB self) { public static void InitCustomGameLevelDefinitions(AssetBundle braveResources, GameManager gameManager) {
List<WeightedGameObject> collection;
if (self.ModLootPerFloor.TryGetValue("ANY", out collection)) {
GameManager.Instance.Dungeon.baseChestContents.defaultItemDrops.elements.AddRange(collection);
}
string dungeonFloorName = GameManager.Instance.Dungeon.DungeonFloorName;
if (!string.IsNullOrEmpty(dungeonFloorName) && dungeonFloorName.StartsWith("#")) {
string key = dungeonFloorName.Substring(1, dungeonFloorName.IndexOf('_') - 1);
if (self.ModLootPerFloor.TryGetValue(key, out collection)) {
GameManager.Instance.Dungeon.baseChestContents.defaultItemDrops.elements.AddRange(collection);
}
}
}
public static void InitCustomGameLevelDefinitions(AssetBundle braveResources) {
if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing DungeonDatabase.GetOrLoadByName Hook..."); } if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing DungeonDatabase.GetOrLoadByName Hook..."); }
getOrLoadByName_Hook = new Hook( getOrLoadByName_Hook = new Hook(
typeof(DungeonDatabase).GetMethod("GetOrLoadByName", BindingFlags.Static | BindingFlags.Public), typeof(DungeonDatabase).GetMethod("GetOrLoadByName", BindingFlags.Static | BindingFlags.Public),
typeof(ExpandCustomDungeonPrefabs).GetMethod("GetOrLoadByNameHook", BindingFlags.Static | BindingFlags.Public) typeof(ExpandCustomDungeonPrefabs).GetMethod("GetOrLoadByNameHook", BindingFlags.Static | BindingFlags.Public)
); );
ReInitFloorDefinitions(gameManager);
if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing ItemDB.DungeonStart Hook..."); }
dungeonStartHook = new Hook(
typeof(ItemDB).GetMethod("DungeonStart", BindingFlags.Instance | BindingFlags.Public),
typeof(ExpandCustomDungeonPrefabs).GetMethod("DungeonStart_Hook", BindingFlags.Instance | BindingFlags.Public),
typeof(ItemDB)
);
ReInitFloorDefinitions(GameManager.Instance);
} }
public static void ReInitFloorDefinitions(GameManager gameManager) { public static void ReInitFloorDefinitions(GameManager gameManager) {

View File

@ -165,9 +165,6 @@ public static class ExpandCustomEnemyDatabase {
} }
public static void InitPrefabs(AssetBundle expandSharedAssets1) { public static void InitPrefabs(AssetBundle expandSharedAssets1) {
// Unlock Gungeon class so I can add my enemies to spawn pool for spawn command.
HashSet<string> _LockedNamespaces = ReflectionHelpers.ReflectGetField<HashSet<string>>(typeof(IDPool<AIActor>), "_LockedNamespaces", Game.Enemies);
_LockedNamespaces.Remove("gungeon");
if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing EnemyDatabase.GetOrLoadByGuid Hook...."); } if (ExpandSettings.debugMode) { Debug.Log("[ExpandTheGungeon] Installing EnemyDatabase.GetOrLoadByGuid Hook...."); }
loadEnemyGUIDHook = new Hook( loadEnemyGUIDHook = new Hook(
@ -210,8 +207,6 @@ public static class ExpandCustomEnemyDatabase {
// 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();
Game.Enemies.LockNamespace("gungeon");
} }
public static AIActor GetOrLoadByGuidHook(Func<string, AIActor> orig, string guid) { public static AIActor GetOrLoadByGuidHook(Func<string, AIActor> orig, string guid) {

View File

@ -2662,6 +2662,8 @@ public class ExpandPrefabs {
ExpandUtility.AddAnimation(RickRollMusicSwitchObject.GetComponent<tk2dSpriteAnimator>(), EXTrapCollection.GetComponent<tk2dSpriteCollectionData>(), m_RickRollMusicSwitchTurnOnFrames, "RickRollSwitch_TurnOn", tk2dSpriteAnimationClip.WrapMode.Once, frameRate: 12); ExpandUtility.AddAnimation(RickRollMusicSwitchObject.GetComponent<tk2dSpriteAnimator>(), EXTrapCollection.GetComponent<tk2dSpriteCollectionData>(), m_RickRollMusicSwitchTurnOnFrames, "RickRollSwitch_TurnOn", tk2dSpriteAnimationClip.WrapMode.Once, frameRate: 12);
ExpandUtility.AddAnimation(RickRollMusicSwitchObject.GetComponent<tk2dSpriteAnimator>(), EXTrapCollection.GetComponent<tk2dSpriteCollectionData>(), m_RickRollMusicSwitchTurnOffFrames, "RickRollSwitch_TurnOff", tk2dSpriteAnimationClip.WrapMode.Once, frameRate: 12); ExpandUtility.AddAnimation(RickRollMusicSwitchObject.GetComponent<tk2dSpriteAnimator>(), EXTrapCollection.GetComponent<tk2dSpriteCollectionData>(), m_RickRollMusicSwitchTurnOffFrames, "RickRollSwitch_TurnOff", tk2dSpriteAnimationClip.WrapMode.Once, frameRate: 12);
ETGModConsole.ModdedShrines.Add("RickRollChest", RickRollChestObject);
ExpandFakeChest RickRollChest_SwitchComponent = RickRollMusicSwitchObject.AddComponent<ExpandFakeChest>(); ExpandFakeChest RickRollChest_SwitchComponent = RickRollMusicSwitchObject.AddComponent<ExpandFakeChest>();
RickRollChest_SwitchComponent.chestType = ExpandFakeChest.ChestType.MusicSwitch; RickRollChest_SwitchComponent.chestType = ExpandFakeChest.ChestType.MusicSwitch;
@ -2744,7 +2746,9 @@ public class ExpandPrefabs {
SurpriseChestComponent.MinimapIconPrefab = m_BrownChestReference.GetComponent<Chest>().MinimapIconPrefab; SurpriseChestComponent.MinimapIconPrefab = m_BrownChestReference.GetComponent<Chest>().MinimapIconPrefab;
SurpriseChestComponent.breakAnimName = "coop_chest_break"; SurpriseChestComponent.breakAnimName = "coop_chest_break";
SurpriseChestComponent.openAnimName = "coop_chest_open"; SurpriseChestComponent.openAnimName = "coop_chest_open";
ETGModConsole.ModdedShrines.Add("SurpriseChest", SurpriseChestObject);
ExpandThunderstormPlaceable = expandSharedAssets1.LoadAsset<GameObject>("ExpandThunderStorm"); ExpandThunderstormPlaceable = expandSharedAssets1.LoadAsset<GameObject>("ExpandThunderStorm");
ExpandThunderstormPlaceable.AddComponent<ExpandThunderStormPlacable>(); ExpandThunderstormPlaceable.AddComponent<ExpandThunderStormPlacable>();
@ -4210,9 +4214,9 @@ public class ExpandPrefabs {
MajorBreakable chestWestBreakable = EX_Chest_West.AddComponent<MajorBreakable>(); MajorBreakable chestWestBreakable = EX_Chest_West.AddComponent<MajorBreakable>();
JsonUtility.FromJsonOverwrite(JsonUtility.ToJson(ExpandObjectDatabase.ChestBrownTwoItems.GetComponent<MajorBreakable>()), chestWestBreakable); JsonUtility.FromJsonOverwrite(JsonUtility.ToJson(ExpandObjectDatabase.ChestBrownTwoItems.GetComponent<MajorBreakable>()), chestWestBreakable);
chestWestBreakable.spriteNameToUseAtZeroHP = "chest_west_break_001"; chestWestBreakable.spriteNameToUseAtZeroHP = "chest_west_break_001";
ETGModConsole.ModdedChests.Add("West", m_chestWest);
EX_RedBalloon = expandSharedAssets1.LoadAsset<GameObject>("EX_RedBalloon"); EX_RedBalloon = expandSharedAssets1.LoadAsset<GameObject>("EX_RedBalloon");
tk2dSprite m_RedBalloonSprite = SpriteSerializer.AddSpriteToObject(EX_RedBalloon, EXBalloonCollection, "redballoon_idle_001"); tk2dSprite m_RedBalloonSprite = SpriteSerializer.AddSpriteToObject(EX_RedBalloon, EXBalloonCollection, "redballoon_idle_001");
m_RedBalloonSprite.HeightOffGround = 1; m_RedBalloonSprite.HeightOffGround = 1;

View File

@ -113,7 +113,7 @@ private enum WaitType { ShotgunSecret, LanguageFix, DebugFlow };
} }
public void GMStart(GameManager gameManager) { public void GMStart(GameManager gameManager) {
try { try {
ExpandSharedHooks.InstallMidGameSaveHooks(); ExpandSharedHooks.InstallMidGameSaveHooks();
if (ExpandSettings.EnableLogo) { if (ExpandSettings.EnableLogo) {
@ -146,7 +146,6 @@ private enum WaitType { ShotgunSecret, LanguageFix, DebugFlow };
Debug.LogException(ex); Debug.LogException(ex);
return; return;
} }
AssetBundle expandSharedAssets1 = ResourceManager.LoadAssetBundle(ModAssetBundleName); AssetBundle expandSharedAssets1 = ResourceManager.LoadAssetBundle(ModAssetBundleName);
AssetBundle sharedAssets = ResourceManager.LoadAssetBundle("shared_auto_001"); AssetBundle sharedAssets = ResourceManager.LoadAssetBundle("shared_auto_001");
AssetBundle sharedAssets2 = ResourceManager.LoadAssetBundle("shared_auto_002"); AssetBundle sharedAssets2 = ResourceManager.LoadAssetBundle("shared_auto_002");
@ -154,10 +153,8 @@ private enum WaitType { ShotgunSecret, LanguageFix, DebugFlow };
AssetBundle enemiesBase = ResourceManager.LoadAssetBundle("enemies_base_001"); AssetBundle enemiesBase = ResourceManager.LoadAssetBundle("enemies_base_001");
ExpandAssets.InitAudio(expandSharedAssets1, ModSoundBankName); ExpandAssets.InitAudio(expandSharedAssets1, ModSoundBankName);
// Init Custom GameLevelDefinitions // Init Custom GameLevelDefinitions
ExpandCustomDungeonPrefabs.InitCustomGameLevelDefinitions(braveResources); ExpandCustomDungeonPrefabs.InitCustomGameLevelDefinitions(braveResources, gameManager);
// Init Custom Sprite Collections // Init Custom Sprite Collections
ExpandPrefabs.InitSpriteCollections(expandSharedAssets1, sharedAssets); ExpandPrefabs.InitSpriteCollections(expandSharedAssets1, sharedAssets);
ExpandCustomEnemyDatabase.InitSpriteCollections(expandSharedAssets1); ExpandCustomEnemyDatabase.InitSpriteCollections(expandSharedAssets1);
@ -198,12 +195,10 @@ private enum WaitType { ShotgunSecret, LanguageFix, DebugFlow };
InitConsoleCommands(ConsoleCommandName); InitConsoleCommands(ConsoleCommandName);
CreateFoyerController(); CreateFoyerController();
if (ExpandSettings.EnableLanguageFix) { if (ExpandSettings.EnableLanguageFix) {
GameManager.Options.CurrentLanguage = StringTableManager.GungeonSupportedLanguages.ENGLISH; GameManager.Options.CurrentLanguage = StringTableManager.GungeonSupportedLanguages.ENGLISH;
StringTableManager.CurrentLanguage = StringTableManager.GungeonSupportedLanguages.ENGLISH; StringTableManager.CurrentLanguage = StringTableManager.GungeonSupportedLanguages.ENGLISH;
} }
// Null bundles when done with them to avoid game crash issues // Null bundles when done with them to avoid game crash issues
expandSharedAssets1 = null; expandSharedAssets1 = null;
sharedAssets = null; sharedAssets = null;

View File

@ -2586,7 +2586,8 @@ public class ExpandUtility {
spriteData.boundsDataExtents = new Vector2(num, num2); spriteData.boundsDataExtents = new Vector2(num, num2);
spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents; spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents;
} else { } else {
ETGMod.ReplaceTexture(spriteData, texture2D, true); // ETGMod.ReplaceTexture(spriteData, texture2D, true);
ETGMod.ReplaceTexture(spriteData, texture2D);
} }
} }
} }
@ -2696,7 +2697,7 @@ public class ExpandUtility {
spriteData.boundsDataExtents = new Vector2(Width, Height); spriteData.boundsDataExtents = new Vector2(Width, Height);
spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents; spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents;
} else { } else {
ETGMod.ReplaceTexture(spriteData, texture, true); ETGMod.ReplaceTexture(spriteData, texture);
} }
} }
} }
@ -2770,7 +2771,7 @@ public class ExpandUtility {
spriteData.boundsDataExtents = new Vector2(num, num2); spriteData.boundsDataExtents = new Vector2(num, num2);
spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents; spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents;
} else { } else {
ETGMod.ReplaceTexture(spriteData, texture2D, true); ETGMod.ReplaceTexture(spriteData, texture2D);
} }
} }
} }
@ -2959,7 +2960,7 @@ public class ExpandUtility {
spriteData.boundsDataExtents = new Vector2(width, height); spriteData.boundsDataExtents = new Vector2(width, height);
spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents; spriteData.untrimmedBoundsDataExtents = spriteData.boundsDataExtents;
} else { } else {
ETGMod.ReplaceTexture(spriteData, spriteTexture, true); ETGMod.ReplaceTexture(spriteData, spriteTexture);
} }
} }
} }

View File

@ -29,8 +29,9 @@ public class BootlegGuns : Gun {
Game.Items.Rename("outdated_gun_mods:bootleg_pistol", "ex:bootleg_pistol"); Game.Items.Rename("outdated_gun_mods:bootleg_pistol", "ex:bootleg_pistol");
pistol.SetShortDescription("Of questionable quality..."); pistol.SetShortDescription("Of questionable quality...");
pistol.SetLongDescription("It's a counterfeit gun.\n\nDue to low quality standards, this weapon may be prone to exploding under certain circumstances..."); pistol.SetLongDescription("It's a counterfeit gun.\n\nDue to low quality standards, this weapon may be prone to exploding under certain circumstances...");
GunExt.SetupSprite(pistol, null, "bootleg_pistol_idle_001", 18); GunExt.SetupSprite(pistol, null, "bootleg_pistol_idle_001", 18);
pistol.AddProjectileModuleFrom("Magnum", true, false); // pistol.AddProjectileModuleFrom("Magnum", true, false);
pistol.AddProjectileModuleFrom("Magnum", true);
pistol.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0); pistol.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0);
pistol.DefaultModule.ammoCost = 1; pistol.DefaultModule.ammoCost = 1;
pistol.PreventOutlines = true; pistol.PreventOutlines = true;
@ -45,7 +46,7 @@ public class BootlegGuns : Gun {
pistol.encounterTrackable.EncounterGuid = "baad9dd6d005458daf02933f6a1ba926"; pistol.encounterTrackable.EncounterGuid = "baad9dd6d005458daf02933f6a1ba926";
pistol.gameObject.AddComponent<ExpandRemoveGunOnAmmoDepletion>(); pistol.gameObject.AddComponent<ExpandRemoveGunOnAmmoDepletion>();
pistol.gameObject.AddComponent<ExpandMaybeLoseAmmoOnDamage>(); pistol.gameObject.AddComponent<ExpandMaybeLoseAmmoOnDamage>();
ETGMod.Databases.Items.Add(pistol); ETGMod.Databases.Items.Add((pistol as PickupObject));
BootlegPistolID = pistol.PickupObjectId; BootlegPistolID = pistol.PickupObjectId;
PistolProjectile = expandSharedAssets1.LoadAsset<GameObject>("EXBootlegPistolProjectile"); PistolProjectile = expandSharedAssets1.LoadAsset<GameObject>("EXBootlegPistolProjectile");
@ -63,7 +64,7 @@ public class BootlegGuns : Gun {
machinepistol.SetShortDescription("Of questionable quality..."); machinepistol.SetShortDescription("Of questionable quality...");
machinepistol.SetLongDescription("It's a counterfeit machine gun.\n\nDue to low quality standards, this weapon may be prone to exploding under certain circumstances..."); machinepistol.SetLongDescription("It's a counterfeit machine gun.\n\nDue to low quality standards, this weapon may be prone to exploding under certain circumstances...");
GunExt.SetupSprite(machinepistol, null, "bootleg_machinepistol_idle_001", 30); GunExt.SetupSprite(machinepistol, null, "bootleg_machinepistol_idle_001", 30);
machinepistol.AddProjectileModuleFrom(PickupObjectDatabase.GetById(43).name, true, false); machinepistol.AddProjectileModuleFrom(PickupObjectDatabase.GetById(43).name, true);
machinepistol.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0); machinepistol.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0);
machinepistol.PreventOutlines = true; machinepistol.PreventOutlines = true;
machinepistol.reloadTime = 1.2f; machinepistol.reloadTime = 1.2f;
@ -78,7 +79,7 @@ public class BootlegGuns : Gun {
machinepistol.encounterTrackable.EncounterGuid = "e56adda5081347e5b9e0cf2556689b0e"; machinepistol.encounterTrackable.EncounterGuid = "e56adda5081347e5b9e0cf2556689b0e";
machinepistol.gameObject.AddComponent<ExpandRemoveGunOnAmmoDepletion>(); machinepistol.gameObject.AddComponent<ExpandRemoveGunOnAmmoDepletion>();
machinepistol.gameObject.AddComponent<ExpandMaybeLoseAmmoOnDamage>(); machinepistol.gameObject.AddComponent<ExpandMaybeLoseAmmoOnDamage>();
ETGMod.Databases.Items.Add(machinepistol); ETGMod.Databases.Items.Add((machinepistol as PickupObject));
BootlegMachinePistolID = machinepistol.PickupObjectId; BootlegMachinePistolID = machinepistol.PickupObjectId;
MachinePistolProjectile = expandSharedAssets1.LoadAsset<GameObject>("EXBootlegMachinePistolProjectile"); MachinePistolProjectile = expandSharedAssets1.LoadAsset<GameObject>("EXBootlegMachinePistolProjectile");
@ -96,7 +97,7 @@ public class BootlegGuns : Gun {
shotgun.SetShortDescription("Of questionable quality..."); shotgun.SetShortDescription("Of questionable quality...");
shotgun.SetLongDescription("It's a counterfeit shotgun.\n\nDue to low quality standards, this weapon may be prone to exploding under certain circumstances..."); shotgun.SetLongDescription("It's a counterfeit shotgun.\n\nDue to low quality standards, this weapon may be prone to exploding under certain circumstances...");
GunExt.SetupSprite(shotgun, null, "bootleg_shotgun_idle_001", 18); GunExt.SetupSprite(shotgun, null, "bootleg_shotgun_idle_001", 18);
shotgun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(51).name, true, false); shotgun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(51).name, true);
shotgun.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0); shotgun.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0);
shotgun.PreventOutlines = true; shotgun.PreventOutlines = true;
shotgun.reloadTime = 1.8f; shotgun.reloadTime = 1.8f;
@ -112,7 +113,7 @@ public class BootlegGuns : Gun {
shotgun.gameObject.AddComponent<ExpandRemoveGunOnAmmoDepletion>(); shotgun.gameObject.AddComponent<ExpandRemoveGunOnAmmoDepletion>();
shotgun.gameObject.AddComponent<ExpandMaybeLoseAmmoOnDamage>(); shotgun.gameObject.AddComponent<ExpandMaybeLoseAmmoOnDamage>();
shotgun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.SHOTGUN; shotgun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.SHOTGUN;
ETGMod.Databases.Items.Add(shotgun); ETGMod.Databases.Items.Add((shotgun as PickupObject));
BootlegShotgunID = shotgun.PickupObjectId; BootlegShotgunID = shotgun.PickupObjectId;

View File

@ -17,7 +17,7 @@ public class BulletKinGun : Gun {
bulletkinGun.SetShortDescription("Fires Bullet Kin..."); bulletkinGun.SetShortDescription("Fires Bullet Kin...");
bulletkinGun.SetLongDescription("This gun fires Bullet Kins....Don't ask questions. Just accept it."); bulletkinGun.SetLongDescription("This gun fires Bullet Kins....Don't ask questions. Just accept it.");
GunExt.SetupSprite(bulletkinGun, null, "bulletkin_gun_idle_001", 18); GunExt.SetupSprite(bulletkinGun, null, "bulletkin_gun_idle_001", 18);
bulletkinGun.AddProjectileModuleFrom("Magnum", true, false); bulletkinGun.AddProjectileModuleFrom("Magnum", true);
bulletkinGun.DefaultModule.ammoCost = 1; bulletkinGun.DefaultModule.ammoCost = 1;
bulletkinGun.DefaultModule.angleVariance = 0; bulletkinGun.DefaultModule.angleVariance = 0;
bulletkinGun.DefaultModule.numberOfShotsInClip = 1; bulletkinGun.DefaultModule.numberOfShotsInClip = 1;
@ -36,7 +36,7 @@ public class BulletKinGun : Gun {
bulletkinGun.encounterTrackable.EncounterGuid = "43a080b46fa448ef8d2be35f93ab6e64"; bulletkinGun.encounterTrackable.EncounterGuid = "43a080b46fa448ef8d2be35f93ab6e64";
bulletkinGun.gameObject.AddComponent<ExpandFireEnemiesGunMod>(); bulletkinGun.gameObject.AddComponent<ExpandFireEnemiesGunMod>();
ETGMod.Databases.Items.Add(bulletkinGun); ETGMod.Databases.Items.Add((bulletkinGun as PickupObject));
BulletKinGunID = bulletkinGun.PickupObjectId; BulletKinGunID = bulletkinGun.PickupObjectId;
} }

View File

@ -132,7 +132,7 @@ private static void Add(bool isGoldenVersion)
var defaultGun = PickupObjectDatabase.GetById(22) as Gun; var defaultGun = PickupObjectDatabase.GetById(22) as Gun;
gun.AddProjectileModuleFrom(defaultGun, true, false); gun.AddProjectileModuleFrom(defaultGun, true);
// move the gun up with the hand in the second frame of the shooting animation (hand movement was done in GAE with a y offset of 1) // move the gun up with the hand in the second frame of the shooting animation (hand movement was done in GAE with a y offset of 1)
//gun.GetComponent<tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[1].FrameToDefinition().MakeOffset(new Vector2(0, 1)); //gun.GetComponent<tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[1].FrameToDefinition().MakeOffset(new Vector2(0, 1));
@ -194,7 +194,7 @@ private static void Add(bool isGoldenVersion)
var comp = projectile.gameObject.AddComponent<SkullRevolverBullet>(); var comp = projectile.gameObject.AddComponent<SkullRevolverBullet>();
comp.jamsEnemies = true; comp.jamsEnemies = true;
ETGMod.Databases.Items.Add(gun, null, "ANY"); ETGMod.Databases.Items.Add((gun as PickupObject));
if (isGoldenVersion) if (isGoldenVersion)
{ {

View File

@ -61,7 +61,7 @@ public static void Generate(WestBros whichBro)
// The gun names are the names from the JSON dump! While most are the same, some guns named completely different things. If you need help finding gun names, ask a modder on the Gungeon discord. // The gun names are the names from the JSON dump! While most are the same, some guns named completely different things. If you need help finding gun names, ask a modder on the Gungeon discord.
// which means its the ETGMod.Databases.Items / PickupObjectDatabase.Instance.InternalGetByName name, aka the pickupobject.name // which means its the ETGMod.Databases.Items / PickupObjectDatabase.Instance.InternalGetByName name, aka the pickupobject.name
gun.AddProjectileModuleFrom(baseGun, true, false); gun.AddProjectileModuleFrom(baseGun, true);
gun.gunSwitchGroup = baseGun.gunSwitchGroup; gun.gunSwitchGroup = baseGun.gunSwitchGroup;
gun.muzzleFlashEffects = baseGun.muzzleFlashEffects; gun.muzzleFlashEffects = baseGun.muzzleFlashEffects;
@ -101,7 +101,7 @@ public static void Generate(WestBros whichBro)
var comp = projectile.gameObject.AddComponent<SkullRevolverBullet>(); var comp = projectile.gameObject.AddComponent<SkullRevolverBullet>();
comp.jamsEnemies = false; comp.jamsEnemies = false;
ETGMod.Databases.Items.Add(gun, null, "ANY"); ETGMod.Databases.Items.Add((gun as PickupObject));
switch (whichBro) switch (whichBro)
{ {

View File

@ -17,7 +17,7 @@ public class HotShotShotGun {
shotgun.SetShortDescription("You aren't supposed to have this..."); shotgun.SetShortDescription("You aren't supposed to have this...");
shotgun.SetLongDescription("The gun used by Hot Shot Shotgun Kin."); shotgun.SetLongDescription("The gun used by Hot Shot Shotgun Kin.");
// GunExt.SetupSprite(shotgun, null, "bootleg_shotgun_idle_001", 18); // GunExt.SetupSprite(shotgun, null, "bootleg_shotgun_idle_001", 18);
shotgun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(51).name, true, false); shotgun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(51).name, true);
// shotgun.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0); // shotgun.barrelOffset.localPosition -= new Vector3(0.3f, 0.2f, 0);
shotgun.barrelOffset.localPosition = (PickupObjectDatabase.GetById(51) as Gun).barrelOffset.localPosition; shotgun.barrelOffset.localPosition = (PickupObjectDatabase.GetById(51) as Gun).barrelOffset.localPosition;
if ((PickupObjectDatabase.GetById(51) as Gun).muzzleOffset && shotgun.muzzleOffset) { if ((PickupObjectDatabase.GetById(51) as Gun).muzzleOffset && shotgun.muzzleOffset) {
@ -30,7 +30,7 @@ public class HotShotShotGun {
shotgun.quality = PickupObject.ItemQuality.EXCLUDED; shotgun.quality = PickupObject.ItemQuality.EXCLUDED;
shotgun.gunSwitchGroup = "Shotgun"; shotgun.gunSwitchGroup = "Shotgun";
shotgun.encounterTrackable.EncounterGuid = "dc52f8e79c7c4a679238643a5bcb49c3"; shotgun.encounterTrackable.EncounterGuid = "dc52f8e79c7c4a679238643a5bcb49c3";
ETGMod.Databases.Items.Add(shotgun); ETGMod.Databases.Items.Add((shotgun as PickupObject));
HotShotShotGunID = shotgun.PickupObjectId; HotShotShotGunID = shotgun.PickupObjectId;
Projectile ShotgunProjectileComponent = EnemyDatabase.GetOrLoadByGuid("128db2f0781141bcb505d8f00f9e4d47").gameObject.GetComponent<AIBulletBank>().Bullets[0].BulletObject.GetComponent<Projectile>(); Projectile ShotgunProjectileComponent = EnemyDatabase.GetOrLoadByGuid("128db2f0781141bcb505d8f00f9e4d47").gameObject.GetComponent<AIBulletBank>().Bullets[0].BulletObject.GetComponent<Projectile>();

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.1")] [assembly: AssemblyVersion("2.7.2")]
[assembly: AssemblyFileVersion("2.7.1")] [assembly: AssemblyFileVersion("2.7.2")]

Binary file not shown.