Revert "Refactor Damage to use Protoypes (#4262)"

This reverts commit 20bf5739a9.
This commit is contained in:
Silver
2021-08-24 00:50:39 -06:00
committed by Silver
parent 20bf5739a9
commit e708091518
121 changed files with 711 additions and 10237 deletions

View File

@@ -17,7 +17,6 @@ using Robust.Shared.Enums;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Prototypes;
namespace Content.Server.Chat.Commands
{
@@ -35,11 +34,8 @@ namespace Content.Server.Chat.Commands
var kind = suicide.Suicide(target, chat);
if (kind != SuicideKind.Special)
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
damageableComponent.TrySetDamage(kind switch
damageableComponent.SetDamage(kind switch
{
<<<<<<< HEAD
<<<<<<< refs/remotes/origin/master
SuicideKind.Blunt => DamageType.Blunt,
SuicideKind.Slash => DamageType.Slash,
SuicideKind.Piercing => DamageType.Piercing,
@@ -51,26 +47,8 @@ namespace Content.Server.Chat.Commands
SuicideKind.Asphyxiation => DamageType.Asphyxiation,
SuicideKind.Bloodloss => DamageType.Bloodloss,
_ => DamageType.Blunt
=======
=======
>>>>>>> refactor-damageablecomponent
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")
<<<<<<< HEAD
>>>>>>> Refactor damageablecomponent update (#4406)
=======
>>>>>>> refactor-damageablecomponent
},
200);
200, source);
}
}
@@ -139,15 +117,7 @@ namespace Content.Server.Chat.Commands
var selfMessage = Loc.GetString("suicide-command-default-text-self");
owner.PopupMessage(selfMessage);
<<<<<<< HEAD
<<<<<<< refs/remotes/origin/master
dmgComponent.SetDamage(DamageType.Piercing, 200, owner);
=======
dmgComponent.TrySetDamage(IoCManager.Resolve<IPrototypeManager>().Index<DamageTypePrototype>("Piercing"), 200);
>>>>>>> Refactor damageablecomponent update (#4406)
=======
dmgComponent.TrySetDamage(IoCManager.Resolve<IPrototypeManager>().Index<DamageTypePrototype>("Piercing"), 200);
>>>>>>> refactor-damageablecomponent
// Prevent the player from returning to the body.
// Note that mind cannot be null because otherwise owner would be null.