This commit is contained in:
Tassilo Schweyer 2026-06-05 19:18:49 +02:00
commit cabfdd4252
41 changed files with 1335 additions and 0 deletions

View file

@ -0,0 +1,41 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em;
/**
*
* @author welterde
*/
public class CollisionException extends RuntimeException {
/**
* Creates a new instance of <code>CollisionException</code> without detail
* message.
*/
public CollisionException() {
}
/**
* Constructs an instance of <code>CollisionException</code> with the
* specified detail message.
*
* @param msg the detail message.
*/
public CollisionException(String msg) {
super(msg);
}
}

View file

@ -0,0 +1,16 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
*/
package de.welterde.em;
/**
*
* @author welterde
*/
public class Exotic_matter {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
* Manage presence of rooms, walls, corridors, etc.
* @author welterde
*/
public class BuildingManager {
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public record CoordVector(short dz, short dx, short dy) {
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public final class Corridor extends LocationBase implements Location {
}

View file

@ -0,0 +1,26 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public enum CounterName {
LOCATION_IDX,
ENTITY_IDX,
}

View file

@ -0,0 +1,48 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public enum Direction {
EAST,
WEST,
NORTH,
SOUTH,
UP,
DOWN;
public static final CoordVector EAST_VEC = new CoordVector((short) 0, (short) 1, (short) 0);
public static final CoordVector WEST_VEC = new CoordVector((short) 0, (short) -1, (short) 0);
public static final CoordVector NORTH_VEC = new CoordVector((short) 0, (short) 0, (short) 1);
public static final CoordVector SOUTH_VEC = new CoordVector((short) 0, (short) 0, (short) -1);
public static final CoordVector UP_VEC = new CoordVector((short) 1, (short) 0, (short) 0);
public static final CoordVector DOWN_VEC = new CoordVector((short) -1, (short) 0, (short) 0);
public CoordVector getNormVector() {
return switch(this) {
case EAST -> EAST_VEC;
case WEST -> WEST_VEC;
case NORTH -> NORTH_VEC;
case SOUTH -> SOUTH_VEC;
case UP -> UP_VEC;
case DOWN -> DOWN_VEC;
};
}
}

View file

@ -0,0 +1,43 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public interface Entity {
/**
* Space occupied by entity.
* In case of small object with no bounding box return null.
*
* @return
*/
public Object getBoundingBox();
/**
* Get current location of object.
*
* @return
*/
public Location getLocation();
public boolean isMovable();
public MovementStatus getMovementStatus();
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public abstract class EntityBase implements Entity {
}

View file

@ -0,0 +1,34 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
* Manages position and occupied tiles by entities
*
* @author welterde
*/
public class EntityPosMgr {
protected final OutpostMap ctx;
public EntityPosMgr(OutpostMap ctx) {
this.ctx = ctx;
}
public void occupyTile(Tile t, Entity e) {
// do something
}
}

View file

@ -0,0 +1,30 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public enum EntityType {
SMALL_ITEM,
LARGE_ITEM,
MACHINERY,
FURNITURE,
}

View file

@ -0,0 +1,26 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public sealed interface Location permits LocationBase, Corridor, Room {
public short getSecurityLevel();
public Location setSecurityLevel(short newLevel);
}

View file

@ -0,0 +1,37 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public abstract class LocationBase implements Location {
protected short securityLevel;
@Override
public short getSecurityLevel() {
return this.securityLevel;
}
@Override
public Location setSecurityLevel(short newLevel) {
this.securityLevel = newLevel;
return this;
}
}

View file

@ -0,0 +1,34 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
* Manages locations like rooms, corridors, sectors
* @author welterde
*/
public class LocationManager {
protected final OutpostMap ctx;
public LocationManager(OutpostMap ctx) {
this.ctx = ctx;
}
public Corridor buildCorridor(MapCoord startPos, Direction dir, short width, short height) {
var vec = dir.getNormVector();
}
}

View file

@ -0,0 +1,44 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Record.java to edit this template
*/
package de.welterde.em.data;
/**
* z coordinate goes from 65km to 0, where ground-level is at 50km
* @author welterde
*/
public record MapCoord(int z, int x, int y) {
public MapCoord move(Direction dir) {
switch (dir) {
case EAST -> {
return new MapCoord(z, x + 1, y);
}
case WEST -> {
return new MapCoord(z, x - 1, y);
}
case NORTH -> {
return new MapCoord(z, x, y + 1);
}
case SOUTH -> {
return new MapCoord(z, x, y - 1);
}
case UP -> {
return new MapCoord(z - 1, x, y);
}
case DOWN -> {
return new MapCoord(z + 1, x, y);
}
}
return null;
}
public boolean isUnderground() {
return (z < 50000);
}
public MapCoord add(CoordVector v) {
return new MapCoord(z + v.dz(), x + v.dx(), y + v.dy());
}
}

View file

@ -0,0 +1,30 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public enum MovementStatus {
/**
* Entity is fixed in place
*/
FIXED,
STATIONARY,
MOVING
}

View file

@ -0,0 +1,57 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package de.welterde.em.data;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author welterde
*/
public class OutpostMap {
protected final Map<MapCoord,Tile> tiles;
protected final Map<Integer, Location> locations;
protected final Map<Integer, Entity> entities;
protected final EntityPosMgr entityPosMgr;
protected final TerrainGen gen;
protected final EnumMap<CounterName, Integer> counters;
public OutpostMap(TerrainGen gen) {
this.tiles = new HashMap<>();
this.locations = new HashMap<>();
this.entities = new HashMap<>();
this.counters = new EnumMap<>(CounterName.class);
this.gen = gen;
this.entityPosMgr = new EntityPosMgr(this);
}
public Tile getTile(MapCoord c) {
if(!this.tiles.containsKey(c)) {
// default to the terrain generator
return this.gen.generateTile(this, c);
} else {
return this.tiles.get(c);
}
}
public void updateTile(MapCoord c, Tile upd) {
this.tiles.put(c, upd);
}
public int incrCounter(CounterName n) {
synchronized(this.counters) {
var nextVal = this.counters.get(n) + 1;
this.counters.put(n, nextVal);
return nextVal;
}
}
public void occupyTile(Tile t, Entity e) {
this.entityPosMgr.occupyTile(t, e);
}
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public final class Room extends LocationBase implements Location {
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public record RoomCoord(short sector, short level, short corridor, short room) {
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public interface TerrainGen<X> {
public Tile generateTile(X ctx, MapCoord c);
}

View file

@ -0,0 +1,47 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public interface Tile {
public TileType getType();
// get Room/Corridor/.. if there is any
public Location getLocation();
public Tile setLocation(Location loc);
// get next tile in specified direction
public Tile next(Direction dir);
public boolean isWalkable();
public boolean isBuildable();
/**
* Get entity occupying this tile if there is any
*
* @return
*/
public Entity getEntity();
public Tile occupy(Entity e);
}

View file

@ -0,0 +1,83 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
import de.welterde.em.CollisionException;
/**
*
* @author welterde
*/
public record TileImpl(OutpostMap ctx, MapCoord coord, TileType type, Location location, Entity occupator) implements Tile {
@Override
public TileType getType() {
return type;
}
@Override
public Location getLocation() {
return location;
}
@Override
public Tile setLocation(Location newLocation) {
Tile upd = new TileImpl(ctx, coord, type, newLocation, occupator);
ctx.updateTile(coord, upd);
return upd;
}
@Override
public Tile next(Direction dir) {
var nextCoord = coord.move(dir);
return this.ctx.getTile(nextCoord);
}
@Override
public boolean isWalkable() {
// this tile needs to be empty, the tile above needs to be empty
// and tile below needs to be solid
}
@Override
public boolean isBuildable() {
// only check if this tile is available for building
// check if it is occupied already
}
@Override
public Entity getEntity() {
}
@Override
public Tile occupy(Entity e) {
// if we are already occupied..
if(this.getEntity() != null)
throw new CollisionException();
// in case object is fixed we will remember that
if(!e.isMovable()) {
Tile upd = new TileImpl(ctx, coord, type, location, e);
ctx.updateTile(coord, upd);
return upd;
} else {
ctx.occupyTile(this, e);
}
}
}

View file

@ -0,0 +1,32 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data;
/**
*
* @author welterde
*/
public enum TileType {
// tile is fully filed with some material
FILLED,
// tile is fully unfilled/uninvolved
AIR,
CORRIDOR,
ROOM,
WALL,
DOOR,
}

View file

@ -0,0 +1,42 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data.gen;
import de.welterde.em.data.MapCoord;
import de.welterde.em.data.OutpostMap;
import de.welterde.em.data.TerrainGen;
import de.welterde.em.data.Tile;
import de.welterde.em.data.TileImpl;
import de.welterde.em.data.TileType;
/**
*
* @author welterde
*/
public class BasicTerrainGen implements TerrainGen<OutpostMap> {
@Override
public Tile generateTile(OutpostMap ctx, MapCoord c) {
if(c.isUnderground()) {
// generate tile with filled material
return new TileImpl(ctx, c, TileType.FILLED, null, null);
} else {
return new TileImpl(ctx, c, TileType.AIR, null, null);
}
}
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.data.gen;
/**
*
* @author welterde
*/
public class OutpostGen {
}

View file

@ -0,0 +1,30 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.e;
/**
*
* @author welterde
*/
public class Employee {
protected String name;
public Employee(String name) {
this.name = name;
}
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.e;
/**
*
* @author welterde
*/
public interface Skill {
}

View file

@ -0,0 +1,32 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.entity;
import de.welterde.em.data.OutpostMap;
/**
*
* @author welterde
*/
public class EntityManager {
protected final OutpostMap ctx;
public EntityManager(OutpostMap ctx) {
this.ctx = ctx;
}
}

View file

@ -0,0 +1,27 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.entity;
import de.welterde.em.data.Entity;
/**
*
* @author welterde
*/
public abstract class ItemBase implements Entity {
}

View file

@ -0,0 +1,27 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.room;
/**
*
* @author welterde
*/
public enum RoomType {
LAB,
OFFICE,
COMPUTER_ROOM,
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public class City {
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public class Country {
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public class Dimension {
}

View file

@ -0,0 +1,32 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public enum DimensionType {
/**
* Our dimension or other dimension with nor particular features
*/
BASE,
/**
* Endless backrooms
*/
BACKROOMS,
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
* Organization
* @author welterde
*/
public class Org {
}

View file

@ -0,0 +1,31 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
import java.util.EnumSet;
/**
*
* @author welterde
*/
public class Outpost {
protected final EnumSet<OutpostFlags> flags;
public Outpost() {
this.flags = EnumSet.noneOf(OutpostFlags.class);
}
}

View file

@ -0,0 +1,41 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public enum OutpostFlags {
/**
* Traffic connection via rail
*/
RAIL_CONNECTION,
BOAT_CONNECTION,
ROAD_CONNECTION,
AIR_CONNECTION,
/**
* receives mail service from government
*/
MAIL_SERVICE,
/**
* Has outside connection for utilities like water, sewage, electricity
*/
UTILITIES_CONNECTION;
}

View file

@ -0,0 +1,40 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public enum OutpostLocationType {
INNER_CITY,
CITY_RESEARCH_PARK,
VILLAGE,
REMOTE_DESERT,
REMOTE_WOODS,
REMOTE_MOUNTAIN,
REMOTE_UNDERSEA;
public boolean nearPopulationCenter() {
return switch (this) {
case INNER_CITY, CITY_RESEARCH_PARK, VILLAGE ->
true;
default ->
false;
};
}
}

View file

@ -0,0 +1,25 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package de.welterde.em.w;
/**
*
* @author welterde
*/
public class World {
}