예제 #1
0
        public void setTo(Person p)
        {
            inner   = p;
            p.outer = this;

            layerBack.sprite = p.getImageBack();
            layerMid.sprite  = p.getImageMid();
            layerFore.sprite = p.getImageFore();

            title.text    = p.getFullName();
            subtitle.text = (p.title_land == null) ? "" : p.title_land.getName();

            if (p.society.getSovreign() == p)
            {
                border.sprite = p.map.world.textureStore.slotKing;
            }
            else if (p.titles.Count > 0)
            {
                border.sprite = p.map.world.textureStore.slotDuke;
            }
            else if (p.title_land != null)
            {
                border.sprite = p.map.world.textureStore.slotCount;
            }
            else
            {
                border.sprite = p.map.world.textureStore.slotBasic;
            }
        }
 public void setTo(Person p)
 {
     profileBack.sprite    = p.getImageBack();
     profileMid.sprite     = p.getImageMid();
     profileFore.sprite    = p.getImageFore();
     profileBorder.sprite  = p.getImageBorder();
     textName.text         = p.getFullName();
     textPrestige.text     = "Prestige: " + (int)p.prestige;
     textVotingOption.text = "Voting: " + p.getVote(p.society.voteSession).info(p.society.voteSession.issue);
     voter = p;
 }
예제 #3
0
        public void setTo(Person p)
        {
            profileBack.sprite   = p.getImageBack();
            profileMid.sprite    = p.getImageMid();
            profileFore.sprite   = p.getImageFore();
            profileBorder.sprite = p.getImageBorder();


            if (World.staticMap.param.option_useAdvancedGraphics == 1)
            {
                if (p.isMale)
                {
                    profileMid.sprite    = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    profileMid.sprite    = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                profileFore.sprite = p.getImageFore();
            }
            else
            {
                layerAdvEyes.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvMouth.sprite = World.staticMap.world.textureStore.person_advClear;
                layerAdvHair.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvJewel.sprite = World.staticMap.world.textureStore.person_advClear;
            }

            textName.text         = p.getFullName();
            textPrestige.text     = "Prestige: " + (int)p.prestige;
            textVotingOption.text = "Voting: " + p.getVote(p.society.voteSession).info(p.society.voteSession.issue);
            voter = p;
        }
예제 #4
0
        public void setTo(Person p)
        {
            inner = p;

            layerBack.sprite = p.getImageBack();
            layerMid.sprite  = p.getImageMid();
            layerFore.sprite = p.getImageFore();

            title.text    = p.getFullName();
            subtitle.text = (p.title_land == null) ? "" : p.title_land.getName();
            // FIXME
            upperRightText.text = lowerRightText.text = riseBox.text = fallBox.text = "";

            targetColor = neutralColor;
        }
 public void populate(Society soc, Person agent)
 {
     this.agent               = agent;
     societyName.text         = soc.getName();
     textVotingIssue.text     = soc.voteSession.issue.ToString();
     textVotingIssueDesc.text = soc.voteSession.issue.getLargeDesc();
     textProposer.text        = "Proposed by: " + soc.voteSession.issue.proposer.getFullName();
     textProposerVote.text    = "Voting For: " + soc.voteSession.issue.proposer.getVote(soc.voteSession).info(soc.voteSession.issue);
     proposerBack.sprite      = soc.voteSession.issue.proposer.getImageBack();
     proposerMid.sprite       = soc.voteSession.issue.proposer.getImageMid();
     proposerFore.sprite      = soc.voteSession.issue.proposer.getImageFore();
     proposerBorder.sprite    = soc.voteSession.issue.proposer.getImageBorder();
     foreach (Person p in soc.people)
     {
         PopVoterBar bar = world.prefabStore.getVoterBar(p);
         //bar.gameObject.transform.parent = this.gameObject.transform;
         voterBars.Add(bar);
     }
     foreach (VoteOption opt in soc.voteSession.issue.options)
     {
         PopOptBar bar = world.prefabStore.getVoteOptBar(opt, soc.voteSession);
         //bar.gameObject.transform.parent = this.gameObject.transform;
         voteOptBars.Add(bar);
     }
     if (agent != null)
     {
         textAgentName.text = "Interacting with:\n" + agent.getFullName();
         agentBack.sprite   = agent.getImageBack();
         agentBorder.sprite = agent.getImageBorder();
         agentFore.sprite   = agent.getImageFore();
         agentMid.sprite    = agent.getImageMid();
         textAgentDesc.text = "You may use the voter's liking for " + agent.getFullName() + " to sway their votes one way or another, spending this liking as political capital.";
     }
     else
     {
         agentBack.sprite   = world.textureStore.icon_mask;
         agentMid.sprite    = world.textureStore.icon_mask;
         agentBorder.sprite = world.textureStore.slotCount;
         agentFore.sprite   = world.textureStore.icon_mask;
         textAgentName.text = "Interacting without character";
         textAgentDesc.text = "If you interact with a society with an enthralled noble, or use an agent, you can spend the liking the voters have towards them to sway their votes.";
     }
     sess = soc.voteSession;
     checkData();
 }
        public void setTo(Person person)
        {
            this.person = person;

            title.text         = person.getFullName();
            layerBack.sprite   = person.getImageBack();
            layerBorder.sprite = person.getImageBorder();
            layerFore.sprite   = person.getImageFore();
            layerMid.sprite    = person.getImageMid();


            if (World.staticMap.param.option_useAdvancedGraphics == 1)
            {
                Person p = person;
                if (p.isMale)
                {
                    layerMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    layerMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                layerFore.sprite = p.getImageFore();
            }
            else
            {
                layerAdvEyes.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvMouth.sprite = World.staticMap.world.textureStore.person_advClear;
                layerAdvHair.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvJewel.sprite = World.staticMap.world.textureStore.person_advClear;
            }
        }
예제 #7
0
        public void SetInfo(Person p)
        {
            foreground.sprite  = p.getImageFore();
            midground.sprite   = p.getImageMid();
            background.sprite  = p.getImageBack();
            foreground.enabled = true;
            midground.enabled  = true;
            background.enabled = true;

            name.text = p.getFullName();
            if (p.title_land != null)
            {
                info.text = p.title_land.getName();
            }
            else
            {
                info.text = "Resident";
            }

            info.text += "\n" + p.prestige.ToString("N0") + " prestige";

            name2.text = "";
            info2.text = "";
        }
예제 #8
0
        public void populate(Society soc, Person agent)
        {
            this.agent               = agent;
            societyName.text         = soc.getName();
            textVotingIssue.text     = soc.voteSession.issue.ToString();
            textVotingIssueDesc.text = soc.voteSession.issue.getLargeDesc();
            textProposer.text        = "Proposed by: " + soc.voteSession.issue.proposer.getFullName();
            if (soc.voteSession.issue.proposer != null)
            {
                World.log("Proposer: " + soc.voteSession.issue.proposer.getFullName());
                World.log("Text " + textProposerVote);
                textProposerVote.text = "Voting For: " + soc.voteSession.issue.proposer.getVote(soc.voteSession).info(soc.voteSession.issue);
                proposerBack.sprite   = soc.voteSession.issue.proposer.getImageBack();
                proposerMid.sprite    = soc.voteSession.issue.proposer.getImageMid();
                proposerFore.sprite   = soc.voteSession.issue.proposer.getImageFore();
                proposerBorder.sprite = soc.voteSession.issue.proposer.getImageBorder();
            }
            else
            {
                Person arbitrary = soc.getSovereign();
                if (arbitrary == null)
                {
                    arbitrary = soc.people[0];
                }
                if (arbitrary != null)
                {
                    textProposerVote.text = "";
                    proposerBack.sprite   = arbitrary.getImageBack();
                    proposerMid.sprite    = arbitrary.getImageMid();
                    proposerFore.sprite   = arbitrary.getImageFore();
                    proposerBorder.sprite = arbitrary.getImageBorder();
                }
            }
            foreach (Person p in soc.people)
            {
                PopVoterBar bar = world.prefabStore.getVoterBar(p);
                //bar.gameObject.transform.parent = this.gameObject.transform;
                voterBars.Add(bar);
            }
            foreach (VoteOption opt in soc.voteSession.issue.options)
            {
                PopOptBar bar = world.prefabStore.getVoteOptBar(opt, soc.voteSession);
                //bar.gameObject.transform.parent = this.gameObject.transform;
                voteOptBars.Add(bar);
            }
            viewSelf.gameObject.SetActive(false);
            if (agent != null)
            {
                textAgentName.text = "Interacting with:\n" + agent.getFullName();
                agentBack.sprite   = agent.getImageBack();
                agentBorder.sprite = agent.getImageBorder();
                agentFore.sprite   = agent.getImageFore();
                agentMid.sprite    = agent.getImageMid();
                textAgentDesc.text = "You may use the voter's liking for " + agent.getFullName() + " to sway their votes one way or another, spending this liking as political capital.";
            }
            else
            {
                agentBack.sprite   = world.textureStore.icon_mask;
                agentMid.sprite    = world.textureStore.icon_mask;
                agentBorder.sprite = world.textureStore.slotCount;
                agentFore.sprite   = world.textureStore.icon_mask;
                textAgentName.text = "Interacting without character";
                textAgentDesc.text = "If you interact with a society with an enthralled noble, or use an agent, you can spend the liking the voters have towards them to sway their votes.";
            }


            if (World.staticMap.param.option_useAdvancedGraphics == 1 && agent != null)
            {
                Person p = agent;
                if (p.isMale)
                {
                    agentMid.sprite   = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    agentEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    agentMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    agentHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    agentJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    agentMid.sprite   = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    agentEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    agentMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    agentHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    agentJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                agentFore.sprite = p.getImageFore();
            }
            else
            {
                agentEyes.sprite  = World.self.textureStore.person_advClear;
                agentMouth.sprite = World.self.textureStore.person_advClear;
                agentHair.sprite  = World.self.textureStore.person_advClear;
                agentJewel.sprite = World.self.textureStore.person_advClear;
            }
            lastPos = World.self.ui.uiInputs.scrollwheelTracking;

            sess = soc.voteSession;
            checkData();

            if (agent != null && agent == soc.map.overmind.enthralled)
            {
                bGoToSelf();
                viewSelf.gameObject.SetActive(true);
            }
        }
예제 #9
0
        public void setTo(Unit unit)
        {
            if (unit == null)
            {
                setToNull(); return;
            }

            title.text    = unit.getName();
            desc.text     = unit.getDesc();
            task.text     = unit.getTaskShort();
            taskDesc.text = unit.getTaskDesc();

            if (unit.person == null)
            {
                clearPerson();
            }
            else
            {
                personBack.sprite = unit.person.getImageBack();
                personMid.sprite  = unit.person.getImageMid();
                personFore.sprite = unit.person.getImageFore();
                if (World.staticMap.param.option_useAdvancedGraphics == 1)
                {
                    Person p = unit.person;
                    if (p.isMale)
                    {
                        personMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                        personAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                        personAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                        personAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                        personAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                    }
                    else
                    {
                        personMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                        personAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                        personAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                        personAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                        personAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                    }
                    personFore.sprite = p.getImageFore();
                }
                else
                {
                    personAdvEyes.sprite  = world.textureStore.person_advClear;
                    personAdvMouth.sprite = world.textureStore.person_advClear;
                    personAdvHair.sprite  = world.textureStore.person_advClear;
                    personAdvJewel.sprite = world.textureStore.person_advClear;
                }

                personFore.color = Color.white;
            }

            if (unit.isEnthralled())
            {
                if (unit.movesTaken == 0)
                {
                    hasMoved.text = "Can Move";
                }
                else
                {
                    hasMoved.text = "Has Taken Turn";
                }
            }
            else
            {
                hasMoved.text = "Not an Enthralled Agent";
            }

            nationText.text = unit.society.getName();
            if (unit.parentLocation != null)
            {
                nationText.text += "\nFrom " + unit.parentLocation.getName();
            }
            nationFlag1.color = unit.society.color;
            nationFlag2.color = unit.society.color2;


            specialDesc.text  = unit.specialInfoLong();
            specialText.color = unit.specialInfoColour();
            specialText.text  = unit.specialInfo();
        }
예제 #10
0
        public void setTo(Person p)
        {
            inner   = p;
            p.outer = this;

            layerBack.sprite = p.getImageBack();
            layerMid.sprite  = p.getImageMid();
            layerFore.sprite = p.getImageFore();


            if (World.staticMap.param.option_useAdvancedGraphics == 1)
            {
                if (p.isMale)
                {
                    layerMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    layerMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                layerFore.sprite = p.getImageFore();
            }
            else
            {
                layerAdvEyes.sprite  = p.map.world.textureStore.person_advClear;
                layerAdvMouth.sprite = p.map.world.textureStore.person_advClear;
                layerAdvHair.sprite  = p.map.world.textureStore.person_advClear;
                layerAdvJewel.sprite = p.map.world.textureStore.person_advClear;
            }

            float f = (float)(1 - p.shadow);

            if (f > 1)
            {
                f = 1;
            }
            if (f < 0)
            {
                f = 0;
            }
            border.color  = new Color(f, f, f);
            title.text    = p.getFullName();
            subtitle.text = (p.title_land == null) ? "" : p.title_land.getName();

            if (p.society.getSovereign() == p)
            {
                border.sprite = p.map.world.textureStore.slotKing;
            }
            else if (p.titles.Count > 0)
            {
                border.sprite = p.map.world.textureStore.slotDuke;
            }
            else if (p.title_land != null)
            {
                border.sprite = p.map.world.textureStore.slotCount;
            }
            else
            {
                border.sprite = p.map.world.textureStore.slotBasic;
            }
        }
예제 #11
0
        public void setTo(Person p)
        {
            if (p == null)
            {
                setToNull(); return;
            }

            profileBack.enabled     = true;
            profileMid.enabled      = true;
            profileFore.enabled     = true;
            profileBorder.enabled   = true;
            profileAdvEyes.enabled  = true;
            profileAdvMouth.enabled = true;
            profileAdvHair.enabled  = true;
            profileAdvJewel.enabled = true;
            profileBorder.sprite    = null;
            if (p.society.getSovereign() == p)
            {
                profileBorder.sprite = p.map.world.textureStore.slotKing;
            }
            else if (p.titles.Count > 0)
            {
                profileBorder.sprite = p.map.world.textureStore.slotDuke;
            }
            else
            {
                profileBorder.sprite = p.map.world.textureStore.slotCount;
            }

            if (World.staticMap.param.option_useAdvancedGraphics == 1)
            {
                //Null setting done to unfuck the distortion of images which periodically occurs
                profileBack.sprite     = null;
                profileMid.sprite      = null;
                profileAdvEyes.sprite  = null;
                profileAdvMouth.sprite = null;
                profileAdvHair.sprite  = null;
                profileAdvJewel.sprite = null;
                profileFore.sprite     = null;
                profileBack.sprite     = p.getImageBack();
                if (p.isMale)
                {
                    profileMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    profileAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    profileAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    profileAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    profileAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    profileMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    profileAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    profileAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    profileAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    profileAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                profileFore.sprite = p.getImageFore();
            }
            else
            {
                profileAdvEyes.enabled  = false;
                profileAdvMouth.enabled = false;
                profileAdvJewel.enabled = false;
                profileAdvHair.enabled  = false;
                //Null setting done to unfuck the distortion of images which periodically occurs
                profileBack.sprite = null;
                profileMid.sprite  = null;
                profileFore.sprite = null;
                profileBack.sprite = p.getImageBack();
                profileMid.sprite  = p.getImageMid();
                profileFore.sprite = p.getImageFore();
            }


            personTitle.text = p.getFullName();
            TitleLanded title = p.title_land;

            if (title == null)
            {
                locText.text = "No Landed Title";
            }
            else
            {
                locText.text = "of " + title.settlement.name;
            }

            Society     soc  = p.society;
            VoteSession vote = (soc != null) ? soc.voteSession : null;

            if (vote != null)
            {
                personVoting.text = "Voting: " + p.getVote(vote).info(vote.issue);
            }
            else
            {
                personVoting.text = "Not voting";
            }

            voteSharePrediction.text = "";
            if (p.society.socType.periodicElection())
            {
                Title possibleOpt = null;
                foreach (Title t in soc.titles)
                {
                    if (t is Title_Sovereign)
                    {
                        if (t.getEligibleHolders(p.society).Contains(p))
                        {
                            possibleOpt = t;
                        }
                    }
                    else if (t is Title_ProvinceRuler && possibleOpt == null)
                    {
                        if (t.getEligibleHolders(p.society).Contains(p))
                        {
                            possibleOpt = t;
                        }
                    }
                }
                if (possibleOpt != null)
                {
                    VoteIssue_AssignTitle hypothetical = new VoteIssue_AssignTitle(p.society, p, possibleOpt);
                    foreach (Person p2 in possibleOpt.getEligibleHolders(p.society))
                    {
                        VoteOption opt = new VoteOption();
                        opt.person = p2;
                        hypothetical.options.Add(opt);
                    }
                    VoteSession sess = new VoteSession();
                    sess.issue = hypothetical;
                    sess.assignVoters();
                    double total   = 0;
                    double mine    = 0;
                    double highest = 0;
                    foreach (VoteOption opt in hypothetical.options)
                    {
                        total += opt.votingWeight;
                        if (opt.person == p)
                        {
                            mine = opt.votingWeight;
                        }
                        if (opt.votingWeight > highest)
                        {
                            highest = opt.votingWeight;
                        }
                    }
                    if (total > 0)
                    {
                        if (mine == highest)
                        {
                            voteSharePrediction.color = new Color(0, 0.75f, 0);
                        }
                        else
                        {
                            voteSharePrediction.color = new Color(1, 0.5f, 0.5f);
                        }
                        voteSharePrediction.text = possibleOpt.getName() + "\nPredicted Vote Share: " + (int)(100 * mine / total) + "%";
                    }
                }
            }
        }
        public void showPersonInfo(Person p)
        {
            profileBack.enabled   = true;
            profileMid.enabled    = true;
            profileFore.enabled   = true;
            profileBorder.enabled = true;
            //Done to unfuck the distortion of images which periodically occurs
            profileBack.sprite   = null;
            profileMid.sprite    = null;
            profileFore.sprite   = null;
            profileBorder.sprite = null;
            profileBack.sprite   = p.getImageBack();
            profileMid.sprite    = p.getImageMid();
            profileFore.sprite   = p.getImageFore();
            if (p.society.getSovreign() == p)
            {
                profileBorder.sprite = p.map.world.textureStore.slotKing;
            }
            else if (p.titles.Count > 0)
            {
                profileBorder.sprite = p.map.world.textureStore.slotDuke;
            }
            else
            {
                profileBorder.sprite = p.map.world.textureStore.slotCount;
            }

            personTitle.text = p.getFullName();
            TitleLanded title = p.title_land;

            if (title == null)
            {
                locText.text = "No Landed Title";
            }
            else
            {
                locText.text = "of " + title.settlement.name;
            }
            string bodyText = "";

            if (p.getDirectSuperiorIfAny() != null)
            {
                bodyText += "\nDirect Superior: " + p.getDirectSuperiorIfAny().getFullName();
            }
            else
            {
                bodyText += "\nDirect Superior: None";
            }
            prestigeText.text = "Prestige: " + (int)(p.prestige) + "\nPrestige Moving towards: " + (int)(p.getTargetPrestige(null));
            bodyText         += "\nShadow: " + (int)(p.shadow * 100) + "%";
            bodyText         += "\nEvidence: " + (int)(p.evidence * 100) + "%";
            bodyText         += "\nMilitarism: " + (int)(p.politics_militarism * 100) + "%";
            bodyText         += " (" + p.getMilitarismInfo() + ")";

            bodyText += "\n";

            personAwarenss.text = (int)(p.awareness * 100) + "%";
            if (p.action == null)
            {
                actionText.text = "Not Taking Action";
                actionDesc.text = "Characters can take actions if they become aware and world panic is sufficiently high.";
                actionDesc.text = "\n\nThis character is not taking an action.";
            }
            else
            {
                actionText.text = p.action.getShort();
                actionDesc.text = "Characters can take actions if they become aware and world panic is sufficiently high.";
                actionDesc.text = "\n\n" + p.action.getLong();
            }

            Society     soc  = getSociety(GraphicalMap.selectedHex);
            VoteSession vote = (soc != null) ? soc.voteSession : null;

            if (vote != null)
            {
                bodyText += "\nVoting on: " + vote.issue.ToString();

                VoteOption vo = p.getVote(vote);
                bodyText += "\n\tto " + vo.info(vote.issue);
            }
            else
            {
                bodyText += "\nNot voting.";
            }

            bodyText += "\n";

            ThreatItem threat = p.getGreatestThreat();

            if (threat != null)
            {
                bodyText += "\nBelieved Greatest Threat: " + threat.getTitle();
                bodyText += "\nFear of threat: " + (int)threat.threat;
                if (threat.threat > World.staticMap.param.person_fearLevel_terrified)
                {
                    bodyText += "\n[Terrified]";
                }
                else if (threat.threat > World.staticMap.param.person_fearLevel_afraid)
                {
                    bodyText += "\n[Afraid]";
                }
                else
                {
                    bodyText += "\n[Moderate Concern]";
                }
            }
            else
            {
                bodyText += "\nNot feeling threatened.";
            }

            personBody.text = bodyText;


            insanityText.text  = "Sanity state: " + p.madness.name;
            insanityText.text += "\nSanity: " + ((int)p.sanity) + " Maximum: " + p.maxSanity;

            insanityDescText.text = p.madness.desc + "\n\n" +
                                    "Characters have a sanity score. If this value drops to zero, they become insane, and begin to act in an erratic and dangerous manner. "
                                    + "Characters will dislike insane characters to a moderate degree, and insane characters will occasionally lash out, further reducing their relationships."
                                    + "\nYou can cause reduce sanity using certain abilities.";

            personAwarenssDesc.text = "A person's awareness is how much they have realised about the threat their world faces.\nIt allows them to take actions against the darkenss directly." +
                                      "\nSome nobles gain awareness each time you expend power, they can also gain awareness by gaining suspicion as they seen evidence, and can be warned by their fellow nobles, especially neighbours."
                                      + "\nAwareness gain can be increased by being in a place of learning, or increased or decreased by traits."
                                      + "\n\nThis noble has an awareness rate of " + (int)(100 * p.getAwarenessMult()) + "%";

            prestigeDescText.text = "";
            List <string> prestigeReasons = new List <string>();

            p.getTargetPrestige(prestigeReasons);
            foreach (string s in prestigeReasons)
            {
                prestigeDescText.text += "*" + s + "\n";
            }

            for (int i = 0; i < traits.Length; i++)
            {
                traits[i].SetActive(false);
                traitDescBoxes[i].SetActive(false);
            }
            for (int i = 0; i < p.traits.Count; i++)
            {
                traits[i].SetActive(true);
                traitNames[i].text = p.traits[i].name;
                traitDescs[i].text = p.traits[i].desc;
            }
        }
        public void showPersonInfo(Person p)
        {
            profileBack.enabled = true;
            profileMid.enabled  = true;
            profileFore.enabled = true;
            //Done to unfuck the distortion of images which periodically occurs
            profileBack.sprite = null;
            profileMid.sprite  = null;
            profileFore.sprite = null;
            profileBack.sprite = p.getImageBack();
            profileMid.sprite  = p.getImageMid();
            profileFore.sprite = p.getImageFore();
            personTitle.text   = p.getFullName();
            TitleLanded title = p.title_land;

            if (title == null)
            {
                locText.text = "No Landed Title";
            }
            else
            {
                locText.text = "of " + title.settlement.name;
            }
            string bodyText = "Prestige: " + (int)(p.prestige);

            bodyText += "\nPrestige Moving towards: " + (int)(p.targetPrestige);
            bodyText += "\nShadow: " + (int)(p.shadow * 100) + "%";
            bodyText += "\nEvidence: " + (int)(p.evidence * 100) + "%";
            bodyText += "\nMilitarism: " + (int)(p.politics_militarism * 100) + "%";
            bodyText += " (" + p.getMilitarismInfo() + ")";

            bodyText += "\n";

            Society     soc  = getSociety(GraphicalMap.selectedHex);
            VoteSession vote = (soc != null) ? soc.voteSession : null;

            if (vote != null)
            {
                bodyText += "\nVoting on: " + vote.issue.ToString();

                VoteOption vo = p.getVote(vote);
                bodyText += "\n\tto " + vo.info(vote.issue);
            }
            else
            {
                bodyText += "\nNot voting.";
            }

            bodyText += "\n";

            ThreatItem threat = p.getGreatestThreat();

            if (threat != null)
            {
                bodyText += "\nBelieved Greatest Threat: " + threat.getTitle();
            }
            else
            {
                bodyText += "\nNot feeling threatened.";
            }

            personBody.text = bodyText;
        }