예제 #1
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            if (this == Unknown)
            {
                return(Name);
            }

            if (link)
            {
                string icon = GetIcon();
                if (pov == null || pov != this)
                {
                    if (pov != null && pov.GetType() == typeof(BeastAttack) && (pov as BeastAttack)?.Beast == this) //Highlight Beast when printing Beast Attack Log
                    {
                        return(icon + "<a href=\"hf#" + Id + "\" title=\"" + Title + "\"><font color=#339900>" + ShortName + "</font></a>");
                    }

                    if (worldEvent != null)
                    {
                        return("the " + GetRaceStringByWorldEvent(worldEvent) + " " + icon + "<a href=\"hf#" + Id + "\" title=\"" + Title + "\">" + Name + "</a>");
                    }
                    return("the " + RaceString + " " + icon + "<a href=\"hf#" + Id + "\" title=\"" + Title + "\">" + Name + "</a>");
                }
                return("<a href=\"hf#" + Id + "\" title=\"" + Title + "\">" + HtmlStyleUtil.CurrentDwarfObject(ShortName) + "</a>");
            }
            if (pov == null || pov != this)
            {
                if (worldEvent != null)
                {
                    return(GetRaceStringByWorldEvent(worldEvent) + " " + Name);
                }
                return(RaceString + " " + Name);
            }
            return(ShortName);
        }
예제 #2
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            if (link)
            {
                string title = "";
                if (StructureSubType != StructureSubType.Unknown)
                {
                    title += StructureSubType.GetDescription();
                }
                else
                {
                    title += Type.GetDescription();
                }
                title += "&#13";
                title += "Events: " + Events.Count;

                string linkedString = "";
                if (pov != this)
                {
                    linkedString = Icon + "<a href = \"structure#" + GlobalId + "\" title=\"" + title + "\">" + Name + "</a>";
                }
                else
                {
                    linkedString = Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>";
                }
                return(linkedString);
            }
            return(Icon + Name);
        }
예제 #3
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            string name;

            if (Type == "Cavern")
            {
                name = "the depths of the world";
            }
            else if (Type == "Underworld")
            {
                name = "the Underworld";
            }
            else
            {
                name = "an underground region (" + Type + ")";
            }

            if (link)
            {
                string title = Type;
                title += "&#13";
                title += "Events: " + Events.Count;

                if (pov != this)
                {
                    return(Icon + "<a href = \"uregion#" + Id + "\" title=\"" + title + "\">" + name + "</a>");
                }

                return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(name) + "</a>");
            }
            return(name);
        }
예제 #4
0
        public string PrintEntity(bool link = true, DwarfObject pov = null)
        {
            string entityString = ToLink(link, pov);

            if (Parent != null)
            {
                entityString += " of " + Parent.ToLink(link, pov);
            }
            return(entityString);
        }
예제 #5
0
        public string ToTreeLeafLink(DwarfObject pov = null)
        {
            string dead = DeathYear != -1 ? "<br/>" + HtmlStyleUtil.SymbolDead : "";

            if (pov == null || pov != this)
            {
                return("<a " + (Deity ? "class=\"hf_deity\"" : "") + " href=\"hf#" + Id + "\" title=\"" + Title + "\">" + GetRaceString() + "<br/>" + Name + dead + "</a>");
            }
            return("<a " + (Deity ? "class=\"hf_deity\"" : "") + " title=\"" + Title + "\">" + GetRaceString() + "<br/>" + HtmlStyleUtil.CurrentDwarfObject(Name) + dead + "</a>");
        }
예제 #6
0
 public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
 {
     if (link)
     {
         if (pov != this)
         {
             return(Icon + "<a href = \"entity#" + Id + "\" title=\"" + GetToolTip() + "\">" + Name + "</a>");
         }
         return(Icon + "<a title=\"" + GetToolTip() + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>");
     }
     return(Name);
 }
예제 #7
0
        public string GetSummary(bool link = true, DwarfObject pov = null)
        {
            string summary = string.Empty;

            summary += ToLink(link, pov);
            summary += " was a ";
            summary += GetTypeAsString().ToLower();
            if (Race != CreatureInfo.Unknown)
            {
                summary += " of " + Race.NamePlural.ToLower();
            }
            if (Parent != null)
            {
                summary += " of " + Parent.ToLink(link, pov);
            }

            switch (Type)
            {
            case EntityType.Religion:
                if (Worshiped.Count > 0)
                {
                    summary += " centered around the worship of " + Worshiped.First().ToLink(link, pov);
                }
                break;

            case EntityType.MilitaryUnit:
                bool isWorshipping = false;
                if (Worshiped.Count > 0)
                {
                    summary      += " devoted to the worship of " + Worshiped.First().ToLink(link, pov);
                    isWorshipping = true;
                }
                if (Weapons.Count > 0)
                {
                    if (isWorshipping)
                    {
                        summary += " and";
                    }
                    summary += " dedicated to the mastery of the " + string.Join(", the ", Weapons);
                }
                break;

            case EntityType.Guild:
                summary += " of " + Profession + "s";
                break;
            }
            summary += ".";
            return(summary);
        }
예제 #8
0
 public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
 {
     if (link)
     {
         string title = "Artifact" + (!string.IsNullOrEmpty(Type) ? ", " + Type : "");
         title += "&#13";
         title += "Events: " + Events.Count;
         if (pov != this)
         {
             return(Icon + "<a href = \"artifact#" + Id + "\" title=\"" + title + "\">" + Name + "</a>");
         }
         return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>");
     }
     return(Name);
 }
예제 #9
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            if (link)
            {
                string title = Type;
                title += "&#13";
                title += "Events: " + Events.Count;

                if (pov != this)
                {
                    return(Icon + "<a href = \"region#" + Id + "\" title=\"" + title + "\">" + Name + "</a>");
                }
                return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>");
            }
            return(Name);
        }
예제 #10
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            if (link)
            {
                string title = "Poetic Form";
                title += "&#13";
                title += "Events: " + Events.Count;

                string linkedString = "";
                if (pov != this)
                {
                    linkedString = Icon + "<a href=\"poeticform#" + Id + "\" title=\"" + title + "\">" + Name + "</a>";
                }
                else
                {
                    linkedString = Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>";
                }
                return(linkedString);
            }
            return(Name);
        }
예제 #11
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            if (link)
            {
                string linkedString = "";
                if (pov != this)
                {
                    string title = "";
                    title += IsVolcano ? "Volcano" : "Mountain Peak";
                    title += "&#13";
                    title += "Events: " + Events.Count;

                    linkedString = Icon + "<a href = \"mountainpeak#" + Id + "\" title=\"" + title + "\">" + Name + "</a>";
                }
                else
                {
                    linkedString = Icon + HtmlStyleUtil.CurrentDwarfObject(Name);
                }

                return(linkedString);
            }
            return(Name);
        }
예제 #12
0
        public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
        {
            if (link)
            {
                string linkedString = "";
                if (pov != this)
                {
                    string title = "";
                    title += "World Construction";
                    title += Type != WorldConstructionType.Unknown ? "" : ", " + Type;
                    title += "&#13";
                    title += "Events: " + Events.Count;

                    linkedString = Icon + "<a href = \"worldconstruction#" + Id + "\" title=\"" + title + "\">" + Name + "</a>";
                }
                else
                {
                    linkedString = Icon + HtmlStyleUtil.CurrentDwarfObject(Name);
                }

                return(linkedString);
            }
            return(Name);
        }
예제 #13
0
 public virtual string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null)
 {
     return("");
 }