public WorldFloorProvider(GameContent contentManager) { this.ContentManager = contentManager; this.Entries = new Dictionary <ushort, FloorReference>(); this.ById = new Dictionary <ushort, Floor>(); DynamicFloorFromID = new Dictionary <string, ushort>(); }
public static void Init(string basepath, ContentMode mode) { if (Get != null) { return; } Get = new GameContent(basepath, mode, null, true); }
public static void InitBasic(string basepath, GraphicsDevice device) { if (Get != null) { return; } Get = new GameContent(basepath, ContentMode.CLIENT, device, false); }
public static void Init(string basepath, GraphicsDevice device) { if (Get != null) { if (!Get.Inited) { Get.Init(); } return; } Get = new GameContent(basepath, ContentMode.CLIENT, device, true); }
public WorldWallProvider(GameContent contentManager) { this.ContentManager = contentManager; WallStyleToIndex = WallStyleIDs.ToDictionary(x => x, x => Array.IndexOf(WallStyleIDs, x)); this.Entries = new Dictionary <ushort, WallReference>(); this.ById = new Dictionary <ushort, Wall>(); this.StyleById = new Dictionary <ushort, WallStyle>(); this.WallStyles = new List <WallStyle>(); DynamicWallFromID = new Dictionary <string, ushort>(); }
public UIGraphicsProvider(GameContent contentManager) : base(contentManager, new TextureCodec(MASK_COLORS), new Regex("uigraphics/.*\\.dat")) { _files[0x00000Cb800000002] = "uigraphics/friendshipweb/friendshipwebalpha.tga"; _files[0x00000Cbfb00000001] = "uigraphics/hints/hint_mechanicskill.bmp"; _files[0x1AF0856DDBAC] = "uigraphics/chat/balloonpointersadbottom.bmp"; _files[0x1B00856DDBAC] = "uigraphics/chat/balloonpointersadside.bmp"; _files[0x1B10856DDBAC] = "uigraphics/chat/balloontilessad.bmp"; _files[0x1972454856DDBAC] = "uigraphics/friendshipweb/f_web_inbtn.bmp"; _files[0x3D3AEF0856DDBAC] = "uigraphics/friendshipweb/f_web_outbtn.bmp"; //./uigraphics/eods/costumetrunk/eod_costumetrunkbodySkinBtn.bmp _pointers[0x0000028800000001] = 0x0000094600000001; }
public void Init(GameContent content) { //load and build catalog ItemsByGUID = new Dictionary <uint, ObjectCatalogItem>(); ItemsByCategory = new List <ObjectCatalogItem> [30]; for (int i = 0; i < 30; i++) { ItemsByCategory[i] = new List <ObjectCatalogItem>(); } var packingslip = new XmlDocument(); //very simple overide incase you don't want to use the TSO catalog or want to change it. if (File.Exists(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog.xml"))) { packingslip.Load(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog.xml")); } else { packingslip.Load(content.GetPath("packingslips/catalog.xml")); } //If the community lot file exists, load it for uilotbutton. if (File.Exists(Path.Combine(FSOEnvironment.ContentDir, "patch/mtune/clots.txt"))) { CLots = File.ReadAllText(Path.Combine(FSOEnvironment.ContentDir, "patch/mtune/clots.txt"), Encoding.UTF8); } var objectInfos = packingslip.GetElementsByTagName("P"); foreach (XmlNode objectInfo in objectInfos) { sbyte Category = Convert.ToSByte(objectInfo.Attributes["s"].Value); uint guid = Convert.ToUInt32(objectInfo.Attributes["g"].Value, 16); if (Category < 0) { continue; } var item = new ObjectCatalogItem() { GUID = guid, Category = Category, Price = Convert.ToUInt32(objectInfo.Attributes["p"].Value), Name = objectInfo.Attributes["n"].Value, DisableLevel = Convert.ToByte(objectInfo.Attributes["r"]?.Value ?? "0") }; ItemsByCategory[Category].Add(item); ItemsByGUID[guid] = item; } //load and build Content Objects into catalog if (File.Exists(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog_downloads.xml"))) { var dpackingslip = new XmlDocument(); dpackingslip.Load(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog_downloads.xml")); var downloadInfos = dpackingslip.GetElementsByTagName("P"); foreach (XmlNode objectInfo in downloadInfos) { sbyte dCategory = Convert.ToSByte(objectInfo.Attributes["s"].Value); uint dguid = Convert.ToUInt32(objectInfo.Attributes["g"].Value, 16); if (dCategory < 0) { continue; } var ditem = new ObjectCatalogItem() { GUID = dguid, Category = dCategory, Price = Convert.ToUInt32(objectInfo.Attributes["p"].Value), Name = objectInfo.Attributes["n"].Value, DisableLevel = Convert.ToByte(objectInfo.Attributes["r"]?.Value ?? "0") }; ItemsByCategory[dCategory].Add(ditem); ItemsByGUID[dguid] = ditem; } } }
public IniProvider(GameContent content) : base(content, new IniCodec(), new Regex("^sys/.*\\.ini")) { }
public AvatarTextureProvider(GameContent contentManager) : base(contentManager, new TextureCodec(), new Regex(".*/textures/.*\\.dat")) { }
public CityMapsProvider(GameContent content) { this.Content = content; }
public RackOutfitsProvider(GameContent contentManager) { this.Content = contentManager; }
public WorldRoofProvider(GameContent contentManager) : base(contentManager, new TextureCodec(new uint[] { }, true), new Regex(contentManager.TS1? "GameData/Roofs/.*\\.bmp" : "housedata/roofs/.*\\.jpg")) { UseTS1 = contentManager.TS1; }
public WorldObjectProvider(GameContent contentManager) : base(contentManager) { }
public AvatarAnimationProvider(GameContent contentManager) : base(contentManager, new AnimationCodec(), new Regex(".*/animations/.*\\.dat")) { }
public WorldObjectGlobals(GameContent contentManager) : base(contentManager, new IffCodec(), new Regex(".*/globals/.*\\.iff")) { }
public AvatarOutfitProvider(GameContent contentManager) : base(contentManager, new OutfitCodec(), new Regex(".*/outfits/.*\\.dat")) { }
public Audio(GameContent contentManager) { this.ContentManager = contentManager; }
public AvatarSkeletonProvider(GameContent contentManager) : base(contentManager, new SkeletonCodec(), new Regex(".*/skeletons/.*\\.dat")) { }
public WorldGlobalProvider(GameContent contentManager) { this.ContentManager = contentManager; }
public HandgroupProvider(GameContent contentManager) : base(contentManager, new HandgroupCodec(), new Regex(".*/hands/groups/.*\\.dat")) { }
public AvatarMeshProvider(GameContent contentManager, GraphicsDevice device) : base(contentManager, new MeshCodec(), new Regex(".*/meshes/.*\\.dat")) { }
public AvatarBindingProvider(GameContent contentManager) : base(contentManager, new BindingCodec(), new Regex(".*/bindings/.*\\.dat")) { }
public AvatarCollectionsProvider(GameContent contentManager) : base(contentManager, new CollectionCodec(), new Regex(".*/collections/.*\\.dat")) { }
public AvatarAppearanceProvider(GameContent contentManager) : base(contentManager, new AppearanceCodec(), new Regex(".*/appearances/.*\\.dat")) { }
public AvatarPurchasables(GameContent contentManager) : base(contentManager, new PurchasableOutfitCodec(), new Regex(".*/purchasables/.*\\.dat")) { }