protected sealed override void Register() { ModTypeLookup <ModProjectile> .Register(this); projectile.type = ProjectileLoader.ReserveProjectileID(); DisplayName = Mod.GetOrCreateTranslation($"Mods.{Mod.Name}.ProjectileName.{Name}"); ProjectileLoader.projectiles.Add(this); }
public void AddProjectile(string name, ModProjectile projectile, string texture) { int id = ProjectileLoader.ReserveProjectileID(); projectile.projectile.name = name; projectile.Name = name; projectile.projectile.type = id; projectiles[name] = projectile; ProjectileLoader.projectiles[id] = projectile; projectile.texture = texture; projectile.mod = this; }