Esempio n. 1
0
        public override bool HandleEvent(GetDisplayNameEvent E)
        {
            try
            {
                displayNameEvents++;
                //MessageQueue.AddPlayerMessage($"Running GetDisplayName Event {displayNameEvents}");
                if (ParentObject is null || ParentObject.IsPlayer())
                {
                    return(true);
                }
                string  factionName;
                Faction faction;

                if ((factionName = ParentObject.pBrain?.GetPrimaryFaction()) != null &&
                    (faction = Factions.get(factionName)) != null &&
                    faction.Visible)
                {
                    E.AddTag($"({GetFactionString(faction)})");
                }
                if (ParentObject.IsOwned() &&
                    (factionName = ParentObject.Owner) != null &&
                    (faction = Factions.get(ParentObject.Owner)) != null &&
                    faction.Visible)
                {
                    //MessageQueue.AddPlayerMessage("Getting Owner baybee");
                    E.AddTag($"[{GetFactionString(faction)}]");
                }
            } catch (Exception ex) {
                Debug.LogError("Failed to add Faction info to display name with exception: \n " + ex);
            }

            return(true);
        }
Esempio n. 2
0
        public override bool HandleEvent(GetDisplayNameEvent E)
        {
            string desc = "[{{pink|hatches in " + IncubationPeriodDuration + "}}]";

            E.AddTag(desc);
            return(true);
        }
 public override bool HandleEvent(GetDisplayNameEvent E)
 {
     if (CheckConstrictedBy())
     {
         E.AddTag("&y[{{green|constricted by " + ConstrictedBy.a + ConstrictedBy.DisplayNameOnly + "}}]", 0);
     }
     return(true);
 }
 public override bool HandleEvent(GetDisplayNameEvent E)
 {
     if (base.Object.GetEffect(base.ClassName) == this)
     {
         E.AddTag("[{{C|submerged}}]");
     }
     return(true);
 }