/// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemToolLight light)
            {
                if (light.ItemLightConfig?.IsLightEnabled == true)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Light size", "(" +
                                                                         light.ItemLightConfig.Size.X + ", " +
                                                                         light.ItemLightConfig.Size.Y + ")"));
                }

                if (light.ItemFuelConfig != null)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Fuel initial",
                                                                         light.ItemFuelConfig.FuelAmountInitial));
                    EntityInformation.Add(new ViewModelEntityInformation("Fuel max",
                                                                         light.ItemFuelConfig.FuelCapacity));
                    EntityInformation.Add(new ViewModelEntityInformation("Fuel use",
                                                                         light.ItemFuelConfig.FuelUsePerSecond));
                    if (light.ItemFuelConfig.FuelProtoItemsList?.Count > 0)
                    {
                        EntityInformation.Add(new ViewModelEntityInformation("Compatible fuel",
                                                                             light.ItemFuelConfig.FuelProtoItemsList.Select(EntityViewModelsManager
                                                                                                                            .GetEntityViewModel)));
                    }
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is TechGroup techGroup)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Tier", techGroup.Tier.ToString()));
                EntityInformation.Add(new ViewModelEntityInformation("LP to unlock", techGroup.LearningPointsPrice));
                if (techGroup.GroupRequirements?.Count > 0)
                {
                    foreach (BaseTechGroupRequirement groupRequirement in techGroup.GroupRequirements)
                    {
                        switch (groupRequirement)
                        {
                        case BaseTechGroupRequirementGroupUnlocked requirementGroup:
                            EntityInformation.Add(new ViewModelEntityInformation(
                                                      "Require " + (requirementGroup.GroupNodesUnlockedPercent * 100) + "%",
                                                      EntityViewModelsManager.GetEntityViewModel(requirementGroup.Group)));
                            break;
                        }
                    }
                }
                if (techGroup.AllNodes?.Count > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Contains nodes",
                                                                         techGroup.AllNodes.Select(EntityViewModelsManager.GetEntityViewModel)));
                }
            }
        }
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemAmmo ammo && ammo.DamageDescription != null)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Range",
                                                                     ammo.DamageDescription.RangeMax));
                EntityInformation.Add(new ViewModelEntityInformation("Damage value",
                                                                     ammo.DamageDescription.DamageValue));
                EntityInformation.Add(new ViewModelEntityInformation("Armor piercing coefficient",
                                                                     ammo.DamageDescription.ArmorPiercingCoef));
                EntityInformation.Add(new ViewModelEntityInformation("Final damage multiplier",
                                                                     ammo.DamageDescription.FinalDamageMultiplier));

                if (ammo.DamageDescription?.DamageProportions.Count > 0)
                {
                    foreach (DamageProportion proportion in ammo.DamageDescription.DamageProportions)
                    {
                        EntityInformation.Add(new ViewModelEntityInformation("Damage by " + proportion.DamageType,
                                                                             (proportion.Proportion * 100) + "%"));
                    }
                }
            }
        }
Exemple #4
0
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItem item)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Stack size",
                                                                     item.MaxItemsPerStack.ToString()));
            }
            if (ProtoEntity is IProtoItemWithDurability itemWithDurability)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Durability max",
                                                                     itemWithDurability.DurabilityMax));
            }
            if (ProtoEntity is IProtoItemOrganic itemOrganic)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Organic value",
                                                                     itemOrganic.OrganicValue));
            }
            if (ProtoEntity is IProtoItemFuel itemFuel)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Fuel amount",
                                                                     itemFuel.FuelAmount));
            }
            if (ProtoEntity is IProtoItemLiquidStorage liquidStorage)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Capacity",
                                                                     liquidStorage.Capacity));
                EntityInformation.Add(new ViewModelEntityInformation("Liquid type",
                                                                     liquidStorage.LiquidType.ToString()));
            }
        }
Exemple #5
0
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemFood food)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Stay fresh",
                                                                     food.FreshnessDuration == TimeSpan.Zero
                        ? "forever"
                        : ClientTimeFormatHelper.FormatTimeDuration(food.FreshnessDuration)));
                if (Math.Abs(food.FoodRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Food restore", food.FoodRestore));
                }
                if (Math.Abs(food.WaterRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Water restore", food.WaterRestore));
                }
                if (Math.Abs(food.StaminaRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Stamina restore", food.StaminaRestore));
                }
                foreach (EffectAction effect in food.Effects)
                {
                    EntityInformation.Add(new ViewModelEntityInformation(effect.Intensity > 0 ? "Add effect" : "Remove effect",
                                                                         EntityViewModelsManager.GetEntityViewModel(effect.ProtoStatusEffect), effect.Intensity));
                }
            }
        }
Exemple #6
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            EntityInformation.Add(new ViewModelEntityInformation("test", "test"));

            if (ProtoEntity is ProtoZoneDefault zoneDefault)
            {
                if (zoneDefault.AttachedScripts != null)
                {
                    Api.Logger.Dev("yes1");
                    foreach (var attachedScript in zoneDefault.AttachedScripts)
                    {
                        EntityInformation.Add(new ViewModelEntityInformation("Attached script",
                                                                             attachedScript.ShortId));
                    }
                }
            }

            if (ProtoEntity is IProtoZone zone)
            {
                EntityInformation.Add(new ViewModelEntityInformation("name",
                                                                     zone.Name));
                if (zone.AttachedScripts != null)
                {
                    Api.Logger.Dev("yes2");
                    foreach (var attachedScript in zone.AttachedScripts)
                    {
                        EntityInformation.Add(new ViewModelEntityInformation("Attached script",
                                                                             attachedScript.ShortId));
                    }
                }
            }
        }
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is ProtoItemMedical medical)
            {
                //EntityInformation.Add(new ViewModelEntityInformation("Medical toxicity", medical.MedicalToxicity));
                if (Math.Abs(medical.FoodRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Food restore", medical.FoodRestore));
                }
                if (Math.Abs(medical.WaterRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Water restore", medical.WaterRestore));
                }
                if (Math.Abs(medical.HealthRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Health restore", medical.HealthRestore));
                }
                if (Math.Abs(medical.StaminaRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Stamina restore", medical.StaminaRestore));
                }
                if (medical.MedicalToxicity > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Add effect",
                                                                         EntityViewModelsManager.GetEntityViewModelByType <StatusEffectMedicineOveruse>(),
                                                                         medical.MedicalToxicity));
                }
            }

            // TODO: Rework this.
            // Hardcoded information
            AddStatusEffectsInformation();
        }
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            EntityInformation.Add(new ViewModelEntityInformation("Disapear after",
                                                                 TimeSpan.FromSeconds(ObjectCorpse.CorpseTimeoutSeconds)));
        }
Exemple #9
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemFood food)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Stay fresh",
                                                                     food.FreshnessDuration == TimeSpan.Zero
                        ? "forever"
                        : ClientTimeFormatHelper.FormatTimeDuration(food.FreshnessDuration)));
                if (Math.Abs(food.FoodRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Food restore", food.FoodRestore));
                }
                if (Math.Abs(food.WaterRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Water restore", food.WaterRestore));
                }
                if (Math.Abs(food.HealthRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Health restore", food.HealthRestore));
                }
                if (Math.Abs(food.StaminaRestore) > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Stamina restore", food.StaminaRestore));
                }
            }

            // TODO: Rework this.
            // Hardcoded information
            AddStatusEffectsInformation();
        }
 /// <summary>
 /// Initialize information about entity - invoked after all entity view Models created,
 /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
 /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
 /// </summary>
 public override void InitInformation()
 {
     base.InitInformation();
     if (ProtoEntity is IProtoItemToolWoodcutting axe)
     {
         EntityInformation.Add(new ViewModelEntityInformation("Damage to tree", axe.DamageToTree));
     }
 }
Exemple #11
0
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is TechNode techNode)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Tier", techNode.Group.Tier.ToString()));
                EntityInformation.Add(new ViewModelEntityInformation("LP to unlock", techNode.LearningPointsPrice));
                EntityInformation.Add(new ViewModelEntityInformation("Tech group",
                                                                     EntityViewModelsManager.GetEntityViewModel(techNode.Group)));
                if (techNode.RequiredNode != null)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Required node",
                                                                         EntityViewModelsManager.GetEntityViewModel(techNode.RequiredNode)));
                }
                if (techNode.DependentNodes?.Count > 0)
                {
                    EntityInformation.Add(new ViewModelEntityInformation("Dependent nodes",
                                                                         techNode.DependentNodes.Select(EntityViewModelsManager.GetEntityViewModel)));
                }
                if (techNode.NodeEffects?.Count > 0)
                {
                    List <ProtoEntityViewModel> tempList = new List <ProtoEntityViewModel>();
                    foreach (BaseTechNodeEffect nodeEffect in techNode.NodeEffects)
                    {
                        switch (nodeEffect)
                        {
                        case TechNodeEffectPerkUnlock techNodeEffectPerkUnlock:
                            tempList.Add(
                                EntityViewModelsManager.GetEntityViewModel(techNodeEffectPerkUnlock.Perk));
                            break;

                        case TechNodeEffectRecipeUnlock techNodeEffectRecipeUnlock:
                            tempList.Add(
                                EntityViewModelsManager.GetEntityViewModel(techNodeEffectRecipeUnlock.Recipe));
                            break;

                        case TechNodeEffectStructureUnlock techNodeEffectStructureUnlock:
                            tempList.Add(
                                EntityViewModelsManager.GetEntityViewModel(techNodeEffectStructureUnlock
                                                                           .Structure));
                            break;

                        case TechNodeEffectVehicleUnlock techNodeEffectVehicleUnlock:
                            tempList.Add(
                                EntityViewModelsManager.GetEntityViewModel(techNodeEffectVehicleUnlock
                                                                           .Vehicle));
                            break;

                        default:
                            Api.Logger.Error("CNEI: Unknown TechNodeEffect " + nodeEffect);
                            break;
                        }
                    }
                    EntityInformation.Add(new ViewModelEntityInformation("Unlocks", tempList));
                }
            }
        }
Exemple #12
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemToolWateringCan wateringCan)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Water capacity", wateringCan.WaterCapacity));
            }
        }
Exemple #13
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemToolToolbox toolbox)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Construction speed multiplier",
                                                                     toolbox.ConstructionSpeedMultiplier));
            }
        }
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoDynamicWorldObject dynamicWorldObject)
            {
                EntityInformation.Add(new ViewModelEntityInformation("HP",
                                                                     dynamicWorldObject.StructurePointsMax));
            }
        }
Exemple #15
0
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectCrate crate)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Items slots count",
                                                                     crate.ItemsSlotsCount));
            }
        }
Exemple #16
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemPowerBank powerBank)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Energy capacity",
                                                                     powerBank.EnergyCapacity));
            }
        }
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemDroneControl droneControl)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Max drones to control",
                                                                     droneControl.MaxDronesToControl));
            }
        }
Exemple #18
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectBarrel barrel)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Liquid capacity",
                                                                     barrel.LiquidCapacity));
            }
        }
Exemple #19
0
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectPlant plant)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Harvests number",
                                                                     plant.NumberOfHarvests));
            }
        }
Exemple #20
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectFridge fridge)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Freshness duration coef",
                                                                     fridge.FreshnessDurationMultiplier));
            }
        }
Exemple #21
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectVegetation vegetation)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Grow stage count",
                                                                     vegetation.GrowthStagesCount));
            }
        }
Exemple #22
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemToolMining pickaxe)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Damage to minerals",
                                                                     pickaxe.DamageToMinerals));
            }
        }
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectFloor floor)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Move speed multiplier",
                                                                     floor.CharacterMoveSpeedMultiplier));
            }
        }
Exemple #24
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectTradingStation tradingStation)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Lots count",
                                                                     tradingStation.LotsCount));
            }
        }
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is ProtoItemWeaponRangedEnergy weaponRangedEnergy)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Energy use per shot",
                                                                     weaponRangedEnergy.EnergyUsePerShot));
            }
        }
Exemple #26
0
        /// <summary>
        /// Initialize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemFertilizer itemFertilizer)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Plant grow speed increase",
                                                                     "+" + ((itemFertilizer.PlantGrowthSpeedMultiplier - 1.0) * 100) + "%"));
            }
        }
Exemple #27
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectBed bed)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Respawn cooldown",
                                                                     TimeSpan.FromSeconds(bed.RespawnCooldownDurationSeconds)));
            }
        }
Exemple #28
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemSeed seed)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Will grow into",
                                                                     EntityViewModelsManager.GetEntityViewModel(seed.ObjectPlantProto)));
            }
        }
Exemple #29
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoItemEquipmentImplant implant)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Biomaterial to install",
                                                                     implant.BiomaterialAmountRequiredToInstall));
                EntityInformation.Add(new ViewModelEntityInformation("Biomaterial to uninstall",
                                                                     implant.BiomaterialAmountRequiredToUninstall));
            }
        }
Exemple #30
0
        /// <summary>
        /// Initilize information about entity - invoked after all entity view Models created,
        /// so you can use links to other entity by using <see cref="EntityViewModelsManager.GetEntityViewModel" />
        /// and <see cref="EntityViewModelsManager.GetAllEntityViewModels" />.
        /// </summary>
        public override void InitInformation()
        {
            base.InitInformation();

            if (ProtoEntity is IProtoObjectWell well)
            {
                EntityInformation.Add(new ViewModelEntityInformation("Water capacity",
                                                                     well.WaterCapacity));
                EntityInformation.Add(new ViewModelEntityInformation("Water production per sec",
                                                                     well.WaterProductionAmountPerSecond));
            }
        }