From 3b7eca634cf1bd64fd23e6f030976b1ff56bbebd Mon Sep 17 00:00:00 2001 From: ariaworld <143797359+ariaworld@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:48:50 +0100 Subject: [PATCH] Attempt 1 in Storing rooms --- .../ruins/spaceruin_code/hilbertshotel.dm | 61 ++++++++++++++++--- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 0fc2b9d413..811b420c9e 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -95,9 +95,9 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) forceMove(get_turf(user)) //SPLURT EDIT START - // Check if the room is already active, if so, skip room type selection + // Check if the room is already active or stored, if so, skip room type selection var/chosen_room = "Nothing" - if(!activeRooms["[chosenRoomNumber]"]) + if(!activeRooms["[chosenRoomNumber]"] && !storedRooms["[chosenRoomNumber]"]) chosen_room = tgui_input_list(user, "Choose your desired room:", "♦️ Time to choose a room ♦️!", hotel_maps) if(!chosen_room) return FALSE @@ -114,9 +114,8 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) checked_in_ckeys |= user.ckey //if anything below runtimes, guess you're outta luck! if(tryActiveRoom(chosenRoomNumber, user)) return - //SPLURT EDIT: Commented out until a way to save turfs is found - // if(tryStoredRoom(chosenRoomNumber, user, chosen_room)) - // return + if(tryStoredRoom(chosenRoomNumber, user, chosen_room)) + return sendToNewRoom(chosenRoomNumber, user, chosen_room) /obj/item/hilbertshotel/proc/get_room_type(chosen_room) //Currently unused @@ -138,6 +137,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) var/obj/item/abstracthotelstorage/storageObj = new(storageTurf) storageObj.roomNumber = roomnumber storageObj.parentSphere = parentSphere + storageObj.roomType = roomType // Save the room type here storageObj.name = "Room [roomnumber] Storage" for(var/i=0, i