public static Room applyRoomCodeBits(Room R, Room lastRoom, Map<Room,Room> petShops, long codeBits, boolean circleFormat)
	{
		final Ability prop_RoomCapacity=CMClass.getAbility("Prop_ReqCapacity");
		final Ability prop_RoomLevels=CMClass.getAbility("Prop_ReqLevels");

		if(CMath.isSet(codeBits,21)) // underwater room
			R=changeRoomClass(R,"UnderWater");

		if(CMath.isSet(codeBits,3)) // indoors
			R=changeRoomClass(R,"StoneRoom");

		if(CMath.isSet(codeBits,0)) // dark room
			R.addNonUninvokableEffect(CMClass.getAbility("Prop_RoomDark"));

		//if(CMath.isSet(codeBits,1)) //BANKS are forked up in the ROM files, who knows WHAT this is...
		// circlemud says this is a death trap -- well, homie dont play dat either

		if(CMath.isSet(codeBits,2)) // no mobs room
			R.addNonUninvokableEffect(CMClass.getAbility("Prop_ReqNoMOB"));

		// 3 is a room type change, so above

		if(circleFormat)
		{
			if(CMath.isSet(codeBits,4)) // circle says no violence
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_Peacemaker"));

			if(CMath.isSet(codeBits,5)) // circle says quiet
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoChannel"));

			//if(CMath.isSet(codeBits,6)) // circle says no tracking

			if(CMath.isSet(codeBits,7)) // circle says no magic
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_MagicFreedom"));

			if(CMath.isSet(codeBits,8)) // solitaire room
			{
				prop_RoomCapacity.setMiscText("1");
				if(R.fetchEffect(prop_RoomCapacity.ID())==null)
					R.addNonUninvokableEffect(prop_RoomCapacity);
			}

			if(CMath.isSet(codeBits,9)) // no teleport in
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoTeleport"));

			if(CMath.isSet(codeBits,10))
			{
				prop_RoomLevels.setMiscText("SYSOP");
				if(R.fetchEffect(prop_RoomLevels.ID())==null)
					R.addNonUninvokableEffect(prop_RoomLevels);
			}
			// 11 is a house
			// 12 is a savable house
			// 13 is an atrium
			// 14 is an olc
			// 15 is an marked

			if(CMath.isSet(codeBits,16))
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_reqPKill"));

			if(CMath.isSet(codeBits,17))
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoRecall"));

			// 18 = guarded
			// 19 pulse damage
			// 20 no ooc
			// 21 can fish
			// 22 can fish
			// 23 nodig
			// 24 nobury
			// 25 twnhs
			// 26 customhs
			// 27 requires vehicle
			// 28 below ground
			// 29 rooms moves with random currents?!
			// 30 timed death trap
			// 31 word map style maps here
			// 32 mining
			// 33 mining+10
			// 34 mining+25
			// 35 healing/xp bonus
		}
		else
		{
			if(CMath.isSet(codeBits,4)) // no summon out room
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoSummon"));

			if(CMath.isSet(codeBits,9)) // two people only room
			{
				prop_RoomCapacity.setMiscText("2");
				if(R.fetchEffect(prop_RoomCapacity.ID())==null)
					R.addNonUninvokableEffect(prop_RoomCapacity);
			}
			if(CMath.isSet(codeBits,10)) // no fighting
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_PeaceMaker"));

			if(CMath.isSet(codeBits,11)) // solitaire room
			{
				prop_RoomCapacity.setMiscText("1");
				if(R.fetchEffect(prop_RoomCapacity.ID())==null)
					R.addNonUninvokableEffect(prop_RoomCapacity);
			}
			if(CMath.isSet(codeBits,12))
				petShops.put(R,R);
			else
			if((lastRoom!=null)&&(petShops.get(lastRoom)!=null)&&(petShops.get(lastRoom)==lastRoom))
			{
				petShops.remove(lastRoom);
				petShops.put(R,lastRoom); // now ready to plop stuff!
			}

			if(CMath.isSet(codeBits,13))
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoRecall"));

			if(CMath.isSet(codeBits,14))
			{
				prop_RoomLevels.setMiscText("SYSOP");
				if(R.fetchEffect(prop_RoomLevels.ID())==null)
					R.addNonUninvokableEffect(prop_RoomLevels);
			}
			if(CMath.isSet(codeBits,15))
			{
				prop_RoomLevels.setMiscText(">=93");
				if(R.fetchEffect(prop_RoomLevels.ID())==null)
					R.addNonUninvokableEffect(prop_RoomLevels);
			}
			if(CMath.isSet(codeBits,16))
			{
				prop_RoomLevels.setMiscText(">=91");
				if(R.fetchEffect(prop_RoomLevels.ID())==null)
					R.addNonUninvokableEffect(prop_RoomLevels);
			}
			if(CMath.isSet(codeBits,17))
			{
				prop_RoomLevels.setMiscText("<=5");
				if(R.fetchEffect(prop_RoomLevels.ID())==null)
					R.addNonUninvokableEffect(prop_RoomLevels);
			}

			if(CMath.isSet(codeBits,18))
			{
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoSummon"));
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoCharm"));
			}

			if(CMath.isSet(codeBits,19))
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_reqPKill"));

			if(CMath.isSet(codeBits,20))
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoTeleportOut"));

			// if(CMath.isSet(codeBits,23)) No "dirt" in CoffeeMud, so this doesn't matter

			if(CMath.isSet(codeBits,24))
				R.addNonUninvokableEffect(CMClass.getAbility("Prop_NoChannel"));
		}
		return R;
	}