示例#1
0
        /// <summary>
        /// Constructor for Place using Fief_Serialised, Province_Serialised or Kingdom_Serialised object.
        /// For use when de-serialising.
        /// </summary>
        /// <param name="fs">Fief_Serialised object to use as source</param>
        /// <param name="ps">Province_Serialised object to use as source</param>
        /// <param name="ks">Kingdom_Serialised object to use as source</param>
        public Place(Fief_Serialised fs = null, Province_Serialised ps = null, Kingdom_Serialised ks = null)
        {
            Place_Serialised placeToUse = null;

            if (fs != null)
            {
                placeToUse = fs;
            }
            else if (ps != null)
            {
                placeToUse = ps;
            }
            else if (ks != null)
            {
                placeToUse = ks;
            }

            if (placeToUse != null)
            {
                this.id   = placeToUse.id;
                this.name = placeToUse.name;
                // owner to be inserted later
                this.owner       = null;
                this.titleHolder = placeToUse.titleHolder;
                // rank to be inserted later
                this.rank = null;
            }
        }
示例#2
0
 /// <summary>
 /// Constructor for Kingdom using Kingdom_Serialised object.
 /// For use when de-serialising.
 /// </summary>
 /// <param name="ks">Kingdom_Serialised object to use as source</param>
 public Kingdom(Kingdom_Serialised ks)
     : base(ks: ks)
 {
     // nationality to be inserted later
     this.nationality = null;
 }