Important quickfix (check active room for room type input)

This commit is contained in:
ariaworld
2024-01-08 17:23:37 +01:00
parent c7c5179cf4
commit 61b5128634
4 changed files with 307 additions and 147 deletions
@@ -93,14 +93,14 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
if(!isturf(loc))
if((loc == user) || (loc.loc == user) || (loc.loc in user.contents) || (loc in user.GetAllContents(type))) //short circuit, first three checks are cheaper and covers almost all cases (loc.loc covers hotel in box in backpack).
forceMove(get_turf(user))
//SPLURT EDIT START
// Check if the room is already active, if so, skip room type selection
var/chosen_room = "Nothing"
if(istype(src, /obj/item/hilbertshotel))
// Only show the room type selection if the room limit has not been reached
chosen_room = tgui_input_list(user, "Choose your desired room:", "♦️ Time to choose a room ♦️!", hotel_maps)
if(!chosen_room)
return FALSE
if(!activeRooms["[chosenRoomNumber]"])
chosen_room = tgui_input_list(user, "Choose your desired room:", "♦️ Time to choose a room ♦️!", hotel_maps)
if(!chosen_room)
return FALSE
//SPLURT EDIT END
if(!storageTurf) //Blame subsystems for not allowing this to be in Initialize