Exemple #1
0
        public listFactionPolicyFC(PolicyFCDef def, int policySlot, string headerString)
        {
            List <PolicyFCDef> tmp = new List <PolicyFCDef>();

            tmp.AddRange(DefDatabase <PolicyFCDef> .AllDefsListForReading);
            //Log.Message(tmp.Count().ToString());
repeat:
            foreach (PolicyFCDef policy in tmp)              //Remove null options
            {
                if (policy.type == returnPolicyTypeBySlot(policySlot))
                {
                    list.Add(policy);
                    tmp.Remove(policy);
                    goto repeat;
                }
            }

            this.forcePause          = false;
            this.draggable           = true;
            this.doCloseX            = true;
            this.preventCameraMotion = false;
            this.policySlot          = policySlot;
            this.def          = def;
            this.headerString = headerString;
        }
Exemple #2
0
        public listSettlementPolicyFC(PolicyFCDef def, int policySlot, SettlementFC settlement)
        {
            List <PolicyFCDef> tmp = DefDatabase <PolicyFCDef> .AllDefsListForReading;

repeat:
            foreach (PolicyFCDef policy in tmp)              //Remove null options
            {
                if (policy.type == returnPolicyTypeBySlot(policySlot))
                {
                    list.Add(policy);
                    tmp.Remove(policy);
                    goto repeat;
                }
            }

            this.forcePause          = false;
            this.draggable           = true;
            this.doCloseX            = true;
            this.preventCameraMotion = false;
            this.settlement          = settlement;
            this.policySlot          = policySlot;
            this.def = def;
        }