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

public class HullModule : Module {
	public HullModule(JObject json) : base(json) {
		sprite = Resources.Load("Sprites/Modules/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 true;
	}

	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) {
	}
}