package projectzombie.world.layer.layergen;

import java.util.Random;

import gl_engine.vec.Vec2d;
import gl_engine.vec.Vec2i;
import gl_engine.vec.Vec3d;
import projectzombie.util.ColorRange;
import projectzombie.util.TileState;
import projectzombie.util.math.map.IMap2D;
import projectzombie.world.chunk.Chunk;
import projectzombie.world.layer.Layer;

public abstract class LayerGen implements IMap2D<Chunk>
{
	public int id;
	public boolean destroyOnLeave = false;
	
	public Vec3d getWind(Layer layer, Vec2d pos) {
		return new Vec3d(0, 0, 0);
	}
	
	public abstract void generateChunk(Chunk chunk, Layer layer, Random rand, Vec2i pos);
	public abstract double getTemperature(Layer layer, Vec2d pos);
	public abstract void spawnEntities(Layer layer, Random rand);
	public abstract TileState getTileDestroyed(Layer layer, Vec2i pos);
	public abstract ColorRange getLightLevel();
	
	public void init(Layer layer) {
		
	}
	
	@Override
	public Chunk getEmpty(Vec2i pos) {
		return Chunk.CHUNK_EMPTY;
	}
	
	public void tickLayer(Layer layer, Chunk chunk) {
	}
	
	public boolean hasSun() {
		return false;
	}
	
	public double getSunPosition() {
		return 0;
	}
}
