/*
 * This file is a part of the SteamWar software.
 *
 * Copyright (C) 2020  SteamWar.de-Serverteam
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package de.steamwar.bausystem.region.dynamic.special;

import de.steamwar.bausystem.region.GameModeConfig;
import de.steamwar.bausystem.region.RegionHistory;
import de.steamwar.bausystem.region.dynamic.DefaultFlagStorage;
import de.steamwar.bausystem.region.dynamic.DynamicRegion;
import de.steamwar.bausystem.region.dynamic.RegionConstructorData;
import de.steamwar.bausystem.region.dynamic.RegionDataRepository;
import lombok.Getter;
import lombok.NonNull;

public abstract class SpecialRegion extends DynamicRegion {

    @Getter
    private DefaultFlagStorage flags = new SpecialFlagStorage(this);

    @Getter
    protected SpecialAreaTile area;

    protected SpecialRegion(int minX, int minZ) {
        super(minX, minZ);
        RegionDataRepository.loadFlagStorage(this, flags);
    }

    protected SpecialRegion(RegionConstructorData regionConstructorData) {
        super(regionConstructorData);
        RegionDataRepository.loadFlagStorage(this, flags);
    }

    @Override
    public void update(DynamicRegion updateFrom) {
    }

    @Override
    public void setFlags(DefaultFlagStorage flags) {
        this.flags = flags;
    }

    @Override
    public @NonNull Area getBuildArea() {
        return Area.EMPTY;
    }

    @Override
    public @NonNull Area getTestblockArea() {
        return Area.EMPTY;
    }

    @Override
    public @NonNull GameModeConfig getGameModeConfig() {
        return GameModeConfig.EMPTY;
    }

    @Override
    public @NonNull RegionHistory getHistory() {
        return RegionHistory.EMPTY;
    }
}
