Example #1
0
 public override void OnAddedToContainer()
 {
     base.OnAddedToContainer();
     _resourceSink.OnAddedToContainer();
     if (Entity is IMyFunctionalBlock)
     {
         _operationalSink = AllocateSink(ConstantDefs.ElectricityId);
         _operationalSink.RequiredPower = _operationalSink.MaxPower = 50e-3f; // 50 W
     }
 }
Example #2
0
 public override void OnAddedToScene()
 {
     ThermalPhysics.OnAddedToContainer();
     Block.OnUpgradeValuesChanged += UpgradeValuesChanged;
     Block.AddUpgradeValue(UpgradeValueCooling, UpgradeValueCoolingDefault);
     Block.AddUpgradeValue(UpgradeValueEfficiency, UpgradeValueEfficiencyDefault);
     foreach (var k in Definition.LossyDummies)
     {
         if (k.HeatLoss > 0)
         {
             _handlers.Add(new DummyLossHandler(this, k));
         }
     }
     CommitCoolingPower();
 }
 public override void OnAddedToContainer()
 {
     base.OnAddedToContainer();
     ResourceSink.OnAddedToContainer();
 }