Beispiel #1
0
        private void DealDamage(ISuicideAct suicide, IChatManager chat, DamageableComponent damageableComponent, IEntity source, IEntity target)
        {
            SuicideKind kind = suicide.Suicide(target, chat);

            if (kind != SuicideKind.Special)
            {
                damageableComponent.TakeDamage(kind switch
                {
                    SuicideKind.Brute => DamageType.Brute,
                    SuicideKind.Heat => DamageType.Heat,
                    SuicideKind.Cold => DamageType.Cold,
                    SuicideKind.Acid => DamageType.Acid,
                    SuicideKind.Toxic => DamageType.Toxic,
                    SuicideKind.Electric => DamageType.Electric,
                    _ => DamageType.Brute
                },
Beispiel #2
0
        private void DealDamage(ISuicideAct suicide, IChatManager chat, IDamageableComponent damageableComponent, IEntity source, IEntity target)
        {
            SuicideKind kind = suicide.Suicide(target, chat);

            if (kind != SuicideKind.Special)
            {
                damageableComponent.ChangeDamage(kind switch
                {
                    SuicideKind.Blunt => DamageType.Blunt,
                    SuicideKind.Piercing => DamageType.Piercing,
                    SuicideKind.Heat => DamageType.Heat,
                    SuicideKind.Disintegration => DamageType.Disintegration,
                    SuicideKind.Cellular => DamageType.Cellular,
                    SuicideKind.DNA => DamageType.DNA,
                    SuicideKind.Asphyxiation => DamageType.Asphyxiation,
                    _ => DamageType.Blunt
                },
        private void DealDamage(ISuicideAct suicide, IChatManager chat, IDamageableComponent damageableComponent, IEntity source, IEntity target)
        {
            var kind = suicide.Suicide(target, chat);

            if (kind != SuicideKind.Special)
            {
                damageableComponent.SetDamage(kind switch
                {
                    SuicideKind.Blunt => DamageType.Blunt,
                    SuicideKind.Slash => DamageType.Slash,
                    SuicideKind.Piercing => DamageType.Piercing,
                    SuicideKind.Heat => DamageType.Heat,
                    SuicideKind.Shock => DamageType.Shock,
                    SuicideKind.Cold => DamageType.Cold,
                    SuicideKind.Poison => DamageType.Poison,
                    SuicideKind.Radiation => DamageType.Radiation,
                    SuicideKind.Asphyxiation => DamageType.Asphyxiation,
                    SuicideKind.Bloodloss => DamageType.Bloodloss,
                    _ => DamageType.Blunt
                },
        private void DealDamage(ISuicideAct suicide, IChatManager chat, IDamageableComponent damageableComponent, IEntity source, IEntity target)
        {
            var kind = suicide.Suicide(target, chat);

            if (kind != SuicideKind.Special)
            {
                var prototypeManager = IoCManager.Resolve <IPrototypeManager>();
                damageableComponent.TrySetDamage(kind switch
                {
                    SuicideKind.Blunt => prototypeManager.Index <DamageTypePrototype>("Blunt"),
                    SuicideKind.Slash => prototypeManager.Index <DamageTypePrototype>("Slash"),
                    SuicideKind.Piercing => prototypeManager.Index <DamageTypePrototype>("Piercing"),
                    SuicideKind.Heat => prototypeManager.Index <DamageTypePrototype>("Heat"),
                    SuicideKind.Shock => prototypeManager.Index <DamageTypePrototype>("Shock"),
                    SuicideKind.Cold => prototypeManager.Index <DamageTypePrototype>("Cold"),
                    SuicideKind.Poison => prototypeManager.Index <DamageTypePrototype>("Poison"),
                    SuicideKind.Radiation => prototypeManager.Index <DamageTypePrototype>("Radiation"),
                    SuicideKind.Asphyxiation => prototypeManager.Index <DamageTypePrototype>("Asphyxiation"),
                    SuicideKind.Bloodloss => prototypeManager.Index <DamageTypePrototype>("Bloodloss"),
                    _ => prototypeManager.Index <DamageTypePrototype>("Blunt")
                },
Beispiel #5
0
        private void DealDamage(ISuicideAct suicide, IChatManager chat, EntityUid target)
        {
            var kind = suicide.Suicide(target, chat);

            if (kind != SuicideKind.Special)
            {
                // TODO SUICIDE ..heh.. anyway, someone should fix this mess.
                var             prototypeManager = IoCManager.Resolve <IPrototypeManager>();
                DamageSpecifier damage           = new(kind switch
                {
                    SuicideKind.Blunt => prototypeManager.Index <DamageTypePrototype>("Blunt"),
                    SuicideKind.Slash => prototypeManager.Index <DamageTypePrototype>("Slash"),
                    SuicideKind.Piercing => prototypeManager.Index <DamageTypePrototype>("Piercing"),
                    SuicideKind.Heat => prototypeManager.Index <DamageTypePrototype>("Heat"),
                    SuicideKind.Shock => prototypeManager.Index <DamageTypePrototype>("Shock"),
                    SuicideKind.Cold => prototypeManager.Index <DamageTypePrototype>("Cold"),
                    SuicideKind.Poison => prototypeManager.Index <DamageTypePrototype>("Poison"),
                    SuicideKind.Radiation => prototypeManager.Index <DamageTypePrototype>("Radiation"),
                    SuicideKind.Asphyxiation => prototypeManager.Index <DamageTypePrototype>("Asphyxiation"),
                    SuicideKind.Bloodloss => prototypeManager.Index <DamageTypePrototype>("Bloodloss"),
                    _ => prototypeManager.Index <DamageTypePrototype>("Blunt")
                },