From 286c182f53b11315c03075e32c3bf35d0c632f38 Mon Sep 17 00:00:00 2001 From: Superlagg Date: Thu, 26 Dec 2024 14:00:09 -0800 Subject: [PATCH] kellys hole --- code/controllers/subsystem/hotel_subsystem.dm | 16 +++- code/modules/hotel/hotel_prefab_datum.dm | 81 ++++++++++++++++ code/modules/hotel/hotel_prefabs.dm | 96 +++++++++++++++++++ code/modules/hotel/hotel_room_data.dm | 5 +- fortune13.dme | 3 - .../modules/hilbertshotel/hilbertshotel.dm | 18 ---- 6 files changed, 196 insertions(+), 23 deletions(-) create mode 100644 code/modules/hotel/hotel_prefab_datum.dm diff --git a/code/controllers/subsystem/hotel_subsystem.dm b/code/controllers/subsystem/hotel_subsystem.dm index 0724e6a643..98fe4b7862 100644 --- a/code/controllers/subsystem/hotel_subsystem.dm +++ b/code/controllers/subsystem/hotel_subsystem.dm @@ -5,6 +5,20 @@ SUBSYSTEM_DEF(hotel) 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 index d570b672fa..10fc41e4f3 100644 --- a/code/modules/hotel/hotel_prefabs.dm +++ b/code/modules/hotel/hotel_prefabs.dm @@ -1,43 +1,114 @@ +/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 @@ -51,10 +122,20 @@ /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 @@ -63,14 +144,29 @@ /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 index 83e38b3a28..2d168ab9b9 100644 --- a/code/modules/hotel/hotel_room_data.dm +++ b/code/modules/hotel/hotel_room_data.dm @@ -26,7 +26,10 @@ var/room_id = "" var/room_name = "" var/room_description = "" - var/datum/map_template/room_prefab + 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 diff --git a/fortune13.dme b/fortune13.dme index 6688c81731..d672701844 100644 --- a/fortune13.dme +++ b/fortune13.dme @@ -22,7 +22,6 @@ #include "code\__DEFINES\_bitfields.dm" #include "code\__DEFINES\_globals.dm" #include "code\__DEFINES\_helpers.dm" -#include "code\__DEFINES\_hotel_defines.dm" #include "code\__DEFINES\_protect.dm" #include "code\__DEFINES\_tick.dm" #include "code\__DEFINES\access.dm" @@ -357,7 +356,6 @@ #include "code\controllers\subsystem\garbage.dm" #include "code\controllers\subsystem\gunreticle.dm" #include "code\controllers\subsystem\holodeck.dm" -#include "code\controllers\subsystem\hotel_subsystem.dm" #include "code\controllers\subsystem\icon_smooth.dm" #include "code\controllers\subsystem\idlenpcpool.dm" #include "code\controllers\subsystem\input.dm" @@ -2324,7 +2322,6 @@ #include "code\modules\holodeck\items.dm" #include "code\modules\holodeck\mobs.dm" #include "code\modules\holodeck\turfs.dm" -#include "code\modules\hotel\hyperspace_hotel.dm" #include "code\modules\hydroponics\biogenerator.dm" #include "code\modules\hydroponics\bouquets.dm" #include "code\modules\hydroponics\gene_modder.dm" diff --git a/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm b/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm index 3240d2716e..509be342e9 100644 --- a/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm +++ b/modular_splurt/code/modules/hilbertshotel/hilbertshotel.dm @@ -458,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