diff --git a/AlchemistNPC.cs b/AlchemistNPC.cs index fb4c01cb..93c1c484 100644 --- a/AlchemistNPC.cs +++ b/AlchemistNPC.cs @@ -115,6 +115,7 @@ public override void Load() AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - Field of Hopes And Dreams"), ItemType("FieldsMusicBox"), TileType("FieldsMusicBox")); AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - Lantern"), ItemType("SheamMusicBox"), TileType("SheamMusicBox")); AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - The World Revolving"), ItemType("TheWorldRevolvingMusicBox"), TileType("TheWorldRevolvingMusicBox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - A Cyber's World"), ItemType("ACybersWorld"), TileType("ACybersWorld")); alchemistUI = new ShopChangeUI(); alchemistUI.Activate(); diff --git a/Items/Placeable/ACybersWorld.cs b/Items/Placeable/ACybersWorld.cs new file mode 100644 index 00000000..5885494a --- /dev/null +++ b/Items/Placeable/ACybersWorld.cs @@ -0,0 +1,33 @@ +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; +using Terraria.Localization; + +namespace AlchemistNPC.Items.Placeable +{ + public class ACybersWorld : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (Deltarune OST - A Cyber's World)"); + Tooltip.SetDefault("By Toby Fox"); + DisplayName.AddTranslation(GameCulture.Russian, "Музыкальная шкатулка (Deltarune OST - A Cyber's World)"); + DisplayName.AddTranslation(GameCulture.Chinese, "音乐盒 (Deltarune OST - A Cyber's World)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("ACybersWorld"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 500000; + item.accessory = true; + } + } +} diff --git a/Items/Placeable/ACybersWorld.png b/Items/Placeable/ACybersWorld.png new file mode 100644 index 00000000..cf8c111b Binary files /dev/null and b/Items/Placeable/ACybersWorld.png differ diff --git a/NPCs/Musician.cs b/NPCs/Musician.cs index d987ea0d..7ca9f9e6 100644 --- a/NPCs/Musician.cs +++ b/NPCs/Musician.cs @@ -855,6 +855,9 @@ public override void SetupShop(Chest shop, ref int nextSlot) shop.item[nextSlot].SetDefaults(ModLoader.GetMod("AlchemistNPC").ItemType("TheWorldRevolvingMusicBox")); shop.item[nextSlot].shopCustomPrice = 250000; nextSlot++; + shop.item[nextSlot].SetDefaults(ModLoader.GetMod("AlchemistNPC").ItemType("ACybersWorld")); + shop.item[nextSlot].shopCustomPrice = 250000; + nextSlot++; } if (ModLoader.GetMod("ThoriumMod") != null) { diff --git a/Sounds/Music/Deltarune OST - A Cyber's World.mp3 b/Sounds/Music/Deltarune OST - A Cyber's World.mp3 new file mode 100644 index 00000000..f6e88e0e Binary files /dev/null and b/Sounds/Music/Deltarune OST - A Cyber's World.mp3 differ diff --git a/Tiles/ACybersWorld.cs b/Tiles/ACybersWorld.cs new file mode 100644 index 00000000..9f87afda --- /dev/null +++ b/Tiles/ACybersWorld.cs @@ -0,0 +1,40 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace AlchemistNPC.Tiles +{ + class ACybersWorld : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("ACybersWorld")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("ACybersWorld"); + } + } +} diff --git a/Tiles/ACybersWorld.png b/Tiles/ACybersWorld.png new file mode 100644 index 00000000..6e3f4451 Binary files /dev/null and b/Tiles/ACybersWorld.png differ