Oprava spawnování monster, optimalizace v CommandProcessor a EventProcessor. Přesunutí některých tříd do vlastních namespaců, pročištění kódu, úpravy formátování, odstranění nepoužívaných souborů a zakomentovaného kódu
This commit is contained in:
parent
e5d746d597
commit
243f071a43
62 changed files with 873 additions and 1217 deletions
|
|
@ -1,43 +1,9 @@
|
|||
using System.Net.Security;
|
||||
using GlobalClassLib;
|
||||
using ONDServer.Net;
|
||||
|
||||
namespace ONDServer.Map;
|
||||
|
||||
public class MapTile : GlobalMapTile<TileConnector, MapTile> {
|
||||
public class MapTile(int id) : GlobalMapTile<TileConnector, MapTile>(id, MapManager.IdToCoords(id)) {
|
||||
public ServerPlayer? Owner{ get; set; }
|
||||
|
||||
public MapTile(int id) : base(id, MapManager.IdToCoords(id)) {
|
||||
}
|
||||
|
||||
// public int Id { get; private set; }
|
||||
// public ServerPlayer Owner { get; private set; }
|
||||
// public bool Lit { get; set; } = false;
|
||||
//
|
||||
// private List<TileConnector> connectors = new();
|
||||
//
|
||||
// public MapTile(int id, ServerPlayer owner) {
|
||||
// Id = id;
|
||||
// Owner = owner;
|
||||
// }
|
||||
// public void AddConnector(MapTile tile, TileConnector.ConnectorType type, int value) {
|
||||
// connectors.Add(new TileConnector(this, tile, type, value));
|
||||
// tile.connectors.Add(new TileConnector(tile, this, type, value));
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public void AddConnectors((MapTile tile, TileConnector.ConnectorType type, int value)[] connectors) =>
|
||||
// Array.ForEach(connectors, c => AddConnector(c.tile, c.type, c.value));
|
||||
//
|
||||
// public override string ToString() => $"{PositionAsString} -> {string.Join(", ", connectors.Select(c => c.Tiles.Item2.PositionAsString))}";
|
||||
// public string PositionAsString => $"[{Id}]"; // for debug purposes
|
||||
//
|
||||
// public TileConnector? GetConnector(int id) {
|
||||
// foreach (var con in connectors){
|
||||
// if (con.Tiles.Item2.Id == id) return con;
|
||||
// }
|
||||
//
|
||||
// return null;
|
||||
// }
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue