Please add SledSolved

Hi, could you please add Sled to the plugin? I tried to add it but I get an error. I leave it to the professionals. Thx

Error while compiling: VehicleDecayProtection.cs(274,46): error CS1061: Type `Sled' does not contain a definition for `timeSinceLastUsed' and no extension method `timeSinceLastUsed' of type `Sled' could be found. Are you missing an assembly reference?

I'll look into it this week.

Omg thx, my pet will be happy.

I created a new branch on the GitHub repo called sled. You can download it now. I haven't tested it that much.

https://github.com/WheteThunger/VehicleDecayProtection/tree/sled

To conform to plugin guidelines, I'll need to make an Oxide patch to expose the DecayOverTime field, wait for the next Oxide update, then I can release the proper version on the site.

Thanks it works perfect.

Merged post

new VehicleInfo
                    {
                        VehicleType = "sled.xmas",
                        PrefabPaths = new string[] { "assets/prefabs/misc/xmas/sled/skins/sled.deployed.xmas.prefab" },
                        VehicleConfig = pluginConfig.Vehicles.Sled,
                        IsCorrectType = (entity) => entity is Sled,
                        GetTimeSinceLastUsed = (entity) => float.MinValue,
                        GetVanillaDecayMethod = (entity) => (Action)Delegate.CreateDelegate(typeof(Action), entity as Sled, _sledDecayOverTimeMethod),
                        DecayTick = (entity, vehicleInfo) =>
                        {
                            var sled = entity as Sled;

                            if (sled.AnyMounted()
                                || VehicleHasPermission(_pluginInstance, sled, vehicleInfo))
                                return;

                            var multiplier = GetLocationMultiplier(_pluginInstance, sled, vehicleInfo);
                            if (multiplier == 0f)
                                return;

                            DoDecayDamage(sled, vehicleInfo, multiplier * sled.DecayAmount / sled.MaxHealth(), DamageType.Generic, useProtection: true);
                        },
                    },


Merged post

I have decided to add this to support Santa's sleigh. It works and looks good. Could you add support also for the future update?

Merged post


he doesn't like it, but he's happy.

Merged post

@WhiteThunder

Sure, will do.

I've released this in the v2.1.0 update.

thx. WhiteThunder

Locked automatically