public override void FromContract(object o) { var c = (ActiveMedicalAgentsMonitorsContract)o; IsEpinephrineActive = c.IsEpinephrineActive; IsAntiVenomActive = c.IsAntiVenomActive; IsAtropineActive = c.IsAtropineActive; IsMorphineActive = c.IsMorphineActive; IsAntibioticActive = c.IsAntibioticActive; IsAspirinActive = c.IsAspirinActive; IsAcetaminophenActive = c.IsAcetaminophenActive; IsLoperamideActive = c.IsLoperamideActive; IsOseltamivirActive = c.IsOseltamivirActive; IsSedativeActive = c.IsSedativeActive; IsDoripenemActive = c.IsDoripenemActive; ChildStates.Clear(); ChildStates.Add("EpinephrineMedicalAgent", new ActiveMedicalAgentSnippet(c.EpinephrineMedicalAgent)); ChildStates.Add("AntiVenomMedicalAgent", new ActiveMedicalAgentSnippet(c.AntiVenomMedicalAgent)); ChildStates.Add("AtropineMedicalAgent", new ActiveMedicalAgentSnippet(c.AtropineMedicalAgent)); ChildStates.Add("MorphineMedicalAgent", new ActiveMedicalAgentSnippet(c.MorphineMedicalAgent)); ChildStates.Add("AntibioticMedicalAgent", new ActiveMedicalAgentSnippet(c.AntibioticMedicalAgent)); ChildStates.Add("AspirinMedicalAgent", new ActiveMedicalAgentSnippet(c.AspirinMedicalAgent)); ChildStates.Add("AcetaminophenMedicalAgent", new ActiveMedicalAgentSnippet(c.AcetaminophenMedicalAgent)); ChildStates.Add("LoperamideMedicalAgent", new ActiveMedicalAgentSnippet(c.LoperamideMedicalAgent)); ChildStates.Add("OseltamivirMedicalAgent", new ActiveMedicalAgentSnippet(c.OseltamivirMedicalAgent)); ChildStates.Add("SedativeMedicalAgent", new ActiveMedicalAgentSnippet(c.SedativeMedicalAgent)); ChildStates.Add("DoripenemMedicalAgent", new ActiveMedicalAgentSnippet(c.DoripenemMedicalAgent)); }
public override void FromContract(object o) { var c = (HealthStateStateContract)o; BloodPressureTop = c.BloodPressureTop; BloodPressureBottom = c.BloodPressureBottom; HeartRate = c.HeartRate; BloodPercentage = c.BloodPercentage; FoodPercentage = c.FoodPercentage; WaterPercentage = c.WaterPercentage; OxygenPercentage = c.OxygenPercentage; StaminaPercentage = c.StaminaPercentage; FatiguePercentage = c.FatiguePercentage; BodyTemperature = c.BodyTemperature; LastSleepTime = c.LastSleepTime.ToDateTime(); CheckTime = c.CheckTime.ToDateTime(); IsBloodLoss = c.IsBloodLoss; IsActiveInjury = c.IsActiveInjury; IsActiveDisease = c.IsActiveDisease; IsFoodDisgust = c.IsFoodDisgust; IsSleepDisorder = c.IsSleepDisorder; CannotRun = c.CannotRun; IsLegFracture = c.IsLegFracture; ActiveDiseasesWorstLevel = (DiseaseLevels)c.ActiveDiseasesWorstLevel; WorstDiseaseId = string.IsNullOrEmpty(c.WorstDiseaseId) ? (Guid?)null : Guid.Parse(c.WorstDiseaseId); ChildStates.Clear(); ChildStates.Add("ActiveDiseasesAndInjuries", new ActiveDiseasesAndInjuriesSnippet(c.ActiveDiseasesAndInjuries)); }
public override void FromContract(object o) { var c = (InjuryTreatmentContract)o; ToolsOnlyTreatments = c.ToolsOnlyTreatments.ToList().ConvertAll(x => new ToolsOnlyInjuryTreatmentSnippet(x)); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (FoodPoisoningMonitorContract)o; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (AnginaMonitorContract)o; NextCheckTime = c.NextCheckTime == null || c.NextCheckTime.IsEmpty ? (DateTime?)null : c.NextCheckTime.ToDateTime(); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (ActiveMedicalAgentContract)o; GameMinutesAgentIsActive = c.GameMinutesAgentIsActive; TimesTaken = c.TimesTaken.ToList().ConvertAll(x => x.ToDateTime()); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (ApplianceTimedTreatmentNodeContract)o; List = c.List.ToList().ConvertAll(x => new ApplianceTimedTreatmentSnippet(x)); IsOverallHealingStarted = c.IsOverallHealingStarted; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (FixedEventContract)o; IsHappened = c.IsHappened; AutoReset = c.AutoReset; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (ToolsOnlyInjuryTreatmentContract)o; LastToolTime = c.LastToolTime == null || c.LastToolTime.IsEmpty ? (DateTime?)null : c.LastToolTime.ToDateTime(); ToolsUsed = c.ToolsUsed; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (MedicalBodyApplianceContract)o; BodyPart = (Player.BodyParts)c.BodyPart; ItemId = Guid.Parse(c.ItemId); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (ActiveDiseasesAndInjuriesContract)o; ActiveDiseases = c.ActiveDiseases.ToList().ConvertAll(x => new ActiveDiseaseSnippet(x)); ActiveInjuries = c.ActiveInjuries.ToList().ConvertAll(x => new ActiveInjurySnippet(x)); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (InventoryItemContract)o; Id = Guid.Parse(c.Id); ItemType = Type.GetType(c.ItemType); Count = c.Count; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (FatigueHealthEffectsContract)o; BloodPressureTopBonus = c.BloodPressureTopBonus; BloodPressureBottomBonus = c.BloodPressureBottomBonus; HeartRateBonus = c.HeartRateBonus; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (WetnessControllerContract)o; IsWet = c.IsWet; LastGettingWetTime = c.LastGettingWetTime == null || c.LastGettingWetTime.IsEmpty ? (DateTime?)null : c.LastGettingWetTime.ToDateTime(); WetnessValue = c.WetnessValue; ChildStates.Clear(); }
private void OnCommandDestroy(State state) { var commandId = state.GetInstanceID(); var removeIndex = ChildStates.FindIndex(x => x.GetInstanceID().Equals(commandId)); if (removeIndex != -1) { ChildStates.RemoveAt(removeIndex); } }
public override void FromContract(object o) { var c = (HealthControllerStateContract)o; LastUpdateGameTime = c.LastUpdateGameTime.ToDateTime(); PreviousDiseaseVitalsChangeRate = c.PreviousDiseaseVitalsChangeRate; PreviousInjuryVitalsChangeRate = c.PreviousInjuryVitalsChangeRate; HealthCheckCooldownTimer = c.HealthCheckCooldownTimer; VitalsFluctuateEquilibrium = c.VitalsFluctuateEquilibrium; VilalsFluctuateCheckCounter = c.VilalsFluctuateCheckCounter; IsHighPressureEventTriggered = c.IsHighPressureEventTriggered; ActualFatigueValue = c.ActualFatigueValue; UnconsciousMode = c.UnconsciousMode; ChildStates.Clear(); ChildStates.Add("HealthState", new HealthStateSnippet(c.Status)); ChildStates.Add("DiseaseDizzinessEvent", new EventByChanceSnippet(c.DiseaseDizzinessEvent)); ChildStates.Add("DiseaseBlackoutsEvent", new EventByChanceSnippet(c.DiseaseBlackoutsEvent)); ChildStates.Add("DiseaseDeathEvent", new EventByChanceSnippet(c.DiseaseDeathEvent)); ChildStates.Add("SneezeEvent", new EventByChanceSnippet(c.SneezeEvent)); ChildStates.Add("CoughEvent", new EventByChanceSnippet(c.CoughEvent)); ChildStates.Add("BloodLevelDizzinessEvent", new EventByChanceSnippet(c.BloodLevelDizzinessEvent)); ChildStates.Add("BloodLevelBlackoutsEvent", new EventByChanceSnippet(c.BloodLevelBlackoutsEvent)); ChildStates.Add("LowBodyTemperatureDizzinessEvent", new EventByChanceSnippet(c.LowBodyTemperatureDizzinessEvent)); ChildStates.Add("LowBodyTemperatureBlackoutsEvent", new EventByChanceSnippet(c.LowBodyTemperatureBlackoutsEvent)); ChildStates.Add("BloodLevelDeathEvent", new EventByChanceSnippet(c.BloodLevelDeathEvent)); ChildStates.Add("DehydrationDeathEvent", new EventByChanceSnippet(c.DehydrationDeathEvent)); ChildStates.Add("StarvationDeathEvent", new EventByChanceSnippet(c.StarvationDeathEvent)); ChildStates.Add("VitalsDeathEvent", new EventByChanceSnippet(c.VitalsDeathEvent)); ChildStates.Add("OverdoseDeathEvent", new EventByChanceSnippet(c.OverdoseDeathEvent)); ChildStates.Add("HeartFailureDeathEvent", new EventByChanceSnippet(c.HeartFailureDeathEvent)); ChildStates.Add("LsdEffect", new EventByChanceSnippet(c.LsdEffect)); ChildStates.Add("FatigueDizzinessEvent", new EventByChanceSnippet(c.FatigueDizzinessEvent)); ChildStates.Add("FatigueBlackoutsEvent", new EventByChanceSnippet(c.FatigueBlackoutsEvent)); ChildStates.Add("FatigueSleepEvent", new EventByChanceSnippet(c.FatigueSleepEvent)); ChildStates.Add("SedativeSleepEvent", new EventByChanceSnippet(c.SedativeSleepEvent)); ChildStates.Add("HighPressureEvent", new FixedEventSnippet(c.HighPressureEvent)); ChildStates.Add("NormalPressureEvent", new FixedEventSnippet(c.NormalPressureEvent)); ChildStates.Add("DrowningEvent", new FixedEventSnippet(c.DrowningEvent)); ChildStates.Add("UnderwaterHealthEffects", new UnderwaterHealthEffectsSnippet(c.UnderwaterHealthEffects)); ChildStates.Add("RunningHealthEffects", new RunningHealthEffectsSnippet(c.RunningHealthEffects)); ChildStates.Add("FatigueHealthEffects", new FatigueHealthEffectsSnippet(c.FatigueHealthEffects)); ChildStates.Add("InventoryHealthEffects", new InventoryHealthEffectsSnippet(c.InventoryHealthEffects)); ChildStates.Add("MedicalAgentsHealthEffects", new MedicalAgentsHealthEffectsSnippet(c.MedicalAgentsHealthEffects)); ChildStates.Add("ConsumablesHealthEffects", new ConsumablesHealthEffectsSnippet(c.ConsumablesHealthEffects)); ChildStates.Add("ClothesHealthEffects", new ClothesHealthEffectsSnippet(c.ClothesHealthEffects)); ChildStates.Add("DiseaseMonitors", new DiseaseMonitorsSnippet(c.DiseaseMonitors)); ChildStates.Add("ActiveMedicalAgentsMonitors", new ActiveMedicalAgentsMonitorsSnippet(c.ActiveMedicalAgentsMonitors)); }
public override void FromContract(object o) { var c = (EventByChanceContract)o; ChanceOfHappening = c.ChanceOfHappening; CoundownTimer = c.CoundownTimer; IsHappened = c.IsHappened; AutoReset = c.AutoReset; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (MedicalAgentsHealthEffectsContract)o; BloodPressureTopBonus = c.BloodPressureTopBonus; BloodPressureBottomBonus = c.BloodPressureBottomBonus; HeartRateBonus = c.HeartRateBonus; BodyTemperatureBonus = c.BodyTemperatureBonus; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (DiseaseTreatmentContract)o; ApplianceTimedTreatments = c.ApplianceTimedTreatments.ToList().ConvertAll(x => new ApplianceTimedTreatmentSnippet(x)); ApplianceTimedTreatmentNodes = c.ApplianceTimedTreatmentNodes.ToList().ConvertAll(x => new ApplianceTimedTreatmentNodeSnippet(x)); ConsumableTimedTreatments = c.ConsumableTimedTreatments.ToList().ConvertAll(x => new ConsumableTimedTreatmentSnippet(x)); ConsumableTimedTreatmentNodes = c.ConsumableTimedTreatmentNodes.ToList().ConvertAll(x => new ConsumableTimedTreatmentNodeSnippet(x)); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (InventoryControllerStateContract)o; RoughWeight = c.RoughWeight; GenericInventoryItems = c.GenericInventoryItems.ToList().ConvertAll(x => new InventoryItemSnippet(x)); FoodInventoryItems = c.FoodInventoryItems.ToList().ConvertAll(x => new InventoryFoodItemSnippet(x)); WaterInventoryItems = c.WaterInventoryItems.ToList().ConvertAll(x => new InventoryWaterVesselItemSnippet(x)); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (DiseaseMonitorsContract)o; ChildStates.Clear(); ChildStates.Add("AnginaMonitor", new AnginaMonitorSnippet(c.AnginaMonitor)); ChildStates.Add("FluMonitor", new FluMonitorSnippet(c.FluMonitor)); ChildStates.Add("HyperthermiaMonitor", new HyperthermiaMonitorSnippet(c.HyperthermiaMonitor)); ChildStates.Add("HypothermiaMonitor", new HypothermiaMonitorSnippet(c.HypothermiaMonitor)); ChildStates.Add("FoodPoisoningMonitor", new FoodPoisoningMonitorSnippet(c.FoodPoisoningMonitor)); }
public override void FromContract(object o) { var c = (HypothermiaMonitorContract)o; NextCheckTime = (c.NextCheckTime == null || c.NextCheckTime.IsEmpty) ? (DateTime?)null : c.NextCheckTime.ToDateTime(); IsDiseaseActivated = c.IsDiseaseActivated; CurrentHypothermiaWarmthLevelThreshold = c.CurrentHypothermiaWarmthLevelThreshold; ChildStates.Clear(); ChildStates.Add("HypothermiaDeathEvent", new EventByChanceSnippet(c.HypothermiaDeathEvent)); }
public override void FromContract(object o) { var c = (FoodItemContract)o; Id = Guid.Parse(c.Id); ItemType = Type.GetType(c.ItemType); Count = c.Count; IsSpoiled = c.IsSpoiled; FoodItemsGatheringInfo = c.FoodItemsGatheringInfo.ToList().ConvertAll(x => new Tuple <DateTime, int>(x.TimeGathered.ToDateTime(), x.Count)); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (InventoryHealthEffectsContract)o; PlayerWalkSpeedBonus = c.PlayerWalkSpeedBonus; PlayerRunSpeedBonus = c.PlayerRunSpeedBonus; PlayerCrouchSpeedBonus = c.PlayerCrouchSpeedBonus; IsFreezed = c.IsFreezed; ChildStates.Clear(); ChildStates.Add("FreezedByInventoryOverloadEvent", new FixedEventSnippet(c.FreezedByInventoryOverloadEvent)); }
public override void FromContract(object o) { var c = (ApplianceTimedTreatmentContract)o; IsNodePart = c.IsNodePart; IsFailed = c.IsFailed; ConsumedTimes = c.ConsumedTimes.ToList().ConvertAll(x => x.ToDateTime()); InTimeConsumedCount = c.InTimeConsumedCount; IsFinished = c.IsFinished; IsStarted = c.IsStarted; ChildStates.Clear(); }
public override void FromContract(object o) { var c = (ChangedVitalsInfoContract)o; Level = (DiseaseLevels)c.Level; InitialHeartRate = c.InitialHeartRate; InitialBloodPressureTop = c.InitialBloodPressureTop; InitialBloodPressureBottom = c.InitialBloodPressureBottom; InitialBodyTemperature = c.InitialBodyTemperature; InitialStageDuration = c.InitialStageDuration.IsEmpty ? default(TimeSpan) : c.InitialStageDuration.ToTimeSpan(); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (UnderwaterHealthEffectsContract)o; BloodPressureTopBonus = c.BloodPressureTopBonus; BloodPressureBottomBonus = c.BloodPressureBottomBonus; HeartRateBonus = c.HeartRateBonus; OxygenLevelBonus = c.OxygenLevelBonus; LastUnderWaterState = c.LastUnderWaterState; GameTimeGotUnderwater = c.GameTimeGotUnderwater == null || c.GameTimeGotUnderwater.IsEmpty ? (DateTime?)null : c.GameTimeGotUnderwater.ToDateTime(); ChildStates.Clear(); ChildStates.Add("DrowningDeathEvent", new FixedEventSnippet(c.DrowningDeathEvent)); }
public override void FromContract(object o) { var c = (WaterVesselItemContract)o; Id = Guid.Parse(c.Id); ItemType = Type.GetType(c.ItemType); Count = c.Count; DosesLeft = c.DosesLeft; IsSafe = c.IsSafe; LastFillTime = c.LastFillTime == null || c.LastFillTime.IsEmpty ? (DateTime?)null : c.LastFillTime.ToDateTime(); LastDisinfectTime = c.LastDisinfectTime == null || c.LastDisinfectTime.IsEmpty ? (DateTime?)null : c.LastDisinfectTime.ToDateTime(); LastBoilTime = c.LastBoilTime == null || c.LastBoilTime.IsEmpty ? (DateTime?)null : c.LastBoilTime.ToDateTime(); ChildStates.Clear(); }
public override void FromContract(object o) { var c = (RunningHealthEffectsContract)o; BloodPressureTopBonus = c.BloodPressureTopBonus; BloodPressureBottomBonus = c.BloodPressureBottomBonus; HeartRateBonus = c.HeartRateBonus; OxygenLevelBonus = c.OxygenLevelBonus; BodyTemperatureBonus = c.BodyTemperatureBonus; GameSecondsInRunningState = c.GameSecondsInRunningState; IsWheezeEventTriggered = c.IsWheezeEventTriggered; ChildStates.Clear(); ChildStates.Add("IntenseRunningOnEvent", new FixedEventSnippet(c.IntenseRunningOnEvent)); ChildStates.Add("IntenseRunningOffEvent", new FixedEventSnippet(c.IntenseRunningOffEvent)); }
public override void FromContract(object o) { var c = (ClothesHealthEffectsContract)o; LastClothesChangeTime = c.LastClothesChangeTime == null || c.LastClothesChangeTime.IsEmpty ? (DateTime?)null : c.LastClothesChangeTime.ToDateTime(); LastAutoReLerpTime = c.LastAutoReLerpTime == null || c.LastAutoReLerpTime.IsEmpty ? (DateTime?)null : c.LastAutoReLerpTime.ToDateTime(); TargetBodyTemperatureDelta = c.TargetBodyTemperatureDelta; TargetHeartRateDelta = c.TargetHeartRateDelta; CurrentTemperatureBonus = c.CurrentTemperatureBonus; CurrentHeartRateBonus = c.CurrentHeartRateBonus; PlayerRunSpeedBonus = c.PlayerRunSpeedBonus; HeartRateBonus = c.HeartRateBonus; BodyTemperatureBonus = c.BodyTemperatureBonus; StaminaBonus = c.StaminaBonus; ChildStates.Clear(); }