diff --git a/code/__DEFINES/_hotel_defines.dm b/code/__DEFINES/_hotel_defines.dm new file mode 100644 index 0000000000..0c06aa314f --- /dev/null +++ b/code/__DEFINES/_hotel_defines.dm @@ -0,0 +1,8 @@ +#define HOTEL_UNLOCKED 0 +#define HOTEL_WHITELIST 1 +#define HOTEL_PASSWORD 2 +#define HOTEL_PERMISSION 3 +#define HOTEL_ONLY_OWNER 4 + + + diff --git a/code/controllers/subsystem/hotel_subsystem.dm b/code/controllers/subsystem/hotel_subsystem.dm new file mode 100644 index 0000000000..98fe4b7862 --- /dev/null +++ b/code/controllers/subsystem/hotel_subsystem.dm @@ -0,0 +1,24 @@ +SUBSYSTEM_DEF(hotel) + name = "Hotel" + init_order = INIT_ORDER_HOLODECK + var/list/room_prefabs = list() + var/list/existing_rooms = list() + +/datum/controller/subsystem/hotel/Initialize(start_timeofday) + GeneratePrefabs() + GenerateMapspawnRooms() + . = ..() + +/datum/controller/subsystem/hotel/proc/GeneratePrefabs() + + + + + + + + + + + + diff --git a/code/modules/hotel/hotel_prefab_datum.dm b/code/modules/hotel/hotel_prefab_datum.dm new file mode 100644 index 0000000000..9220dba9f4 --- /dev/null +++ b/code/modules/hotel/hotel_prefab_datum.dm @@ -0,0 +1,81 @@ +/* + * File: hotel_prefab_datum.dm + * Author: Kelly + * Date: 2021-07-07 + * License: WWW.PLAYAPOCALYPSE.COM + * + * Description: A datum that holds all the interesting data about a hotel prefab. + * + * Contains the following: + * - Map template datum + * - data from the datum + * - Parsed map landmarks + * + * */ + +/datum/hotel_prefab + var/datum/map_template/map_template + var/list/spawn_offsets + + +/datum/hotel_prefab/proc/GetSpawnOffsets(datum/turf_reservation/trev) + if(!trev) + return list(3, 9) // Default spawn offsets? + if(!islist(spawn_offsets)) + ParseReservation(trev) + return spawn_offsets + +/// takes in a turf reservation and looks for all the relevant stuff +/datum/hotel_prefab/proc/ParseReservation(datum/turf_reservation/trev) + var/turf/BL = locate(trev.bottom_left_coords[1], trev.bottom_left_coords[2], trev.bottom_left_coords[3]) + var/turf/TR = locate(trev.top_right_coords[1], trev.top_right_coords[2], trev.top_right_coords[3]) + var/list/reserved = block(BL, TR) + spunk: + for(var/turf/T in reserved) + var/relative_x = T.x - BL.x + var/relative_y = T.y - BL.y + for(var/obj/effect/landmark/hotel_landmark/L in T) + if(L) + spawn_offsets = list(relative_x, relative_y) + break spunk // ew + + + + + + + + + + + if(activeRooms.len) + for(var/x in activeRooms) + var/datum/turf_reservation/room = activeRooms[x] + for(var/i=0, iAs the sphere breaks apart, you're suddenly ejected into the depths of space!") + var/max = world.maxx-TRANSITIONEDGE + var/min = 1+TRANSITIONEDGE + var/list/possible_transtitons = list() + for(var/AZ in SSmapping.z_list) + var/datum/space_level/D = AZ + if (D.linkage == CROSSLINKED) + possible_transtitons += D.z_value + var/_z = pick(possible_transtitons) + var/_x = rand(min,max) + var/_y = rand(min,max) + var/turf/T = locate(_x, _y, _z) + A.forceMove(T) + qdel(room) + + + + + + + + diff --git a/code/modules/hotel/hotel_prefabs.dm b/code/modules/hotel/hotel_prefabs.dm new file mode 100644 index 0000000000..10fc41e4f3 --- /dev/null +++ b/code/modules/hotel/hotel_prefabs.dm @@ -0,0 +1,173 @@ +/datum/map_template/hilbertshotel/lore + name = "Doctor Hilbert's Deathbed" + mappath = '_maps/templates/hilbertshotellore.dmm' + +/datum/map_template/hilbertshotelstorage + name = "Hilbert's Hotel Storage" + mappath = '_maps/templates/hilbertshotelstorage.dmm' + +// Better SPLURT version of hilbert's +/datum/map_template/hilbertshotel + var/room_title = "Hotel Room" + var/room_short_desc = "A roomy room in a hotel." + var/room_long_desc = "An all-purpose hotel room with coziness and comfort in mind. \ + Comes with a spacious living room, an even more spacious bedroom, a bathroom you could get lost in, \ + and a kitchen that's just the right size for a midnight snack." + var/landingZoneRelativeX = 2 + var/landingZoneRelativeY = 8 + mappath = '_maps/templates/splurt_templates/hilbertshotel.dmm' + +// Empty room - different due to the dimensions of the updated map +/datum/map_template/hilbertshotel/empty + name = "Empty Room" + room_title = "Vacant Room" + room_short_desc = "An empty room in a hotel." + room_long_desc = "Our basic hotel room, minus the furniture. \ + You can furnish it however you like, or just leave it empty. \ + We won't judge." + mappath = '_maps/templates/splurt_templates/hilbertshotelempty.dmm' + +// SELECTABLE APARTMENTS UPDATE +/datum/map_template/hilbertshotel/apartment/one + name = "Apartment_1" + room_title = "Couples Apartment" + room_short_desc = "A cozy apartment for couples." + room_long_desc = "A more subdivided apartment for those who want a little more intimacy. \ + One bedroom with a queen-sized bed and kilobaud-ready computer, one games room / living room \ + / love nest, one bathroom with a shower and a bathtub, and a dining room with a kitchenette. \ + Perfect for couples who want to get away from it all." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_1.dmm' + +/datum/map_template/hilbertshotel/apartment/two + name = "Apartment_2" + room_title = "Party Apartment" + room_short_desc = "The perfect destination for parties!" + room_long_desc = "A larger apartment for those who want to throw a party. \ + Comes with a spacious activity den with a multipurpose table, connected to a kitchen bar. \ + Also includes a bedroom with a king-sized bed and your very own FunSquare(TM). Bathroom \ + comes standard with Urbworld 7170 style showerpool. Perfect for those who want to throw a party." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_2.dmm' + +/datum/map_template/hilbertshotel/apartment/three + name = "Apartment_3" + room_title = "Club Apartment" + room_short_desc = "A club apartment for the party animals." + room_long_desc = "A club apartment for those who want to party all night long. \ + Comes with a Vampire Queen descending entry hall (with complimentary decorative air alarm) \ + leading to a Standing Room Only dining room / bar combo, complete with wall-facing color TV. \ + Master bedroom includes a king-sized bed and secret dildo closet. Microbathroom is perfect for \ + microfolk. Perfect for those who aren't sure what they want, but know they want it now." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_3.dmm' + +/datum/map_template/hilbertshotel/apartment/four + name = "Apartment_4" + room_title = "Urban Apartment" + room_short_desc = "A keen apartment for the keen." + room_long_desc = "A clever hide-a-way apartment for the more adventurous type. \ + An authentic sampling of the urban lifestyle, sourced from refurbished city buildings. \ + Fixer-upper cloakroom leads into the BreakfastWall, complete with fifth generation Ma's Grundle \ + planterrarium. Living room includes an extra-large sofa, fireplace, and a 17\" color TV. \ + Bedroom with secret sex dungeon, and bath sauna with a view. Includes decorative elevator and \ + dingy hallway. Pets welcome." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_4.dmm' + +/datum/map_template/hilbertshotel/apartment/bar + name = "Apartment_bar" + room_title = "Brownstone Pub" + room_short_desc = "Your very own pub, freshly renovated." + room_long_desc = "A personal pub for those who want to drink in style. \ + Comes with a bar, a cards nook, booths, and a recently clearned unisex men's room. \ + Bar is fully stocked with a variety of drinks, including a few you've never heard of. \ + Perfect for large parties, or for those who want to drink alone in public." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_bar.dmm' + +/datum/map_template/hilbertshotel/apartment/big + name = "Apartment_big" + room_title = "Big Apartment" + room_short_desc = "A macro-sized apartment for the macro-minded." + room_long_desc = "The perfect destination for the plus sized in any dimension! \ + Rustic Hangar (TM) living room guaranteed to provide ample headroom for up to Kaiju-EX MacroScale \ + guests. Comes with Olympic-sized hot tub. Includes Dragon King sized bed (bedside elevators available \ + on request). Doorways guaranteed at least 16.5 Nowaks wide. Perfect for those who want to live large." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_big.dmm' + +/datum/map_template/hilbertshotel/apartment/garden + name = "Apartment_garden" + room_title = "Garden Park" + room_short_desc = "A moonlit grove for the nature lover." + room_long_desc = "Your very own piece of the great outdoors! \ + Authentic nature retreat with a Keystone Tree, benches, wildflowers, and fresh-cut grass. \ + Sourced from the finest nature reserves in the galaxy. Allergy information available upon request. \ + Perfect for those who looking for terrafirma." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_garden.dmm' + +/datum/map_template/hilbertshotel/apartment/sauna + name = "Apartment_sauna" + room_title = "Bath House Sauna" + room_short_desc = "A resort for the wet and wild." + room_long_desc = "An authentic bath house sauna for those who want to get steamy. \ + Comes with a steam room, a relaxation parlor, a sex den, and the deadliest pool \ + I've ever seen, my goodness. Secret dildo cave included. Perfect for those who want to \ + relax and unwind, or break their necks." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_sauna.dmm' + +//FB maps +// /datum/map_template/hilbertshotel/apartment/movietheater +// name = "Movie_Theater" +// mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/movie_theater.dmm' + +// /datum/map_template/hilbertshotel/apartment/dungeon_one +// name = "Dungeon-One" +// mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/dungeon_1.dmm' + +/datum/map_template/hilbertshotel/apartment/oasis_one + name = "oasis-One" + room_title = "Midnight Oasis" + room_short_desc = "A desert oasis for the weary traveler." + room_long_desc = "A desert oasis for the warm sands enthusiast. \ + Quartz sand, palm trees, and a cool pool to relax in. Harem tent included." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/oasis_1.dmm' + +/datum/map_template/hilbertshotel/apartment/snowcabin_one + name = "snowcabin-One" + room_title = "Alpine Cabin" + room_short_desc = "A snowy cabin for the winter lover." + room_long_desc = "A snowy cabin for the winter lover. \ + Bring a coat, because winter is here in this hoarfrost hideaway! \ + Rustic hunting cabin with a roaring fire (just add wood). \ + Ice fishing hole included." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/snowcabin_1.dmm' + +// /datum/map_template/hilbertshotel/apartment/hospital_one +// name = "Hospital" +// mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/hospital.dmm' + +/datum/map_template/hilbertshotel/apartment/chessboard + name = "Chess" + room_title = "Chessboard" + room_short_desc = "A chessboard for the strategic thinker." + room_long_desc = "A chessboard for the strategic thinker. \ + Comes with a chessboard, a chessboard, and a chessboard. \ + Perfect for those who want to play chess." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/chess.dmm' + +/datum/map_template/hilbertshotel/apartment/glade_one + name = "Glade-One" + room_title = "Sylvan Glade" + room_short_desc = "A sylvan glade for the nature lover." + room_long_desc = "A forest clearing for the nature lover. \ + Comes with a forest, a clearing, and a forest clearing. \ + Perfect for those who want to be in a forest clearing." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/glade_1.dmm' + +/datum/map_template/hilbertshotel/apartment/wildsauna_one + name = "Wildsauna-One" + room_title = "Cave Hot Spring" + room_short_desc = "A natural hot spring for the weary traveler." + room_long_desc = "A natural hot spring for the weary traveler. \ + Comes with a hot spring, a cave, and a hot spring cave. \ + Perfect for those who want to relax in a hot spring cave." + mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/wildsauna_1.dmm' + + + diff --git a/code/modules/hotel/hotel_room_data.dm b/code/modules/hotel/hotel_room_data.dm new file mode 100644 index 0000000000..2d168ab9b9 --- /dev/null +++ b/code/modules/hotel/hotel_room_data.dm @@ -0,0 +1,54 @@ +/* + * File: hotel_room_data.dm + * Author: Kelly + * Date: 2021-07-07 + * Description: A datum assigned to a hotel room that holds all the cool data about it. + * + * Contains the following: + * - Room ID (internal) + * - Room name + * - Room description + * - Room prefab path + * - Owner name (if applicable) + * - Owner key (if applicable) + * - Whether or not it was spawned by the game or a player + * - Its visibility on the list + * - Who can access it + * - How people can access it (key, password, etc) + * - Who to contact for access + * + * */ + +// Room data +/datum/hotel_room_data + var/owner_name = "" + var/owner_key = "" + var/room_id = "" + var/room_name = "" + var/room_description = "" + var/room_prefab_key = "" + var/area/my_area + var/spawn_x = 0 + var/spawn_y = 0 + var/spawned_by_player = FALSE + var/visible_on_list = TRUE + var/access_style = HOTEL_UNLOCKED + var/list/whitelist = list() + var/list/blacklist = list() + + + + + + + + + + + + + + + + + diff --git a/code/modules/hotel/hyperspace_hotel.dm b/code/modules/hotel/hyperspace_hotel.dm new file mode 100644 index 0000000000..b2b2970495 --- /dev/null +++ b/code/modules/hotel/hyperspace_hotel.dm @@ -0,0 +1,26 @@ +/* + * Name: Hyperspace Hotel + * Author: Kelly + * Date: 2021-07-07 + * Description: A system to load any sort of room prefab into the middle of nowhere. + * + * Kinda like hilbert's hotel, but better, because I made it. + * + * */ + +/obj/effect/hotel_access_point + name = "hotel access point" + desc = "A handy link between here and there. Where is there? And how do you get there? That's for you to decide!" + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "hilbertshotel" + +/obj/effect/hotel_access_point/attack_hand(mob/user, act_intent, attackchain_flags) + SShotel.ClickedThing(user, src) + + + + + + + + diff --git a/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm b/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm index 0a687a345f..509be342e9 100644 --- a/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm +++ b/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm @@ -163,80 +163,6 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) //SPLURT EDIT END -// Better SPLURT version of hilbert's -/datum/map_template/hilbertshotel - mappath = '_maps/templates/splurt_templates/hilbertshotel.dmm' - -// Empty room - different due to the dimensions of the updated map -/datum/map_template/hilbertshotel/empty - mappath = '_maps/templates/splurt_templates/hilbertshotelempty.dmm' - -// SELECTABLE APARTMENTS UPDATE -/datum/map_template/hilbertshotel/apartment/one - name = "Apartment_1" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_1.dmm' - -/datum/map_template/hilbertshotel/apartment/two - name = "Apartment_2" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_2.dmm' - -/datum/map_template/hilbertshotel/apartment/three - name = "Apartment_3" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_3.dmm' - -/datum/map_template/hilbertshotel/apartment/four - name = "Apartment_4" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_4.dmm' - -/datum/map_template/hilbertshotel/apartment/bar - name = "Apartment_bar" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_bar.dmm' - -/datum/map_template/hilbertshotel/apartment/big - name = "Apartment_big" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_big.dmm' - -/datum/map_template/hilbertshotel/apartment/garden - name = "Apartment_garden" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_garden.dmm' - -/datum/map_template/hilbertshotel/apartment/sauna - name = "Apartment_sauna" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/apartment_sauna.dmm' - -//FB maps -// /datum/map_template/hilbertshotel/apartment/movietheater -// name = "Movie_Theater" -// mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/movie_theater.dmm' - -// /datum/map_template/hilbertshotel/apartment/dungeon_one -// name = "Dungeon-One" -// mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/dungeon_1.dmm' - -/datum/map_template/hilbertshotel/apartment/oasis_one - name = "oasis-One" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/oasis_1.dmm' - -/datum/map_template/hilbertshotel/apartment/snowcabin_one - name = "snowcabin-One" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/snowcabin_1.dmm' - -// /datum/map_template/hilbertshotel/apartment/hospital_one -// name = "Hospital" -// mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/hospital.dmm' - -/datum/map_template/hilbertshotel/apartment/chessboard - name = "Chess" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/chess.dmm' - -/datum/map_template/hilbertshotel/apartment/glade_one - name = "Glade-One" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/glade_1.dmm' - -/datum/map_template/hilbertshotel/apartment/wildsauna_one - name = "Wildsauna-One" - mappath = '_maps/templates/splurt_templates/hilbertshotel_templates/wildsauna_1.dmm' - /obj/hilbertshotel/Destroy() ejectRooms() return ..() @@ -532,24 +458,6 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) 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." -//Template Stuff -/datum/map_template/hilbertshotel - name = "Hilbert's Hotel Room" - mappath = '_maps/templates/hilbertshotel.dmm' - var/landingZoneRelativeX = 2 - var/landingZoneRelativeY = 8 - -/datum/map_template/hilbertshotel/empty - name = "Empty Hilbert's Hotel Room" - mappath = '_maps/templates/hilbertshotelempty.dmm' - -/datum/map_template/hilbertshotel/lore - name = "Doctor Hilbert's Deathbed" - mappath = '_maps/templates/hilbertshotellore.dmm' - -/datum/map_template/hilbertshotelstorage - name = "Hilbert's Hotel Storage" - mappath = '_maps/templates/hilbertshotelstorage.dmm' //Turfs and Areas /turf/closed/indestructible/hotelwall