protected override TileLayer Load(IniKeyCollection iniData, LayerHandlerContext context) { return(new TileLayer { ImageData = context.LoadExternalFile(ImageFileKey), Type = iniData.GetChar("type"), Id = iniData.GetByte("id"), Weight = iniData.GetUInt16("weight", 0) }); }
protected override ActionLayer Load(IniKeyCollection iniData, LayerHandlerContext context) { var data = new ActionLayer(); data.Name = iniData.GetString("name"); data.Hotkey = iniData.GetChar("hotkey"); var parent = iniData.GetString("parent", ""); if (!string.IsNullOrEmpty(parent)) { var parts = parent.Split(':'); data.Parent = new ResourceRef(parts[0], ushort.Parse(parts[1])); } data.Prerequisite = iniData.GetString("prereq", string.Empty); data.Verbs = iniData.GetString("verbs", "")?.Split(','); return(data); }