示例#1
0
 public static DamageDef GetDamageDef(this Verb verb)
 {
     if (verb.verbProps.LaunchesProjectile)
     {
         return(verb.GetProjectile()?.projectile.damageDef);
     }
     return(verb.verbProps.meleeDamageDef);
 }
示例#2
0
        public static bool UsesExplosiveProjectiles(this Verb verb)
        {
            ThingDef projectile = verb.GetProjectile();

            if (projectile != null)
            {
                return(projectile.projectile.explosionRadius > 0f);
            }
            return(false);
        }
示例#3
0
 public static DamageDef GetDamageDef(this Verb verb)
 {
     if (verb.verbProps.LaunchesProjectile)
     {
         ThingDef projectile = verb.GetProjectile();
         if (projectile != null)
         {
             return(projectile.projectile.damageDef);
         }
         return(null);
     }
     return(verb.verbProps.meleeDamageDef);
 }
        public static DamageDef GetDamageDef(this Verb verb)
        {
            DamageDef result;

            if (verb.verbProps.LaunchesProjectile)
            {
                ThingDef projectile = verb.GetProjectile();
                if (projectile != null)
                {
                    result = projectile.projectile.damageDef;
                }
                else
                {
                    result = null;
                }
            }
            else
            {
                result = verb.verbProps.meleeDamageDef;
            }
            return(result);
        }
示例#5
0
        public static bool ProjectileFliesOverhead(this Verb verb)
        {
            ThingDef projectile = verb.GetProjectile();

            return(projectile != null && projectile.projectile.flyOverhead);
        }
示例#6
0
        public static bool IsIncendiary(this Verb verb)
        {
            ThingDef projectile = verb.GetProjectile();

            return(projectile != null && projectile.projectile.ai_IsIncendiary);
        }
示例#7
0
 public static bool ProjectileFliesOverhead(this Verb verb)
 {
     return(verb.GetProjectile()?.projectile.flyOverhead ?? false);
 }
示例#8
0
 public static bool IsIncendiary(this Verb verb)
 {
     return(verb.GetProjectile()?.projectile.ai_IsIncendiary ?? false);
 }