public void InitConnection(Wmap map, int x, int y) { if (ObjDesc == null || !ObjDesc.Connects || ObjCfg.Contains("conn:")) { return; } var connStr = ConnectionComputer.GetConnString( (dx, dy) => map.Contains(x + dx, y + dy) && map[x + dx, y + dy].ObjType == ObjDesc.ObjectType); ObjCfg = $"{ObjCfg};{connStr};"; }
public void Reset(Wmap map = null, int x = 0, int y = 0) { TileId = _originalDesc.TileId; TileDesc = _originalDesc.TileDesc; ObjType = _originalDesc.ObjType; ObjDesc = _originalDesc.ObjDesc; ObjCfg = _originalDesc.ObjCfg; Terrain = _originalDesc.Terrain; Region = _originalDesc.Region; Elevation = _originalDesc.Elevation; if (map != null) { InitConnection(map, x, y); } UpdateCount++; }