示例#1
0
		public void GenerateTent()
		{
			TentWalls walls = new TentWalls( TentStyle.Newbie );
			TentRoof roof = new TentRoof( m_RoofHue );
			//TentTrim trim = new TentTrim();
			TentFloor floor = new TentFloor();
			            						
			walls.MoveToWorld( this.Location, this.Map );
			roof.MoveToWorld( this.Location, this.Map );
			//trim.MoveToWorld( this.Location, this.Map );
			floor.MoveToWorld( this.Location, this.Map );
			
			Addons.Add( walls );
			Addons.Add( roof );
			//Addons.Add( trim );
			Addons.Add( floor );

			// Create tent bed
			m_Tentbed = new TentBedRoll( this );
			m_Tentbed.MoveToWorld( new Point3D( this.X, this.Y + 1, this.Z ), this.Map );
			m_Tentbed.Movable = false;

			// Create secute tent pack within the tent
			m_Tentpack = new TentBackpack( this );
			m_Tentpack.MoveToWorld( new Point3D( this.X-1, this.Y-1, this.Z), this.Map );
			SecureInfo info = new SecureInfo( (Container) m_Tentpack, SecureLevel.Anyone );
			m_Tentpack.IsSecure = true;
			this.Secures.Add( info );
			m_Tentpack.Movable = false;
			m_Tentpack.Hue = m_RoofHue;
		}
示例#2
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			m_Tentbed = (TentBedRoll) reader.ReadItem();
			m_Tentpack = (TentBackpack) reader.ReadItem();
		}