Skip to content

Commit

Permalink
TGS Test Merge (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgstation-server committed Jan 23, 2025
2 parents 00d0fff + 24c6796 commit c5ac776
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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" = (
Expand Down
12 changes: 10 additions & 2 deletions code/modules/ruins/spaceruin_code/hilbertshotel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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...<br /><span class='info'>Alt-Click to look through the peephole.</span>"
door.roomnumber = currentRoomnumber
for(var/turf/open/space/bluespace/BSturf in currentArea)
BSturf.parentSphere = src

Expand Down Expand Up @@ -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...<br /><span class='info'>Alt-Click to look through the peephole.</span>"
door.roomnumber = currentRoomnumber

//Template Stuff
/datum/map_template/hilbertshotel
Expand Down Expand Up @@ -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))
Expand Down
37 changes: 37 additions & 0 deletions modular_bluemoon/SmiLeY/code/hilbertshotel_ghost.dm
Original file line number Diff line number Diff line change
@@ -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(.)
Expand All @@ -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, "<span class='notice'>You [parentSphere.lockedRooms[roomnumber] ? "locked" : "unlocked"] room...</span>")

/turf/closed/indestructible/hoteldoor/examine(mob/user)
. = ..()
if(!isliving(user))
return
. += "The placard reads 'Room [roomnumber]'."
. += "<span class='info'>Alt-Click to look through the peephole.</span>"
if(parentSphere && parentSphere.rooms_can_be_locked)
. += "<span class='info'>Ctrl-Click to lock door if you owner of the room.</span>"

/datum/map_template/hilbertshotel/apartment
name = "Apartment"
mappath = '_maps/templates/apartment.dmm'
Expand Down

0 comments on commit c5ac776

Please sign in to comment.