Skip to content

Commit

Permalink
really fixing the allow verb cast crash now
Browse files Browse the repository at this point in the history
  • Loading branch information
Skullywag committed Oct 31, 2015
1 parent 951bfc3 commit 9a14e23
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
Binary file modified Assemblies/MedievalShields.dll
Binary file not shown.
Binary file modified Source/.vs/MedievalShields/v14/.suo
Binary file not shown.
24 changes: 13 additions & 11 deletions Source/MedievalShields/Apparel_Shield.cs
Expand Up @@ -91,18 +91,20 @@ public void Break()
}
public override bool AllowVerbCast(IntVec3 root, TargetInfo targ)
{
equippedDef = this.wearer.equipment.Primary.def;
if (equippedDef.IsMeleeWeapon)
if (this.wearer.equipment.Primary != null)
{
return true;
}
if (equippedDef.defName.Contains("pistol") || equippedDef.defName.Contains("Pistol"))
{
return true;
}
if (equippedDef == ThingDef.Named("Gun_PDW"))
{
return true;
if (this.wearer.equipment.Primary.def.IsMeleeWeapon)
{
return true;
}
if (this.wearer.equipment.Primary.def.defName.Contains("pistol") || this.wearer.equipment.Primary.def.defName.Contains("Pistol"))
{
return true;
}
if (this.wearer.equipment.Primary.def.defName.Contains("Gun_PDW"))
{
return true;
}
}
return root.AdjacentTo8Way(targ.Cell);
}
Expand Down
Binary file modified Source/MedievalShields/bin/Debug/MedievalShields.dll
Binary file not shown.
Binary file modified Source/MedievalShields/bin/Debug/MedievalShields.pdb
Binary file not shown.
Binary file modified Source/MedievalShields/obj/Debug/MedievalShields.dll
Binary file not shown.
Binary file modified Source/MedievalShields/obj/Debug/MedievalShields.pdb
Binary file not shown.

0 comments on commit 9a14e23

Please sign in to comment.