-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11b269b
commit 2a02afb
Showing
3 changed files
with
35 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,40 @@ | ||
using Aequus.NPCs.Town.CarpenterNPC; | ||
using Microsoft.Xna.Framework; | ||
using Terraria; | ||
using Terraria.DataStructures; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
|
||
namespace Aequus.Items.Misc.FishCatches.QuestFish { | ||
public class BrickFish : ModItem { | ||
public override void SetStaticDefaults() { | ||
Item.ResearchUnlockCount = 2; | ||
} | ||
namespace Aequus.Items.Misc.FishCatches.QuestFish; | ||
public class BrickFish : ModItem { | ||
public static int CustomReward { get; internal set; } | ||
|
||
public override void SetDefaults() { | ||
Item.CloneDefaults(ItemID.Batfish); | ||
} | ||
public override void SetStaticDefaults() { | ||
Item.ResearchUnlockCount = 2; | ||
} | ||
|
||
public override bool IsQuestFish() { | ||
return true; | ||
} | ||
public override void SetDefaults() { | ||
Item.CloneDefaults(ItemID.Batfish); | ||
} | ||
|
||
public override bool IsAnglerQuestAvailable() { | ||
return NPC.AnyNPCs(ModContent.NPCType<Carpenter>()); | ||
} | ||
public override bool IsQuestFish() { | ||
return true; | ||
} | ||
|
||
public override void AnglerQuestChat(ref string description, ref string catchLocation) { | ||
description = TextHelper.GetTextValue("AnglerQuest.BrickFish.Description"); | ||
catchLocation = TextHelper.GetTextValue("AnglerQuest.BrickFish.CatchLocation"); | ||
} | ||
public override bool IsAnglerQuestAvailable() { | ||
return NPC.AnyNPCs(ModContent.NPCType<Carpenter>()); | ||
} | ||
|
||
public override void AnglerQuestChat(ref string description, ref string catchLocation) { | ||
description = TextHelper.GetTextValue("AnglerQuest.BrickFish.Description"); | ||
catchLocation = TextHelper.GetTextValue("AnglerQuest.BrickFish.CatchLocation"); | ||
} | ||
|
||
public static bool CheckVillagerBuildings(FishingAttempt attempt, Player player) { | ||
var comparePoint = new Vector2(attempt.X * 16f + 8f, attempt.Y * 16f + 8f); | ||
for (int i = 0; i < Main.maxNPCs; i++) { | ||
if (Main.npc[i].friendly && Main.npc[i].townNPC && !Main.npc[i].homeless) { | ||
if (Vector2.Distance(Main.npc[i].Home().ToWorldCoordinates(), comparePoint) < 1000f) { | ||
return true; | ||
} | ||
public static bool CheckVillagerBuildings(FishingAttempt attempt, Player player) { | ||
var comparePoint = new Vector2(attempt.X * 16f + 8f, attempt.Y * 16f + 8f); | ||
for (int i = 0; i < Main.maxNPCs; i++) { | ||
if (Main.npc[i].friendly && Main.npc[i].townNPC && !Main.npc[i].homeless) { | ||
if (Vector2.Distance(Main.npc[i].Home().ToWorldCoordinates(), comparePoint) < 1000f) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
return false; | ||
} | ||
} |