From cc5df62c890e19eadeccdec90402052311c2769b Mon Sep 17 00:00:00 2001 From: safronov Date: Sun, 25 Jul 2021 12:14:19 +0300 Subject: [PATCH] Fix void entity energy --- YAFCparser/Data/FactorioDataDeserializer_Entity.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/YAFCparser/Data/FactorioDataDeserializer_Entity.cs b/YAFCparser/Data/FactorioDataDeserializer_Entity.cs index 5b508147..c9e6d83a 100644 --- a/YAFCparser/Data/FactorioDataDeserializer_Entity.cs +++ b/YAFCparser/Data/FactorioDataDeserializer_Entity.cs @@ -64,7 +64,10 @@ private void ReadEnergySource(LuaTable energySource, Entity entity) { energySource.Get("type", out string type, "burner"); if (type == "void") + { entity.energy = voidEntityEnergy; + return; + } var energy = new EntityEnergy(); entity.energy = energy; energy.emissions = energySource.Get("emissions_per_minute", 0f);