Terraria.ModLoader.ModMountData.Autoload C# (CSharp) Method

Autoload() public method

public Autoload ( string &name, string &texture, string>.IDictionary extraTextures ) : bool
name string
texture string
extraTextures string>.IDictionary
return bool
		public virtual bool Autoload(ref string name, ref string texture, IDictionary<MountTextureType, string> extraTextures)
		{
			return mod.Properties.Autoload;
		}

Usage Example

Ejemplo n.º 1
0
        private void AutoloadMountData(Type type)
        {
            ModMountData mount = (ModMountData)Activator.CreateInstance(type);

            mount.mod = this;
            string name          = type.Name;
            string texture       = (type.Namespace + "." + type.Name).Replace('.', '/');
            var    extraTextures = new Dictionary <MountTextureType, string>();

            foreach (MountTextureType textureType in Enum.GetValues(typeof(MountTextureType)))
            {
                extraTextures[textureType] = texture + "_" + textureType.ToString();
            }
            if (mount.Autoload(ref name, ref texture, extraTextures))
            {
                AddMount(name, mount, texture, extraTextures);
            }
        }