diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index 9ef427f6afa6..38c6be181029 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -25184,7 +25184,7 @@ /turf/open/floor/plating, /area/syndicate_mothership/control) "pgm" = ( -/obj/item/hilbertshotel/ghostdojo, +/obj/item/hilbertshotel/ghostdojo/ghostcafe, /turf/open/indestructible/hotelwood, /area/centcom/holding) "pgn" = ( diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 6dc73d6cca80..8dd84b3b2e62 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -31,6 +31,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) var/list/activeRooms = list() var/list/storedRooms = list() var/list/checked_in_ckeys = list() + var/list/lockedRooms = list() var/storageTurf //Lore Stuff var/ruinSpawned = FALSE @@ -91,6 +92,11 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) return chosenRoomNumber = input(user, "What number room will you be checking into?", "Room Number") as null|num + if(!mob_dorms[user] || !mob_dorms[user].Find(chosenRoomNumber)) //BLUEMOON ADD владелец комнаты может зайти в комнату даже если она закрыта и активна + if(activeRooms.len && activeRooms["[chosenRoomNumber]"]) //лесенка ради удобства восприятия, точно-точно говорю + if(lockedRooms.len && lockedRooms["[chosenRoomNumber]"]) + to_chat(user, span_warning("You cant enter in locked room, contact with room owner.")) + return //BLUEMOON ADD END if(max_rooms > 0 && mob_dorms[user]?.len >= max_rooms && !activeRooms["[chosenRoomNumber]"] && !storedRooms["[chosenRoomNumber]"]) to_chat(user, span_warning("Your free trial of Hilbert's Hotel has ended! Please select one of the rooms you've already visited.")) chosenRoomNumber = input(user, "Select one of your previous rooms", "Room number") as null|anything in mob_dorms[user] @@ -317,7 +323,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) currentArea.reservation = currentReservation for(var/turf/closed/indestructible/hoteldoor/door in currentArea) door.parentSphere = src - door.desc = "The door to this hotel room. The placard reads 'Room [currentRoomnumber]'. Strange, this door doesnt even seem openable. The doorknob, however, seems to buzz with unusual energy...
Alt-Click to look through the peephole." + door.roomnumber = currentRoomnumber for(var/turf/open/space/bluespace/BSturf in currentArea) BSturf.parentSphere = src @@ -373,7 +379,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) var/area/hilbertshotel/currentArea = get_area(locate(currentReservation.bottom_left_coords[1], currentReservation.bottom_left_coords[2], currentReservation.bottom_left_coords[3])) for(var/turf/closed/indestructible/hoteldoor/door in currentArea) door.parentSphere = src - door.desc = "The door to this hotel room. Strange, this door doesnt even seem openable. The doorknob, however, seems to buzz with unusual energy...
Alt-Click to look through the peephole." + door.roomnumber = currentRoomnumber //Template Stuff /datum/map_template/hilbertshotel @@ -432,6 +438,8 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) icon_state = "hoteldoor" explosion_block = INFINITY var/obj/item/hilbertshotel/parentSphere + var/roomnumber + desc = "The door to this hotel room. Strange, this door doesnt even seem openable. The doorknob, however, seems to buzz with unusual energy..." /turf/closed/indestructible/hoteldoor/proc/promptExit(mob/living/user) if(!isliving(user)) diff --git a/modular_bluemoon/SmiLeY/code/hilbertshotel_ghost.dm b/modular_bluemoon/SmiLeY/code/hilbertshotel_ghost.dm index e28baa3bf87e..fb6d391d437a 100644 --- a/modular_bluemoon/SmiLeY/code/hilbertshotel_ghost.dm +++ b/modular_bluemoon/SmiLeY/code/hilbertshotel_ghost.dm @@ -1,7 +1,13 @@ +/obj/item/hilbertshotel + var/rooms_can_be_locked = FALSE + /obj/item/hilbertshotel/ghostdojo name = "infinite dormitories" anchored = TRUE +/obj/item/hilbertshotel/ghostdojo/ghostcafe + rooms_can_be_locked = TRUE + /obj/item/hilbertshotel/ghostdojo/attack_hand(mob/user, list/modifiers) . = ..() if(.) @@ -16,6 +22,37 @@ return //you can't enter infinity dormitories if you are a role return promptAndCheckIn(user, user) +/turf/closed/indestructible/hoteldoor/CtrlClick(mob/user) + . = ..() + var/area/hilbertshotel/HB = get_area(src) + var/roomnumber = "[HB.roomnumber]" + if(!parentSphere) + return + if(!parentSphere.rooms_can_be_locked) + return + if(!parentSphere.mob_dorms[user] || !parentSphere.mob_dorms[user].Find(HB.roomnumber)) + return + if(get_dist(get_turf(src), get_turf(user)) > 1) + return + + if(parentSphere.lockedRooms[roomnumber]) + parentSphere.lockedRooms -= roomnumber + playsound(src, 'sound/machines/locker_open.ogg', 50, 1) + else + parentSphere.lockedRooms[roomnumber] = TRUE + playsound(src, 'sound/machines/locker_close.ogg', 50, 1) + + to_chat(user, "You [parentSphere.lockedRooms[roomnumber] ? "locked" : "unlocked"] room...") + +/turf/closed/indestructible/hoteldoor/examine(mob/user) + . = ..() + if(!isliving(user)) + return + . += "The placard reads 'Room [roomnumber]'." + . += "Alt-Click to look through the peephole." + if(parentSphere && parentSphere.rooms_can_be_locked) + . += "Ctrl-Click to lock door if you owner of the room." + /datum/map_template/hilbertshotel/apartment name = "Apartment" mappath = '_maps/templates/apartment.dmm'