Skip to content

Commit

Permalink
ExamplePrefix logic fix, csproj fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidPack committed Jul 18, 2018
1 parent 909763e commit 2d75028
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ExampleMod/ExampleMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@
<Compile Include="Items\CarKey.cs" />
<Compile Include="Items\CopperShortsword.cs" />
<Compile Include="Items\EquipMaterial.cs" />
<Compile Include="Items\ExampleDamageClass\ExampleDamageAccessory.cs" />
<Compile Include="Items\ExampleDamageClass\ExampleDamageItem.cs" />
<Compile Include="Items\ExampleDamageClass\ExampleDamagePlayer.cs" />
<Compile Include="Items\ExampleDamageClass\Mundane.cs" />
<Compile Include="Items\ExampleDrawTooltips.cs" />
<Compile Include="Items\ExampleDye.cs" />
<Compile Include="Items\ExampleGlobalRecipe.cs" />
Expand Down Expand Up @@ -203,6 +207,7 @@
<Compile Include="NPCs\PuritySpirit\PuritySpiritSky.cs" />
<Compile Include="NPCs\Sarcophagus.cs" />
<Compile Include="NPCs\Worm.cs" />
<Compile Include="Prefixes\AwesomePrefix.cs" />
<Compile Include="Projectiles\ElementBall.cs" />
<Compile Include="Projectiles\ElementLaser.cs" />
<Compile Include="Projectiles\ElementShield.cs" />
Expand Down
2 changes: 1 addition & 1 deletion ExampleMod/Items/ExampleInstancedGlobalItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public override GlobalItem Clone(Item item, Item itemClone)

public override int ChoosePrefix(Item item, UnifiedRandom rand)
{
if (item.accessory || item.damage > 0 && item.maxStack == 1 && rand.NextBool(30))
if ((item.accessory || item.damage > 0) && item.maxStack == 1 && rand.NextBool(30))
{
return mod.PrefixType(rand.Next(2) == 0 ? "Awesome" : "ReallyAwesome");
}
Expand Down
1 change: 1 addition & 0 deletions ExampleMod/NPCs/ExamplePerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace ExampleMod.NPCs
{
// [AutoloadHead] and npc.townNPC are extremely important and absolutely both necessary for any Town NPC to work at all.
[AutoloadHead]
public class ExamplePerson : ModNPC
{
Expand Down

0 comments on commit 2d75028

Please sign in to comment.