Beispiel #1
0
    private void MonitorSystem()
    {
        if (!livingHealthBehaviour.IsDead)
        {
            Vector3Int   position = objectBehaviour.AssumedLocation().RoundToInt();
            MetaDataNode node     = MatrixManager.GetMetaDataAt(position);
            PressureStatus = CheckPressureStatus(node.GasMix.Pressure);
            TempStatus     = CheckTempStatus(node.GasMix.Temperature);
            if (!IsEVACompatible())
            {
                CheckPressureDamage(node.GasMix.Pressure);
            }

            if (livingHealthBehaviour.OverallHealth >= HealthThreshold.SoftCrit)
            {
                if (Breathe(node))
                {
                    AtmosManager.Update(node);
                }
            }
            else
            {
                bloodSystem.OxygenDamage += 1;
            }
        }
    }
    private void MonitorSystem()
    {
        if (!livingHealthBehaviour.IsDead)
        {
            Vector3Int   position = objectBehaviour.AssumedWorldPositionServer();
            MetaDataNode node     = MatrixManager.GetMetaDataAt(position);

            if (!IsEVACompatible())
            {
                temperature = node.GasMix.Temperature;
                pressure    = node.GasMix.Pressure;
                CheckPressureDamage();
            }
            else
            {
                pressure    = 101.325f;
                temperature = 293.15f;
            }

            if (livingHealthBehaviour.OverallHealth >= HealthThreshold.SoftCrit)
            {
                if (Breathe(node))
                {
                    AtmosManager.Update(node);
                }
            }
            else
            {
                bloodSystem.OxygenDamage += 1;
            }
        }
    }
Beispiel #3
0
    public override void ImplantPeriodicUpdate()
    {
        base.ImplantPeriodicUpdate();

        Vector3Int   position = healthMaster.ObjectBehaviour.AssumedWorldPositionServer();
        MetaDataNode node     = MatrixManager.GetMetaDataAt(position);

        if (TryBreathing(node, TotalModified))
        {
            AtmosManager.Update(node);
        }
    }
    private void MonitorSystem()
    {
        if (!livingHealthBehaviour.IsDead)
        {
            Vector3Int   position = transform.position.RoundToInt();
            MetaDataNode node     = MatrixManager.GetMetaDataAt(position);

            if (!IsEVACompatible())
            {
                CheckPressureDamage(node.GasMix.Pressure);
            }

            if (Breathe(node))
            {
                AtmosManager.Update(node);
            }
        }
    }
Beispiel #5
0
    public override void ImplantPeriodicUpdate()
    {
        base.ImplantPeriodicUpdate();

        Vector3Int   position = RelatedPart.HealthMaster.ObjectBehaviour.AssumedWorldPositionServer();
        MetaDataNode node     = MatrixManager.GetMetaDataAt(position);


        var TotalModified = 1f;

        foreach (var Modifier in RelatedPart.AppliedModifiers)
        {
            var toMultiply = 1f;
            if (Modifier == RelatedPart.DamageModifier)
            {
                toMultiply = Mathf.Max(0f, Mathf.Max(RelatedPart.MaxHealth - RelatedPart.TotalDamageWithoutOxyCloneRadStam, 0) / RelatedPart.MaxHealth);
            }
            else if (Modifier == RelatedPart.HungerModifier)
            {
                continue;
            }
            else
            {
                toMultiply = Mathf.Max(0f, Modifier.Multiplier);
            }
            TotalModified *= toMultiply;
        }


        if (TryBreathing(node, TotalModified))
        {
            AtmosManager.Update(node);
        }

        if (RelatedPart.IsBleedingInternally)
        {
            InternalDamageLogic();
        }
    }