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

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

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

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

		return array;
	}

	override public void updateClasses() {
	}

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

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