コード例 #1
0
 private void OnGetResistance(EntityUid uid, ExplosionResistanceComponent component, GetExplosionResistanceEvent args)
 {
     args.Resistance += component.GlobalResistance;
     if (component.Resistances.TryGetValue(args.ExplotionPrototype, out var resistance))
     {
         args.Resistance += resistance;
     }
 }
コード例 #2
0
 private void OnGetResistance(EntityUid uid, ExplosionResistanceComponent component, GetExplosionResistanceEvent args)
 {
     args.DamageCoefficient *= component.DamageCoefficient;
     if (component.Resistances.TryGetValue(args.ExplotionPrototype, out var resistance))
     {
         args.DamageCoefficient *= resistance;
     }
 }