Fixed a bug where existing tiles were overwritten

Also added basic logic for generating the coastal tiles