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

Autoload() public method

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

Usage Example

Example #1
0
        private void AutoloadBuff(Type type)
        {
            ModBuff buff = (ModBuff)Activator.CreateInstance(type);

            buff.mod = this;
            string name    = type.Name;
            string texture = (type.Namespace + "." + type.Name).Replace('.', '/');

            if (buff.Autoload(ref name, ref texture))
            {
                AddBuff(name, buff, texture);
            }
        }