public override void UpdateAfterSimulation10() { if (MyAPIGateway.Session == null) { return; } if (MyAPIGateway.Utilities.IsDedicated && MyAPIGateway.Multiplayer.IsServer) { return; } if (IsWorking) { if (IsProducing) { m_block.SetEmissiveParts(EMISSIVE_MATERIAL_NAME, LIGHTBLUE, 1f); lastColor = LIGHTBLUE; } else { m_block.SetEmissiveParts(EMISSIVE_MATERIAL_NAME, GREEN, 1f); lastColor = GREEN; } } else { m_block.SetEmissiveParts(EMISSIVE_MATERIAL_NAME, RED, 1f); lastColor = RED; } }
private void OnStateChanged() { if (MyAPIGateway.Session == null) { return; } if (MyAPIGateway.Utilities.IsDedicated && MyAPIGateway.Multiplayer.IsServer) { return; } var color = IsWorking ? (IsProducing ? LIGHTBLUE : GREEN) : RED; m_block.SetEmissiveParts(EMISSIVE_MATERIAL_NAME, color, 1f); }