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

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

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

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

		return array;
	}

	override public bool canBeDisabled() {
		return false;
	}

	override public void updateClasses() {
	}

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

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