/* * Copyright (C) 2026 welterde * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package de.welterde.em.w; import de.welterde.em.EntityBase; import de.welterde.em.EntityRef; import java.util.EnumSet; import de.welterde.em.GameContext; /** * * @author welterde */ public class Outpost extends EntityBase { protected final EnumSet flags; protected final OutpostLocationType locationType; protected EntityRef city; public Outpost(GameContext ctx, int id, OutpostLocationType locationType) { super(ctx, id); this.flags = EnumSet.noneOf(OutpostFlags.class); this.locationType = locationType; } public EnumSet getFlags() { return flags.clone(); } public OutpostLocationType getLocationType() { return locationType; } public City getCity() { if(this.city != null) return this.city.get(); else return null; } }