public override void DrawContent() { var strings = new List <string> { "[z|Esc] - " + EALConst.EXIT.GetString() }; m_messages.DrawLine(JoinCommandCaptions(strings), FColor.White, 0, 0, EAlignment.LEFT); var liveCell = World.TheWorld.Avatar[TargetPoint]; if (liveCell.IsSeenBefore) { ETileset.TARGETING.GetTile(0).Draw(TargetPoint + m_avatarScreenPoint, FColor.Gold); var lighted = liveCell.FinalLighted; var list = new List <Noun> { liveCell.Terrain.AsNoun() }; if (lighted.Lightness() > World.TheWorld.Avatar.GeoInfo.Layer.FogLightness) { ETileset.TARGETING.GetTile(0).Draw(TargetPoint + m_avatarScreenPoint, FColor.Green); if (liveCell.Creature != null) { list.Add(liveCell.Creature.Name); } if (liveCell.Thing != null) { list.Add(liveCell.Thing.Name); } var items = liveCell.Items.ToArray(); foreach (var item in items) { list.Add(EssenceHelper.GetName(item, World.TheWorld.Avatar)); } m_messages.DrawLine(EALSentence.THERE_ARE.GetString(list.ToArray()), FColor.Gray, 1, 0, EAlignment.LEFT); } else { m_messages.DrawLine(EALSentence.THERE_ARE_WERE.GetString(list.ToArray()), FColor.Gray, 1, 0, EAlignment.LEFT); } } else { ETileset.TARGETING.GetTile(0).Draw(TargetPoint + m_avatarScreenPoint, FColor.Red); } }
public override void DrawContent() { var strings = new List <string> { "[Enter|T] цель", "[z|Esc] - " + EALConst.EXIT.GetString() }; if (m_targets.Count > 0) { strings.Insert(1, "[-] - предыдущая цель"); strings.Insert(1, "[+] - следующая цель"); } m_messages.DrawLine(JoinCommandCaptions(strings), FColor.White, 0, 0, EAlignment.LEFT); var pnt = Point.Zero; var done = false; var color = FColor.Gold; var lineToPoints = Point.Zero.GetLineToPoints(m_targetPoint).ToArray(); for (var index = 1; index < lineToPoints.Length; index++) { var point = lineToPoints[index]; var liveCell = World.TheWorld.Avatar[point]; if (point.Lenght >= m_maxDistance || (!liveCell.IsCanShootThrough && liveCell.Creature == null)) { color = FColor.Red; done = true; } if (!done) { pnt = point; } if (liveCell.Creature != null) { color = FColor.Red; done = true; } if (point.Lenght < 1) { continue; } ETileset.TARGETING.GetTile(1).Draw(point + m_addPoint, color); } ETileset.TARGETING.GetTile(0).Draw(pnt + m_addPoint, FColor.Gold); m_realTarget = pnt; }
public override void DrawContent() { var strings = new List <string> { "[Enter|M] идти", "[z|Esc] - " + EALConst.EXIT.GetString() }; m_messages.DrawLine(JoinCommandCaptions(strings), FColor.White, 0, 0, EAlignment.LEFT); var color = FColor.Gold; var avatarPathMapCoords = World.TheWorld.Avatar[0, 0].PathMapCoords; var targetPathMapCoords = avatarPathMapCoords + m_targetPoint; var path = World.TheWorld.LiveMap.PathFinder.FindPath(World.TheWorld.Avatar, targetPathMapCoords); if (path != null) { m_path = MoveToAct.GetMoveToPath(World.TheWorld.Avatar, path); foreach (var point in path) { var pnt = point - avatarPathMapCoords; if (pnt.Lenght < 1) { continue; } if (ContentRct.Contains(pnt + m_avatarScreenPoint)) { ETileset.TARGETING.GetTile(1).Draw(pnt + m_avatarScreenPoint, color); } } ETileset.TARGETING.GetTile(0).Draw(m_targetPoint + m_avatarScreenPoint, FColor.Gold); } else { m_path = null; ETileset.TARGETING.GetTile(0).Draw(m_targetPoint + m_avatarScreenPoint, FColor.Red); } }