protected override sealed void Register() { ModTypeLookup <ModBuff> .Register(this); Type = BuffLoader.ReserveBuffID(); DisplayName = Mod.GetOrCreateTranslation($"Mods.{Mod.Name}.BuffName.{Name}"); Description = Mod.GetOrCreateTranslation($"Mods.{Mod.Name}.BuffDescription.{Name}"); BuffLoader.buffs.Add(this); }
public void AddBuff(string name, ModBuff buff, string texture) { int id = BuffLoader.ReserveBuffID(); buff.Name = name; buff.Type = id; buffs[name] = buff; BuffLoader.buffs[id] = buff; buff.texture = texture; buff.mod = this; }