using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using UnityEngine;
using System;

public class RudderModule : Module {
	public RudderModule(JObject json) : base(json) {
		icon = Resources.Load("Sprites/Modules/Icons/Rudders/" + getUniqueName(), typeof(Sprite)) as Sprite;
		silhouette = Resources.Load("Sprites/Modules/Silhouettes/Rudders/" + getUniqueName(), typeof(Sprite)) as Sprite;
	}

	public static RudderModule[] loadModules(string[] filenames) {
		Array.Sort(filenames);
		RudderModule[] array = new RudderModule[filenames.Length];

		for (int i = 0; i < filenames.Length; i++) {
			array[i] = new RudderModule(jsonFromFile(filenames[i]));
		}

		return array;
	}

	override public void updateClasses() {
	}

	override public ModuleData getData(int parent, float angleOffset, Vector position) {
		return new RudderModuleData(parent, this, position);
	}
}

public class RudderModuleData : ModuleData{
	public RudderModuleData(int parent, Module template, Vector position) : base(parent, template, position) {
	}
}