public void CreateTemplate() { JobSettings JobSettingsTemplate = new JobSettings(); JobDefinition jobDef = new JobDefinition(); jobDef.Name = "Security Officer"; jobDef.Description = "Keeps the inhabitants of the station safe."; jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Outer, ObjectType = "Atom.Item.Wearable.Outer.Armour" }); jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Inner, ObjectType = "Atom.Item.Wearable.Inner.Jumpsuit.Assistant_Grey" }); jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Head, ObjectType = "Atom.Item.Wearable.Head.Helmet" }); jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Feet, ObjectType = "Atom.Item.Wearable.Feet.Shoes" }); jobDef.Department = "Security"; JobSettingsTemplate.JobDefinitions = new List <JobDefinition> { jobDef }; DepartmentDefinition depDef = new DepartmentDefinition(); depDef.DepartmentIcon = "department_security"; depDef.Description = "The security department handles the security of the station in all matters."; depDef.Name = "Security"; depDef.DepartmentColor = Color.FromArgb(255, 125, 125, 125); JobSettingsTemplate.DepartmentDefinitions = new List <DepartmentDefinition>() { depDef }; XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.OmitXmlDeclaration = false; XmlWriter writer = XmlTextWriter.Create("JobDefinitions.xml", settings); Serializer.Serialize(writer, JobSettingsTemplate); }
public void CreateTemplate() { JobSettings JobSettingsTemplate = new JobSettings(); JobDefinition jobDef = new JobDefinition(); jobDef.Name = "Security Officer"; jobDef.Description = "Keeps the inhabitants of the station safe."; jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Outer, ObjectType = "Atom.Item.Wearable.Outer.Armour" }); jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Inner, ObjectType = "Atom.Item.Wearable.Inner.Jumpsuit.Assistant_Grey" }); jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Head, ObjectType = "Atom.Item.Wearable.Head.Helmet" }); jobDef.SpawnEquipment.Add(new SpawnEquipDefinition() { Location = EquipmentSlot.Feet, ObjectType = "Atom.Item.Wearable.Feet.Shoes" }); jobDef.Department = "Security"; JobSettingsTemplate.JobDefinitions = new List<JobDefinition> {jobDef}; DepartmentDefinition depDef = new DepartmentDefinition(); depDef.DepartmentIcon = "department_security"; depDef.Description = "The security department handles the security of the station in all matters."; depDef.Name = "Security"; depDef.DepartmentColor = Color.FromArgb(255, 125, 125, 125); JobSettingsTemplate.DepartmentDefinitions = new List<DepartmentDefinition>() {depDef}; XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.OmitXmlDeclaration = false; XmlWriter writer = XmlTextWriter.Create("JobDefinitions.xml", settings); Serializer.Serialize(writer, JobSettingsTemplate); }