Implemented Magna Cannon to Base Holdout.
1. Implemented Magna Cannon to the BaseGunHoldoutProjectile abstract class. 2. Gave multiplayer support to Magna Cannon.
This commit is contained in:
1 parent
52da30c8f0
commit
fa4e98fdec
3 files changed
+56
-84
No files matched your search
@@ -22,10 +22,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true;
|
||||
}
|
||||
public override void SetStaticDefaults() => ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 56;
|
||||
@@ -49,6 +47,15 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 spawnPosition = player.RotatedRelativePoint(player.MountedCenter);
|
||||
Projectile.NewProjectileDirect(source, spawnPosition, player.Calamity().mouseWorld - player.RotatedRelativePoint(player.MountedCenter), ModContent.ProjectileType<MagnaCannonHoldout>(), 0, 0f, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
Reference in new issue
Block a user