Пример #1
0
        public override bool CanSign(Alliance alliance, AllianceAgreementDef allianceAgreementDef, Pawn speaker, out string reason)
        {
            if (!base.CanSign(alliance, allianceAgreementDef, speaker, out reason))
            {
                return(false);
            }

            if (speaker.skills.GetSkill(SkillDefOf.Social).TotallyDisabled)
            {
                reason = "TradeSchedulingAgreementCompProperties_SkilLDisabled".Translate();
                return(false);
            }

            return(true);
        }
        public override bool CanSign(Alliance alliance, AllianceAgreementDef allianceAgreementDef, Pawn speaker, out string reason)
        {
            if (!base.CanSign(alliance, allianceAgreementDef, speaker, out reason))
            {
                return(false);
            }

            if ((int)speaker.Faction?.def.techLevel < (int)MinFactionTechLevel)
            {
                reason = "DefenseContractCompProperties_FactionTechLevelLack".Translate(speaker.Faction.Name, speaker.Faction.def.techLevel.ToStringHuman(), MinFactionTechLevel.ToStringHuman());
                return(false);
            }

            return(true);
        }
Пример #3
0
 public override void MenuSelect(QuestRim.Alliance alliance, AllianceAgreementDef allianceAgreementDef, Pawn negotiator)
 {
     Find.WindowStack.Add(new TradeSchedulingAgreementWindow(alliance, this, negotiator));
 }
 public override void MenuSelect(QuestRim.Alliance alliance, AllianceAgreementDef allianceAgreementDef, Pawn negotiator)
 {
     Find.WindowStack.Add(new DefenseContractCompWindow(alliance, this, negotiator));
 }