CodeWalker/CodeWalker.Core/GameFiles/FileTypes/VehicleLayoutsFile.cs

38 lines
890 B
C#
Raw Normal View History

2019-01-11 11:24:50 +08:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeWalker.GameFiles
{
[TypeConverter(typeof(ExpandableObjectConverter))]
public class VehicleLayoutsFile : GameFile, PackedFile
{
2019-01-11 17:40:13 +08:00
public string Xml { get; set; }
2019-01-11 11:24:50 +08:00
public VehicleLayoutsFile() : base(null, GameFileType.VehicleLayouts)
{ }
public VehicleLayoutsFile(RpfFileEntry entry) : base(entry, GameFileType.VehicleLayouts)
{
}
public void Load(byte[] data, RpfFileEntry entry)
{
RpfFileEntry = entry;
Name = entry.Name;
FilePath = Name;
//always XML .meta
Xml = TextUtil.GetUTF8Text(data);
2019-01-11 17:40:13 +08:00
//TODO: parse CVehicleMetadataMgr XML
2019-01-11 11:24:50 +08:00
Loaded = true;
}
}
}