public void AddGore(string texture, ModGore modGore = null) { int id = ModGore.ReserveGoreID(); ModGore.gores[texture] = id; if (modGore != null) { ModGore.modGores[id] = modGore; } }
public void AddGore(string name, ModGore gore, string texture) { int id = ModGore.ReserveGoreID(); gore.Name = name; gore.Type = id; gores[name] = gore; ModGore.gores[id] = gore; gore.texture = texture; gore.mod = this; }
/// <summary> /// Adds the given texture to the game as a custom gore, with the given custom gore behavior. If no custom gore behavior is provided, the custom gore will have the default vanilla behavior. /// </summary> /// <param name="texture">The texture.</param> /// <param name="modGore">The mod gore.</param> public void AddGore(string texture, ModGore modGore = null) { if (!loading) { throw new Exception("AddGore can only be called from Mod.Load or Mod.Autoload"); } int id = ModGore.ReserveGoreID(); ModGore.gores[texture] = id; if (modGore != null) { ModGore.modGores[id] = modGore; ContentInstance.Register(modGore); } }