Skip to content

Commit

Permalink
Configuration of chosen NPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilysen committed Feb 4, 2020
1 parent 2686c66 commit d51d06d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ If you have a mod like Calamity that already has this function built in, you won

### Feb. 4, 2020

#### 1.0.0.6

* Removed an erroneous statement from the description stating that clothier voodoo dolls weren't included (which they currently are!)
* Added a config option to change the NPC that sells boss summons.

#### 1.0.0.4

* Changed the tooltip of the Bunny to explain its mechanics more accurately.
Expand Down
4 changes: 3 additions & 1 deletion YABSSM.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;

namespace YABSSM
{
Expand All @@ -11,7 +12,8 @@ internal class YABSSMNPC : GlobalNPC
{
public override void SetupShop(int type, Chest shop, ref int nextSlot)
{
if (type == NPCID.Clothier)
YABSSMConfig config = GetInstance<YABSSMConfig>();
if ((int)config.vendorNPC == type)
{
if (NPC.downedSlimeKing)
{
Expand Down
32 changes: 32 additions & 0 deletions YABSSMConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System.ComponentModel;
using Terraria.ID;
using Terraria.ModLoader.Config;

namespace YABSSM
{
public class YABSSMConfig : ModConfig
{
public enum PossibleNPCs : short
{
Clothier = NPCID.Clothier,
Dryad = NPCID.Dryad,
Merchant = NPCID.Merchant,
Demolitionist = NPCID.Demolitionist,
DyeTrader = NPCID.DyeTrader,
ArmsDealer = NPCID.ArmsDealer,
Stylist = NPCID.Stylist,
Painter = NPCID.Painter,
GoblinTinkerer = NPCID.GoblinTinkerer,
WitchDoctor = NPCID.WitchDoctor,
Mechanic = NPCID.Mechanic,
PartyGirl = NPCID.PartyGirl
}

public override ConfigScope Mode => ConfigScope.ServerSide;

[Label("Vendor NPC")]
[Tooltip("Dictates which town NPC sells boss summon items.")]
[DefaultValue(PossibleNPCs.Clothier)]
public PossibleNPCs vendorNPC;
}
}
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
author = Ilysen
version = 1.0.0.5
version = 1.0.0.6
displayName = Yet Another Boss Summon Shop
homepage = https://forums.terraria.org/index.php?threads/avas-mods-thaumaturgy-challenge-runes-yabssm.81892/
4 changes: 2 additions & 2 deletions description.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
YABSS is a simple mod that makes the Clothier sell boss summoning items when you defeat the respective vanilla boss. The price for these items depends on the difficulty of the boss and placement for progression.
YABSS is a simple mod that makes a town NPC sell boss summoning items when you defeat the respective vanilla boss. The price for these items depends on the difficulty of the boss and placement for progression.

Skeletron isn't included, since he serves primarily as a gateway boss, with little worthwhile loot.
For the best cross-mod compatability, the NPC that sells summoning items is configurable to your preference. In the mod config, you can choose any of the pre-Hardmode town NPCs with a shop. It defaults to the Clothier.

After defeating the Wall of Flesh, he will sell Innocent, Helpless Bunnies that can summon the Wall of Flesh without murdering the Guide. After defeating Plantera, he will sell a Peppery Fruit that summons her without need of a bulb. Finally, downing the Moon Lord will cause him to sell Cracked Relics that summon him instantly instead of after a delay.

Expand Down

0 comments on commit d51d06d

Please sign in to comment.