Пример #1
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ResearchItemAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(Resource1Cost, () => wrapper.Resource1Cost);
            loader.ApplyPMultPatch(Resource1CostMult, () => wrapper.Resource1Cost);

            loader.ApplyPPatch(Resource2Cost, () => wrapper.Resource2Cost);
            loader.ApplyPMultPatch(Resource2CostMult, () => wrapper.Resource2Cost);

            loader.ApplyPPatch(ResearchTime, () => wrapper.ResearchTime, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(ResearchTimeMult, () => wrapper.ResearchTime);

            loader.ApplyPPatch(TypeOfResearch, () => wrapper.TypeOfResearch);
            loader.ApplyPPatch(IconSpriteName, () => wrapper.IconSpriteName);
            loader.ApplyPPatch(LocalizedResearchTitleStringID, () => wrapper.LocalizedResearchTitleStringID);
            loader.ApplyPPatch(LocalizedShortDescriptionStringID, () => wrapper.LocalizedShortDescriptionStringID);
            loader.ApplyPPatch(LocalizedLongDescriptionStringID, () => wrapper.LocalizedLongDescriptionStringID);
            loader.ApplyPPatch(Dependencies, () => wrapper.Dependencies);
            loader.ApplyPPatch(ResearchVOCode, () => wrapper.ResearchVOCode);

            if (UnitTypeBuffs != null)
            {
                var l = wrapper.UnitTypeBuffs?.Select(x => new UnitTypeBuffWrapper(x)).ToList() ?? new List <UnitTypeBuffWrapper>();
                loader.ApplyLPatch(UnitTypeBuffs, l, () => new UnitTypeBuffWrapper(), nameof(UnitTypeBuff));
                wrapper.UnitTypeBuffs = l.Where(x => x != null).ToArray();
            }
        }
Пример #2
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ProjectileAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(DetonationDelay, () => wrapper.DetonationDelay, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(DetonationDelayMult, () => wrapper.DetonationDelay);

            loader.ApplyPPatch(MissStageIndex, () => wrapper.MissStageIndex);
            loader.ApplyPMultPatch(MissStageIndexMult, () => wrapper.MissStageIndex);

            loader.ApplyPPatch(MinimumMissDistance, () => wrapper.MinimumMissDistance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(MinimumMissDistanceMult, () => wrapper.MinimumMissDistance);

            loader.ApplyPPatch(MaximumMissDistance, () => wrapper.MaximumMissDistance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(MaximumMissDistanceMult, () => wrapper.MaximumMissDistance);

            loader.ApplyPPatch(ProjectileType, () => wrapper.ProjectileType);

            if (Stages.Count > 0)
            {
                var l = wrapper.Stages?.Select(x => new ProjectileMotionStageWrapper(x)).ToList() ?? new List <ProjectileMotionStageWrapper>();
                loader.ApplyLPatch(Stages, l, () => new ProjectileMotionStageWrapper(), nameof(ProjectileMotionStage));
                wrapper.Stages = l.ToArray();
            }
        }
Пример #3
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is UnitHangarAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(AlignmentTime, () => w.AlignmentTime, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(AlignmentTimeMult, () => w.AlignmentTime);

            loader.ApplyPPatch(ApproachTime, () => w.ApproachTime, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(ApproachTimeMult, () => w.ApproachTime);

            for (var i = 0; i < w.HangarBays.Length; i++)
            {
                var hangarBay = w.HangarBays[i];
                if (HangarBays.TryGetValue(hangarBay.Name, out HangarBayPatch hangarBayPatch))
                {
                    using (loader.logger.BeginScope($"HangarBay: {hangarBay.Name}"))
                    {
                        var hangarBayWrapper = new HangarBayWrapper(hangarBay);
                        hangarBayPatch.Apply(loader, hangarBayWrapper, null);
                        w.HangarBays[i] = hangarBayWrapper;
                    }
                }
            }
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is PowerSystemAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(StartingPowerLevelIndex, () => wrapper.StartingPowerLevelIndex);
            loader.ApplyPMultPatch(StartingPowerLevelIndexMult, () => wrapper.StartingPowerLevelIndex);

            loader.ApplyPPatch(StartingMaxPowerLevelIndex, () => wrapper.StartingMaxPowerLevelIndex);
            loader.ApplyPMultPatch(StartingMaxPowerLevelIndexMult, () => wrapper.StartingMaxPowerLevelIndex);

            loader.ApplyPPatch(PowerSystemType, () => wrapper.PowerSystemType);

            {
                var l = wrapper.PowerLevels?.Select(x => new PowerLevelAttributesWrapper(x)).ToList() ?? new List <PowerLevelAttributesWrapper>();
                loader.ApplyLPatch(PowerLevels, l, () => new PowerLevelAttributesWrapper(), "PowerLevels");
                wrapper.PowerLevels = l.ToArray();
            }

            if (View != null)
            {
                PowerSystemViewAttributesWrapper powerSystemViewAttributesWrapper = new PowerSystemViewAttributesWrapper(wrapper.View);
                View.Apply(loader, powerSystemViewAttributesWrapper, null);
                wrapper.View = powerSystemViewAttributesWrapper;
            }
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is PowerLevelAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(PowerUnitsRequired, () => wrapper.PowerUnitsRequired);
            loader.ApplyPMultPatch(PowerUnitsRequiredMult, () => wrapper.PowerUnitsRequired);

            loader.ApplyPPatch(HeatPointsProvided, () => wrapper.HeatPointsProvided);
            loader.ApplyPMultPatch(HeatPointsProvidedMult, () => wrapper.HeatPointsProvided);

            var statusEffects = wrapper.StatusEffectsToApply?.Select(x => new StatusEffectAttributesWrapper(x)).ToList() ?? new List <StatusEffectAttributesWrapper>();

            loader.ApplyNamedLPatch(StatusEffectsToApply, statusEffects, (x) => new StatusEffectAttributesWrapper(x), "StatusEffectsToApply");
            wrapper.StatusEffectsToApply = statusEffects.ToArray();

            if (LocalizedShortDescriptionStringID != null)
            {
                PowerLevelViewAttributesWrapper powerLevelViewAttributesWrapper = new PowerLevelViewAttributesWrapper(wrapper.View);
                loader.ApplyPPatch(LocalizedShortDescriptionStringID, () => powerLevelViewAttributesWrapper.LocalizedShortDescriptionStringID);
                wrapper.View = powerLevelViewAttributesWrapper;
            }
        }
Пример #6
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is HarvesterAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(SalvageDistance, () => w.SalvageDistance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(SalvageDistanceMult, () => w.SalvageDistance);

            loader.ApplyPPatch(MaxDropOffRange, () => w.MaxDropOffRange, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(MaxDropOffRangeMult, () => w.MaxDropOffRange);

            loader.ApplyPPatch(ClosestResourceControllerHysteresisDistance, () => w.ClosestResourceControllerHysteresisDistance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(ClosestResourceControllerHysteresisDistanceMult, () => w.ClosestResourceControllerHysteresisDistance);

            loader.ApplyPPatch(AutoReturnToDepositOnArtifactPickup, () => w.AutoReturnToDepositOnArtifactPickup);

            if (SalvageCycles != null)
            {
                var l = w.SalvageCycles?.Select(x => new SalvageCycleWrapper(x)).ToList() ?? new List <SalvageCycleWrapper>();
                loader.ApplyLPatch(SalvageCycles, l, () => new SalvageCycleWrapper(), nameof(SalvageCycle));
                w.SalvageCycles = l.ToArray();
            }
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is AutoToggleOffConditionsAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(ManeuveringConditions, () => w.ManeuveringConditions);
            loader.ApplyPPatch(TakeDamage, () => w.TakeDamage);
        }
Пример #8
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is TechTreeTierWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(ResearchItems, () => w.ResearchItems);
            loader.ApplyPPatch(TierName, () => w.TierName);
        }
Пример #9
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is TargetHighlightingAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(HighlightWrecks, () => w.HighlightWrecks);
            loader.ApplyPPatch(HighlightArtifacts, () => w.HighlightArtifacts);
        }
Пример #10
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ProduceUnitAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(UnitTypeToProduce, () => w.UnitTypeToProduce);
            loader.ApplyPPatch(BypassQueue, () => w.BypassQueue);
        }
Пример #11
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is AutocastAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(IsAutocastable, () => w.IsAutocastable);
            loader.ApplyPPatch(AutocastEnabledOnSpawn, () => w.AutocastEnabledOnSpawn);
        }
Пример #12
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is UseWeaponAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(WeaponID, () => w.WeaponID);
            loader.ApplyPPatch(ClearGoalsOnUse, () => w.ClearGoalsOnUse);
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is TargetPriorizationAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(WeaponEffectivenessWeight, () => wrapper.WeaponEffectivenessWeight, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(WeaponEffectivenessWeightMult, () => wrapper.WeaponEffectivenessWeight);

            loader.ApplyPPatch(TargetThreatWeight, () => wrapper.TargetThreatWeight, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(TargetThreatWeightMult, () => wrapper.TargetThreatWeight);

            loader.ApplyPPatch(DistanceWeight, () => wrapper.DistanceWeight, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(DistanceWeightMult, () => wrapper.DistanceWeight);

            loader.ApplyPPatch(AngleWeight, () => wrapper.AngleWeight, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(AngleWeightMult, () => wrapper.AngleWeight);

            loader.ApplyPPatch(TargetPriorityWeight, () => wrapper.TargetPriorityWeight, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(TargetPriorityWeightMult, () => wrapper.TargetPriorityWeight);

            loader.ApplyPPatch(AutoTargetStickyBias, () => wrapper.AutoTargetStickyBias, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(AutoTargetStickyBiasMult, () => wrapper.AutoTargetStickyBias);

            loader.ApplyPPatch(ManualTargetStickyBias, () => wrapper.ManualTargetStickyBias, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(ManualTargetStickyBiasMult, () => wrapper.ManualTargetStickyBias);

            loader.ApplyPPatch(TargetSameCommanderBias, () => wrapper.TargetSameCommanderBias, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(TargetSameCommanderBiasMult, () => wrapper.TargetSameCommanderBias);

            loader.ApplyPPatch(TargetWithinFOVBias, () => wrapper.TargetWithinFOVBias, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(TargetWithinFOVBiasMult, () => wrapper.TargetWithinFOVBias);
        }
Пример #14
0
		protected override void Apply(AttributeLoader loader, object wrapperObj)
		{
			if (!(wrapperObj is ActivationDependenciesAttributesWrapper w))
				throw new System.InvalidCastException();

			loader.ApplyPPatch(TakeNoDamageForMS, () => w.TakeNoDamageForMS);
			loader.ApplyPMultPatch(TakeNoDamageForMSMult, () => w.TakeNoDamageForMS);

			loader.ApplyPPatch(ManeuveringDependencies, () => w.ManeuveringDependencies);
			loader.ApplyPPatch(CommanderHasUnitWithTargetables, () => w.CommanderHasUnitWithTargetables);
		}
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is EntityTypeToSpawnAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(SpawnRotationOffsetDegrees, () => wrapper.SpawnRotationOffsetDegrees, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(SpawnRotationOffsetDegreesMult, () => wrapper.SpawnRotationOffsetDegrees);

            loader.ApplyPPatch(EntityTypeToSpawn, () => wrapper.EntityTypeToSpawn);
        }
Пример #16
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ChargeAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(ChargesPerUse, () => w.ChargesPerUse);
            loader.ApplyPMultPatch(ChargesPerUseMult, () => w.ChargesPerUse);

            loader.ApplyPPatch(InventoryID, () => w.InventoryID);
        }
Пример #17
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ModifyInventoryAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(Delta, () => w.Delta);
            loader.ApplyPMultPatch(DeltaMult, () => w.Delta);

            loader.ApplyPPatch(InventoryID, () => w.InventoryID);
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is UnitAvoidanceAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(AvoidanceDistance, () => w.AvoidanceDistance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(AvoidanceDistanceMult, () => w.AvoidanceDistance);

            loader.ApplyPPatch(AvoidsCarriers, () => w.AvoidsCarriers);
            loader.ApplyPPatch(AvoidsWrecks, () => w.AvoidsWrecks);
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is SelfDestructAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(DurationSeconds, () => w.DurationSeconds, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(DurationSecondsMult, () => w.DurationSeconds);

            loader.ApplyPPatch(WeaponID, () => w.WeaponID);
            loader.ApplyPPatch(Lifetime, () => w.Lifetime);
            loader.ApplyPPatch(TimeoutType, () => w.TimeoutType);
        }
Пример #20
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ChainCastingAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(QueuedAbilityDelay, () => w.QueuedAbilityDelay, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(QueuedAbilityDelayMult, () => w.QueuedAbilityDelay);

            loader.ApplyPPatch(QueuedAbility, () => w.QueuedAbility);
            loader.ApplyPPatch(RetryQueueIfAbilityFails, () => w.RetryQueueIfAbilityFails);
            loader.ApplyPPatch(AbilityOnToggledOff, () => w.AbilityOnToggledOff);
        }
Пример #21
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is WeaponModifierInfoWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(Amount, () => wrapper.Amount);
            loader.ApplyPMultPatch(AmountMult, () => wrapper.Amount);

            loader.ApplyPPatch(TargetClass, () => wrapper.TargetClass);
            loader.ApplyPPatch(ClassOperator, () => wrapper.ClassOperator);
            loader.ApplyPPatch(Modifier, () => wrapper.Modifier);
        }
Пример #22
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ResourceAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(StartingAmount, () => wrapper.StartingAmount);
            loader.ApplyPMultPatch(StartingAmountMult, () => wrapper.StartingAmount);

            loader.ApplyPPatch(MaxHarvesters, () => wrapper.MaxHarvesters);
            loader.ApplyPMultPatch(MaxHarvestersMult, () => wrapper.MaxHarvesters);

            loader.ApplyPPatch(ResourceType, () => wrapper.ResourceType);
        }
Пример #23
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is AttributeBuffWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(Value, () => wrapper.Value);
            loader.ApplyPMultPatch(ValueMult, () => wrapper.Value);

            loader.ApplyPPatch(Name, () => wrapper.Name);
            loader.ApplyPPatch(Attribute, () => wrapper.AttributeID, Buff.AttributeIDFromBuffCategoryAndID);
            loader.ApplyPPatch(Attribute, () => wrapper.Category, Buff.CategoryFromBuffCategoryAndID);
            loader.ApplyPPatch(Mode, () => wrapper.Mode);
        }
Пример #24
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is InventoryAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(Capacity, () => wrapper.Capacity);
            loader.ApplyPMultPatch(CapacityMult, () => wrapper.Capacity);

            loader.ApplyPPatch(StartingAmount, () => wrapper.StartingAmount);
            loader.ApplyPMultPatch(StartingAmountMult, () => wrapper.StartingAmount);

            loader.ApplyPPatch(HasUnlimitedCapacity, () => wrapper.HasUnlimitedCapacity);
        }
Пример #25
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is AirSortieAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(LoiterLength, () => w.LoiterLength, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(LoiterLengthMult, () => w.LoiterLength);

            loader.ApplyPPatch(SetAttackTargetsWithinRadius, () => w.SetAttackTargetsWithinRadius, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(SetAttackTargetsWithinRadiusMult, () => w.SetAttackTargetsWithinRadius);

            loader.ApplyPPatch(SortieSquadSize, () => w.SortieSquadSize);
            loader.ApplyPMultPatch(SortieSquadSizeMult, () => w.SortieSquadSize);
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is RangeBasedWeaponAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(Accuracy, () => wrapper.Accuracy, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(AccuracyMult, () => wrapper.Accuracy);

            loader.ApplyPPatch(Distance, () => wrapper.Distance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(DistanceMult, () => wrapper.Distance);

            loader.ApplyPPatch(MinDistance, () => wrapper.MinDistance, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(MinDistanceMult, () => wrapper.MinDistance);
        }
Пример #27
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is TurretAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(FieldOfFire, () => wrapper.FieldOfFire, x => Fixed64.UnsafeFromDouble(x));
            loader.ApplyPMultPatch(FieldOfFireMult, () => wrapper.FieldOfFire);

            loader.ApplyPPatch(FieldOfView, () => wrapper.FieldOfView, x => Fixed64.UnsafeFromDouble(x));
            loader.ApplyPMultPatch(FieldOfViewMult, () => wrapper.FieldOfView);

            loader.ApplyPPatch(RotationSpeed, () => wrapper.RotationSpeed, x => Fixed64.UnsafeFromDouble(x));
            loader.ApplyPMultPatch(RotationSpeedMult, () => wrapper.RotationSpeed);
        }
Пример #28
0
        protected override void Apply(AttributeLoader loader, object wrapperObjj)
        {
            if (!(wrapperObjj is RelicAttributesWrapper wrapper))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(CollectibleType, () => wrapper.CollectibleType);
            loader.ApplyPPatch(DetonationWeaponTypeID, () => wrapper.DetonationWeaponTypeID);

            {
                var l = new AttributeBuffSetWrapper(wrapper.BuffsWhileHolding);
                loader.ApplyLPatch(BuffsWhileHolding, l.Buffs, () => new AttributeBuffWrapper(), nameof(AttributeBuff));
                wrapper.BuffsWhileHolding = l;
            }
        }
Пример #29
0
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is SalvageAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(TargetedSearchRange, () => w.TargetedSearchRange, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(TargetedSearchRangeMult, () => w.TargetedSearchRange);

            loader.ApplyPPatch(TargetType, () => w.TargetType);
            loader.ApplyArrayPropertyPatch(ExcludedResourceTargetTypes, w, "ExcludedResourceTargetTypes");
            loader.ApplyPPatch(AllowSearchingForNextNode, () => w.AllowSearchingForNextNode);
            loader.ApplyPPatch(SearchRelativeToClosestResourceControllerOnDropOff, () => w.SearchRelativeToClosestResourceControllerOnDropOff);
            loader.ApplyPPatch(UseFallbackResourcing, () => w.UseFallbackResourcing);
            loader.ApplyArrayPropertyPatch(FallbackResourceTargetType, w, "FallbackResourceTargetType");
        }
        protected override void Apply(AttributeLoader loader, object wrapperObj)
        {
            if (!(wrapperObj is ManeuverRegionAttributesWrapper w))
            {
                throw new System.InvalidCastException();
            }

            loader.ApplyPPatch(HalfAngle, () => w.HalfAngle, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(HalfAngleMult, () => w.HalfAngle);

            loader.ApplyPPatch(MinRange, () => w.MinRange, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(MinRangeMult, () => w.MinRange);

            loader.ApplyPPatch(MaxRange, () => w.MaxRange, Fixed64.UnsafeFromDouble);
            loader.ApplyPMultPatch(MaxRangeMult, () => w.MaxRange);

            loader.ApplyPPatch(Direction, () => w.Direction);
        }