From ca57749a3b6ecd33e021650b961b6fac89928a9f Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 25 Jan 2020 20:39:39 +0100 Subject: [PATCH] Remove bad use of GetAssemblyByName. --- .../GameObjects/Components/Mobs/SpeciesComponent.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs b/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs index 9ebe0888c9..94f860ab9e 100644 --- a/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs +++ b/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs @@ -46,8 +46,7 @@ namespace Content.Server.GameObjects serializer.DataField(ref templatename, "Template", "Human"); - Type type = AppDomain.CurrentDomain.GetAssemblyByName("Content.Server") - .GetType("Content.Server.GameObjects." + templatename); + var type = typeof(SpeciesComponent).Assembly.GetType("Content.Server.GameObjects." + templatename); DamageTemplate = (DamageTemplates) Activator.CreateInstance(type); serializer.DataFieldCached(ref _heatResistance, "HeatResistance", 323); } @@ -102,7 +101,7 @@ namespace Content.Server.GameObjects { return CurrentDamageState.CanSpeak(); } - + bool IActionBlocker.CanDrop() { return CurrentDamageState.CanDrop();