From 76561273a8d652d6f3400d1fc3d03b795ec780af Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Thu, 3 Nov 2022 22:48:29 +0100 Subject: [PATCH] Hello world --- Changes/NPCLoot.cs | 19 +++++++ Items/CopperSwordOnAStick.cs | 42 ++++++++++++++++ Items/CopperSwordOnAStick.png | Bin 0 -> 1160 bytes Items/MithrilPebbleOfPigSmiting.cs | 47 ++++++++++++++++++ Items/MithrilPebbleOfPigSmiting.png | Bin 0 -> 562 bytes .../Weapons/CopperSwordOnAStickProjectile.cs | 32 ++++++++++++ .../Weapons/CopperSwordOnAStickProjectile.png | Bin 0 -> 1085 bytes .../MithrilPebbleOfPigSmitingProjectile.cs | 31 ++++++++++++ .../MithrilPebbleOfPigSmitingProjectile.png | Bin 0 -> 562 bytes Properties/launchSettings.json | 16 ++++++ YHTMod.cs | 9 ++++ YHTMod.csproj | 13 +++++ build.txt | 3 ++ description.txt | 1 + global.json | 6 +++ icon.png | Bin 0 -> 3210 bytes 16 files changed, 219 insertions(+) create mode 100644 Changes/NPCLoot.cs create mode 100644 Items/CopperSwordOnAStick.cs create mode 100644 Items/CopperSwordOnAStick.png create mode 100644 Items/MithrilPebbleOfPigSmiting.cs create mode 100644 Items/MithrilPebbleOfPigSmiting.png create mode 100644 Projectiles/Weapons/CopperSwordOnAStickProjectile.cs create mode 100644 Projectiles/Weapons/CopperSwordOnAStickProjectile.png create mode 100644 Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.cs create mode 100644 Projectiles/Weapons/MithrilPebbleOfPigSmitingProjectile.png create mode 100644 Properties/launchSettings.json create mode 100644 YHTMod.cs create mode 100644 YHTMod.csproj create mode 100644 build.txt create mode 100644 description.txt create mode 100644 global.json create mode 100644 icon.png diff --git a/Changes/NPCLoot.cs b/Changes/NPCLoot.cs new file mode 100644 index 0000000..c2c0a66 --- /dev/null +++ b/Changes/NPCLoot.cs @@ -0,0 +1,19 @@ + +using Terraria; +using Terraria.GameContent.ItemDropRules; +using Terraria.ID; +using Terraria.ModLoader; +using YHTMod.Items; + + +namespace YHTMod.Changes; + +public class NpcLoot : GlobalNPC +{ + public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) { + int id = npc.type; + if (NPCID.Sets.CountsAsCritter[id]) { + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 400, 1, 1)); + } + } +} \ No newline at end of file diff --git a/Items/CopperSwordOnAStick.cs b/Items/CopperSwordOnAStick.cs new file mode 100644 index 0000000..3376e81 --- /dev/null +++ b/Items/CopperSwordOnAStick.cs @@ -0,0 +1,42 @@ +using Terraria.GameContent.Creative; +using Terraria.ID; +using Terraria.ModLoader; +using YHTMod.Projectiles.Weapons; + +namespace YHTMod.Items; + +public class CopperSwordOnAStick : ModItem { + public override void SetStaticDefaults() { + DisplayName.SetDefault("Copper Sword On A Stick"); + CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1; + } + + public override void SetDefaults() { + Item.DamageType = DamageClass.Melee; + Item.damage = 3; + Item.width = 80; + Item.height = 80; + Item.useTime = 7; + Item.useAnimation = 7; + Item.useStyle = ItemUseStyleID.Rapier; + Item.knockBack = 2f; + Item.value = 100; + Item.rare = ItemRarityID.White; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.crit = 1; + Item.noMelee = true; + Item.noUseGraphic = true; + + Item.shootSpeed = 1f; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() { + CreateRecipe() + .AddIngredient(ItemID.Wood, 5) + .AddIngredient(ItemID.Rope, 5) + .AddIngredient(ItemID.CopperShortsword) + .Register(); + } +} \ No newline at end of file diff --git a/Items/CopperSwordOnAStick.png b/Items/CopperSwordOnAStick.png new file mode 100644 index 0000000000000000000000000000000000000000..c6247a463a5b226e8a85f30cc097465fc45c60e4 GIT binary patch literal 1160 zcmV;31b6$1P)gQko&;c+4$r2N(rSK9 z3ce!*ALSTkWoBConM@j8#Yz7AYhlK|uwZ(BU9X)uf$u_9Ys=C6vj-=xw12PL3i<N%I6` zaVPILs9<{aEsYSUDF^~10$j*usMl@3UZxqpe}1KLY3Gc_o8m2H2Z5Rbdo=6Wl?!!|)W(KD!=UNshHVD)tfF4*0P?ncpD~rp{lm&{ruIPObs3}jBdoNI|^Thh@ z;^?E2JP3q9y#%7<^^cCyj^*`U)X{Jk)_WfU?|PsqdFX+f^1QnX3wgUMlXUKXuCHU= zZP5b_iIaE3wg<}3@l4A@4>Tl_oj@UPdH5kk^yJx?(Vi#gj&-1>M0Ns29#IliKVhim z%2MFoo0YnMJ*tM0WFEUG(i1~z3h(*+Eama(%V8y#t0eiftYLKtZ@qd^O7}eqihutF z^4NQmF9-Vljz;;xXv?G`Ca@70%F7)Wf~SuM=v32v<3afP{6{erUefOj2giOL7%CLo z;^t1Iroqqd8xy=m>kvRAk{kEyA4Y4B!N!p;B)kVpxRo9N= zdLytC;f2R=PM|IF*x!XAP)fiyc@SubsP#S2R(TM}U7+pqAdss-SL8t;H-WCngFr3< zU6luct_yTs9t657kc&JBbWI>Pc@XG|K(6v2&~|~`(); + } +} \ No newline at end of file diff --git a/Items/MithrilPebbleOfPigSmiting.png b/Items/MithrilPebbleOfPigSmiting.png new file mode 100644 index 0000000000000000000000000000000000000000..da1645eef484b66c0b7a39a4c74a7465f48a183f GIT binary patch literal 562 zcmV-20?qx2P)5U~|(ECdVD z##iA#&{nWj5ClaKvGND_Y9y?85+Ol!mf8DpX3k~i4EW=D!*Uy{0*eY>Xh9zfd$oL$y5 zeHYF*q3gj;IjM>ikm=84;Pn(*lhAPkEsNExe%3j;huL*`qHEaOhkn`Lw)73b8fWdR z)Jy*W000SaNLh0L01sgR01sgSs6VG^0001KNklJFl`QNs$on9m?TI5Yz49aOx2G&FTqT(0vLxw zMI6osi9eaLgOL&DNVxe>21pXb1QY0rV3Htl0H{tZ^MT`**#H0l07*qoM6N<$g3(0s AzyJUM literal 0 HcmV?d00001 diff --git a/Projectiles/Weapons/CopperSwordOnAStickProjectile.cs b/Projectiles/Weapons/CopperSwordOnAStickProjectile.cs new file mode 100644 index 0000000..f1c4b06 --- /dev/null +++ b/Projectiles/Weapons/CopperSwordOnAStickProjectile.cs @@ -0,0 +1,32 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace YHTMod.Projectiles.Weapons; + +class CopperSwordOnAStickProjectile : ModProjectile { + public override void SetDefaults() { + Projectile.width = 80; + Projectile.height = 80; + + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Melee; + Projectile.ownerHitCheck = true; + Projectile.extraUpdates = 1; + Projectile.timeLeft = 300; + Projectile.aiStyle = ProjAIStyleID.ShortSword; + } + + public override void AI() { + base.AI(); + float random = (float) (Random.Shared.NextDouble() / 5f); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 - MathHelper.PiOver4 * Projectile.spriteDirection; + Projectile.rotation += random; + DrawOriginOffsetX = 0; + DrawOffsetX = 0; + } +} \ No newline at end of file diff --git a/Projectiles/Weapons/CopperSwordOnAStickProjectile.png b/Projectiles/Weapons/CopperSwordOnAStickProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..c99de4c232dc005f2d07e12768c1efd7af682c3e GIT binary patch literal 1085 zcmV-D1j74?P)gQko&;c+4$r2N(rSK9 z3ce!*ALSTkWoBConM@j8#Yz7AYhlK|uwZ(BU9X)uf$u_9Ys=C6vj-=xw12PL3i<opr~tyiYSNT2JXwN}OU&P2E@`UI!ctR#-k?8UI-sSd(b)K30Uw%_FCdG%+F7FkqsyDL zhCoF@5ap6~82_N$Tyfe@%x zz)4<5BtkoupZA=OhP$xZ-@)?S9H>hk=0HVxp1TVRd57^KI`@xErlz|s=0Hv2OIGYa!+O6E@mnE`F6UpqTT7 zyql*t>NXkfB7GvFu1nT4&w;CZ#|=|g8nGz{sds`dH_l03sk%lS*E0f}5zjt`aRS{U zkNsU30;K|OlLvvCh`N3bbgMiF5U~|(ECdVD z##iA#&{nWj5ClaKvGND_Y9y?85+Ol!mf8DpX3k~i4EW=D!*Uy{0*eY>Xh9zfd$oL$y5 zeHYF*q3gj;IjM>ikm=84;Pn(*lhAPkEsNExe%3j;huL*`qHEaOhkn`Lw)73b8fWdR z)Jy*W000SaNLh0L01sgR01sgSs6VG^0001KNklJFl`QNs$on9m?TI5Yz49aOx2G&FTqT(0vLxw zMI6osi9eaLgOL&DNVxe>21pXb1QY0rV3Htl0H{tZ^MT`**#H0l07*qoM6N<$g3(0s AzyJUM literal 0 HcmV?d00001 diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..8da89ff --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,16 @@ +{ + "profiles": { + "Terraria": { + "commandName": "Executable", + "executablePath": "dotnet", + "commandLineArgs": "$(tMLPath)", + "workingDirectory": "$(tMLSteamPath)" + }, + "TerrariaServer": { + "commandName": "Executable", + "executablePath": "dotnet", + "commandLineArgs": "$(tMLServerPath)", + "workingDirectory": "$(tMLSteamPath)" + } + } +} \ No newline at end of file diff --git a/YHTMod.cs b/YHTMod.cs new file mode 100644 index 0000000..de157c4 --- /dev/null +++ b/YHTMod.cs @@ -0,0 +1,9 @@ +using Terraria.ModLoader; + +namespace YHTMod { + public class YHTMod : Mod { + public YHTMod() { + + } + } +} \ No newline at end of file diff --git a/YHTMod.csproj b/YHTMod.csproj new file mode 100644 index 0000000..2f6bba4 --- /dev/null +++ b/YHTMod.csproj @@ -0,0 +1,13 @@ + + + + + YHTMod + net6.0 + AnyCPU + latest + + + + + \ No newline at end of file diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..c933a4f --- /dev/null +++ b/build.txt @@ -0,0 +1,3 @@ +displayName = YHT Mod +author = YouHaveTrouble +version = 0.1 \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..44b3632 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Bunch of random additions ranging from QoL to random references \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..87932f4 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..707e83545d1815eee17ac0f636d82fae3c9b7710 GIT binary patch literal 3210 zcmaKuS2P^@7RLXB=smg+o#hANKFtFMF@OzqKEBoSBI(6*(I@0DwwgPs`$un*AH3#DADXcTf!g zxv2*XW@hH@?eG1}-P?yt9|q&{@$+``c;X5`;9R~X!pd@sN%ds$2x=IMOgHqlU?kXrQUrv#$!HB?xr=5Q%{%F|wTajV3S$YAl8}jv=AxAG3609w+YBP)GzEhh3akfteU^6nwQY0g(BpIUx{Wm(I-yDNF%eH(g`3fV(oN8oL*-4d9Z1 z!OgHo5zL4INqrkPJy6#SFj!iO20%&)B+X-^?f{|?;5fj`8wg(K00x}{8j{ z(htIQiB7+FjT{*j-x^CLd+j{Gk*s^sOmTg|F~QTL?~H~EGpw4^`zC4SCLT%`^Ta_@ z@AUGIUq4z|5Vj|E)s zt6%CC@&lxseyT4354HHjt%e%a`$+-NDhwB{(_}yDWD&&>-|DO*tpL|V`()D})gq&Yx( z(}{a77UCQa=S?DI&WSqZ?$jfqPvGMkjAbzAF-(!uld_1n;iwHX-QEY z0MZc`(QUd?>ER9Ls^2I-!O&$2Y_E0RQ+$2oFO{3jRG9bGuZc}HQNC#NYo$BQT(TOh zUlQ|!g+!+3iKKX6H?;n)C|R1za6L~IWn~{*-MuQp*0^JrvHAca`fzOwnLJSdl*@@z zQx9$gH<{5ZqG);zm=qd)K2zh4o!}?HCz}a{E{(ch&;m}Lm-1)Si-8jqNHN6 zg2MXHde|zt{GnxNjgGa92B&ItJ%J%Z~aZkHib&F4#VOX8TRk2++i<~H9||d+Iv=HW@W-F^(xIPb$8n3Yj#WX zOWL(tZO_B0HTw+&?FDra$=DnDo0hYd3#H_xOvb88$2H;=p2h4%ty%$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