diff --git a/TileEntities/TileEntityTimeHandler.cs b/TileEntities/TileEntityTimeHandler.cs index 2a34a9795c..dd4df7fbdf 100644 --- a/TileEntities/TileEntityTimeHandler.cs +++ b/TileEntities/TileEntityTimeHandler.cs @@ -16,9 +16,9 @@ namespace CalamityMod.TileEntities if (Main.netMode != NetmodeID.MultiplayerClient) return; - byte factoryType = ModContent.GetInstance().type; - byte chargerType = ModContent.GetInstance().type; - byte codebreakerType = ModContent.GetInstance().type; + int factoryType = ModContent.GetInstance().Type; + int chargerType = ModContent.GetInstance().Type; + int codebreakerType = ModContent.GetInstance().Type; var enumerator = TileEntity.ByID.Values.GetEnumerator(); do diff --git a/UI/CodebreakerUI.cs b/UI/CodebreakerUI.cs index 6d1a109929..3f497a3cb8 100644 --- a/UI/CodebreakerUI.cs +++ b/UI/CodebreakerUI.cs @@ -73,7 +73,7 @@ namespace CalamityMod.UI // Display some error text if the codebreaker isn't strong enough to decrypt the schematic. if (codebreakerTileEntity.HeldSchematicID != 0 && !codebreakerTileEntity.CanDecryptHeldSchematic) - DisplayNotStrongEnoughErrorText(schematicSlotDrawCenter + new Vector2(-24f, 30f)); + DisplayNotStrongEnoughErrorText(schematicSlotDrawCenter + new Vector2(-24f, 56f)); // Handle decryption costs. else if (codebreakerTileEntity.HeldSchematicID != 0 && codebreakerTileEntity.DecryptionCountdown == 0) @@ -92,12 +92,7 @@ namespace CalamityMod.UI } } else if (codebreakerTileEntity.DecryptionCountdown > 0) - { - if (!AwaitingCloseConfirmation) - DisplayDecryptCancelButton(codebreakerTileEntity, costVerificationLocation - Vector2.UnitY * GeneralScale * 30f); - else - DisplayDecryptCancelButton(codebreakerTileEntity, textPanelCenter + Vector2.UnitY * GeneralScale * 110f); - } + DisplayDecryptCancelButton(codebreakerTileEntity, costVerificationLocation - Vector2.UnitY * GeneralScale * 30f); if (canSummonDraedon) HandleDraedonSummonButton(codebreakerTileEntity, summonButtonCenter); @@ -105,7 +100,7 @@ namespace CalamityMod.UI if (codebreakerTileEntity.DecryptionCountdown > 0 || AwaitingDecryptionTextClose) HandleDecryptionStuff(codebreakerTileEntity, backgroundTexture, backgroundTopLeft, schematicSlotDrawCenter + Vector2.UnitY * GeneralScale * 80f); if (codebreakerTileEntity.DecryptionCountdown > 0 && AwaitingCloseConfirmation) - DrawDecryptCancelConfirmationText(textPanelCenter); + DrawDecryptCancelConfirmationText(costVerificationLocation); // Draw the schematic icon. Texture2D schematicIconBG = ModContent.Request("CalamityMod/ExtraTextures/UI/EncryptedSchematicSlotBackground").Value; @@ -370,6 +365,8 @@ namespace CalamityMod.UI public static void DrawDecryptCancelConfirmationText(Vector2 drawPosition) { Texture2D textPanelTexture = ModContent.Request("CalamityMod/ExtraTextures/UI/DraedonDecrypterScreen").Value; + drawPosition.X += GeneralScale * 196f; + Vector2 scale = new Vector2(1f, 0.3f) * GeneralScale; Main.spriteBatch.Draw(textPanelTexture, drawPosition, null, Color.White, 0f, textPanelTexture.Size() * 0.5f, scale, SpriteEffects.None, 0);