Beispiel #1
0
        /// <summary>
        /// Gets the weapon data from bridge folder
        /// </summary>
        private void InitWeaponData()
        {
            var json = string.Empty;

            try
            {
                json = Path.Combine(Directory.GetCurrentDirectory(), "bridge//weapon_data.json");
                Log("deserializing weapon data: {json}", args: json);
                using (var stringReader = File.OpenText(json))
                {
                    _weaponData = WeaponData.FromJson(stringReader.ReadToEnd());
                }
            }
            catch (System.Exception ex)
            {
                LogEx(ex, $"weapon data file : {json}");
                //Don't start without data, force server to rpfail
                throw;
            }
        }