Update hilbertshotel.dm

This commit is contained in:
kevinz000
2020-01-23 19:07:17 -07:00
committed by GitHub
parent 5ce80078ab
commit 65871ca1d3

View File

@@ -54,7 +54,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
to_chat(user, "<span class='warning'>That is not a valid room number!</span>")
return
if(!isturf(loc))
if((loc == user) || (loc.loc == user) || (loc in user.GetAllContents(type)) //short circuit, first two checks are cheaper.
if((loc == user) || (loc.loc == user) || (loc.loc in user.contents) || (loc in user.GetAllContents(type)) //short circuit, first two checks are cheaper and covers almost all case (loc.loc covers hotel in box in backpack).
forceMove(get_turf(user))
if(!storageTurf) //Blame subsystems for not allowing this to be in Initialize
if(!GLOB.hhStorageTurf)