Example #1
0
 public override void ExposeData(ObjectSerializer serializer)
 {
     serializer.DataField(ref Type, "bulb", LightBulbType.Tube);
     serializer.DataField(ref _color, "color", Color.White);
     serializer.DataFieldCached(ref _burningTemperature, "BurningTemperature", 1400);
     serializer.DataFieldCached(ref _powerUse, "PowerUse", 40);
 }
Example #2
0
        public override void ExposeData(ObjectSerializer serializer)
        {
            base.ExposeData(serializer);

            serializer.DataField(ref _selectedColor, "selected", null);
            serializer.DataField(ref _baseState, "state", "error");
            serializer.DataFieldCached(ref _colors, "colors", new Dictionary <string, Color>());
        }
        public override void ExposeData(ObjectSerializer serializer)
        {
            base.ExposeData(serializer);

            serializer.DataField(ref templatename, "Template", "Human");

            var type = typeof(SpeciesComponent).Assembly.GetType("Content.Server.GameObjects." + templatename);

            DamageTemplate = (DamageTemplates)Activator.CreateInstance(type);
            serializer.DataFieldCached(ref _heatResistance, "HeatResistance", 323);
        }
Example #4
0
        public override void ExposeData(ObjectSerializer serializer)
        {
            base.ExposeData(serializer);

            serializer.DataField(ref templatename, "Template", "Human");

            Type type = AppDomain.CurrentDomain.GetAssemblyByName("Content.Server")
                        .GetType("Content.Server.GameObjects." + templatename);

            DamageTemplate = (DamageTemplates)Activator.CreateInstance(type);
            serializer.DataFieldCached(ref _heatResistance, "HeatResistance", 323);
        }
        public override void ExposeData(ObjectSerializer serializer)
        {
            base.ExposeData(serializer);

            // TODO: Writing.
            serializer.DataReadFunction("Slots", new List <string>(0), list =>
            {
                foreach (var slotflagsloaded in list)
                {
                    SlotFlags |= (SlotFlags)Enum.Parse(typeof(SlotFlags), slotflagsloaded.ToUpper());
                }
            });

            serializer.DataFieldCached(ref _heatResistance, "HeatResistance", 323);
        }
Example #6
0
        public override void ExposeData(ObjectSerializer serializer)
        {
            base.ExposeData(serializer);

            serializer.DataFieldCached(ref _offset, "offset", SnapGridOffset.Center);
        }
Example #7
0
 public override void ExposeData(ObjectSerializer serializer)
 {
     base.ExposeData(serializer);
     serializer.DataFieldCached(ref StateBase, "base", "");
     serializer.DataFieldCached(ref SmoothKey, "key", null);
 }
 public override void ExposeData(ObjectSerializer serializer)
 {
     serializer.DataFieldCached(ref _selectionShader, "selectionshader", "selection_outline");
 }