From 19123a1b8f9135491fba823ccd0d6a60312b88a0 Mon Sep 17 00:00:00 2001 From: Redmoogle Date: Sat, 23 Mar 2024 08:05:04 -0400 Subject: [PATCH] fixes hilbert --- .../ruins/spaceruin_code/hilbertshotel.dm | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 7582c07dc184..04f79c27ebbe 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -120,21 +120,19 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) /obj/item/hilbertshotel/proc/sendToNewRoom(roomNumber, mob/user) var/datum/turf_reservation/roomReservation = SSmapping.request_turf_block_reservation(hotelRoomTemp.width, hotelRoomTemp.height) - if(ruinSpawned) - mysteryRoom = GLOB.hhmysteryRoomNumber - if(roomNumber == mysteryRoom) - hotelRoomTempLore.load(locate(roomReservation.bottom_left_turfs[1], roomReservation.bottom_left_turfs[2], roomReservation.bottom_left_turfs[3])) - else - hotelRoomTemp.load(locate(roomReservation.bottom_left_turfs[1], roomReservation.bottom_left_turfs[2], roomReservation.bottom_left_turfs[3])) + var/turf/bottomLeft = roomReservation.bottom_left_turfs[1] + if(ruinSpawned && (roomNumber == GLOB.hhmysteryRoomNumber)) + hotelRoomTempLore.load(bottomLeft) else - hotelRoomTemp.load(locate(roomReservation.bottom_left_turfs[1], roomReservation.bottom_left_turfs[2], roomReservation.bottom_left_turfs[3])) + hotelRoomTemp.load(bottomLeft) activeRooms["[roomNumber]"] = roomReservation linkTurfs(roomReservation, roomNumber) do_sparks(3, FALSE, get_turf(user)) - user.forceMove(locate(roomReservation.bottom_left_turfs[1] + hotelRoomTemp.landingZoneRelativeX, roomReservation.bottom_left_turfs[2] + hotelRoomTemp.landingZoneRelativeY, roomReservation.bottom_left_turfs[3])) + user.forceMove(locate(bottomLeft.x + hotelRoomTemp.landingZoneRelativeX, bottomLeft.y + hotelRoomTemp.landingZoneRelativeY, bottomLeft.z)) /obj/item/hilbertshotel/proc/linkTurfs(datum/turf_reservation/currentReservation, currentRoomnumber) - var/area/hilbertshotel/currentArea = get_area(locate(currentReservation.bottom_left_turfs[1], currentReservation.bottom_left_turfs[2], currentReservation.bottom_left_turfs[3])) + var/turf/bottomLeft = currentReservation.bottom_left_turfs[1] + var/area/hilbertshotel/currentArea = get_area(bottomLeft) currentArea.name = "Hilbert's Hotel Room [currentRoomnumber]" currentArea.parentSphere = src currentArea.storageTurf = storageTurf @@ -150,9 +148,10 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) if(activeRooms.len) for(var/x in activeRooms) var/datum/turf_reservation/room = activeRooms[x] + var/turf/bottomLeft = room.bottom_left_turfs[1] for(var/i=0, i