Skip to content

Commit

Permalink
modular floor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
silencer-pl committed May 17, 2024
1 parent af776d7 commit d48cb51
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 120 deletions.
1 change: 1 addition & 0 deletions code/game/gamemodes/extended/extended.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

/datum/game_mode/announce()
to_world("<B>Sector Patrol ALPHA</B>")
show_blurb(GLOB.player_list, duration = 10 SECONDS, message = "<b>August 24th, 2185\nUACM Outer Veil PST</b>\nDorms, Deck 37.", screen_position = "CENTER,BOTTOM+1.5:16", text_alignment = "center", text_color = "#ffaef2", blurb_key = "introduction", ignore_key = FALSE, speed = 1)

/datum/game_mode/extended/get_roles_list()

Expand Down
55 changes: 29 additions & 26 deletions code/game/turfs/modular/modular_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,37 @@
var/tile_bot_rght
var/tile_seal

/turf/open/floor/plating/modular/proc/check_tile(reverse = FALSE)
switch(usr.a_intent)
/turf/open/floor/plating/modular/proc/check_tile(str)
var/tiletocheck = str
switch(tiletocheck)
if(INTENT_HELP)
if(tile_top_left == null)
return TRUE
else
return FALSE
if(INTENT_DISARM)
if(tile_top_rght == null)
return TRUE
else
return FALSE
if(INTENT_HARM)
if(tile_bot_left == null)
return TRUE
else
return FALSE
if(INTENT_GRAB)
if(tile_bot_rght == null)
return TRUE
else
return FALSE

else
return FALSE


/turf/open/floor/plating/modular/proc/set_tile(str)
var/clr = str
to_chat(usr, SPAN_NOTICE("You start attaching a tile to the floor."))
if(do_after(usr, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
playsound(src, 'sound/effects/thud.ogg', 30)
visible_message(SPAN_NOTICE("[usr] sets a floor tile with a satisfying click."), SPAN_NOTICE("You set a floor tile with a satisfying click."), SPAN_WARNING("You hear a quiet click."))
usr.visible_message(SPAN_NOTICE("[usr] sets a floor tile with a satisfying click."), SPAN_NOTICE("You set a floor tile with a satisfying click."), SPAN_WARNING("You hear a quiet click."))
switch(usr.a_intent)
if(INTENT_HELP)
tile_top_left = clr
Expand All @@ -56,8 +62,9 @@
to_chat(usr, SPAN_NOTICE("You start detaching a tile from the floor."))
if(do_after(usr, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
playsound(src, 'sound/effects/thud.ogg', 30)
visible_message(SPAN_NOTICE("[usr] detaches a tile from the floor."), SPAN_NOTICE("You detach a tile form the floor."), SPAN_WARNING("You hear a quiet click."))
usr.visible_message(SPAN_NOTICE("[usr] detaches a tile from the floor."), SPAN_NOTICE("You detach a tile form the floor."), SPAN_WARNING("You hear a quiet click."))
var/obj/item/stack/modulartiles/tiles = new(get_turf(usr))
tiles.amount = 1
switch (usr.a_intent)
if(INTENT_HELP)
tiles.tiles_color = tile_top_left
Expand All @@ -71,45 +78,49 @@
if(INTENT_GRAB)
tiles.tiles_color = tile_bot_rght
tile_bot_rght = null
tiles.update_icon()
update_icon()
if(usr.get_inactive_hand() == /obj/item/stack/modulartiles)
var/obj/item/stack/modulartiles/othertiles = usr.get_inactive_hand()
if(othertiles.tiles_color == tiles.tiles_color)
if(othertiles.add(1) == TRUE)
qdel(tiles)
return
usr.put_in_inactive_hand(tiles)

/turf/open/floor/plating/modular/attack_hand(mob/user)
if (tile_seal != null) return
if(check_tile(usr.a_intent) == TRUE)
to_chat(usr,SPAN_NOTICE("There is no tile to pick up in this slot. Please make sure you are using the right intent."))
return
else
rem_tile()

/turf/open/floor/plating/modular/attackby(obj/item/C, mob/user)
if (!(istype (C, /obj/item/stack/modulartiles) || istype(C, /obj/item/modular/sealant) ||HAS_TRAIT(C, TRAIT_TOOL_SCREWDRIVER)))
to_chat(usr, SPAN_NOTICE("These two things don't seem to go together."))
return
if(istype(C, /obj/item/modular/sealant))
var/obj/item/modular/sealant/sealant = C
if(tile_bot_left == null || tile_bot_rght == null || tile_top_left == null || tile_top_rght == null)
to_chat(usr, SPAN_NOTICE("The sealant will not work properly unless all four tiles are installed."))
return
if(tile_bot_left != null || tile_bot_rght != null || tile_top_left != null || tile_top_rght != null) //Excessive, but making sure all 4 are present
usr.visible_message(SPAN_NOTICE("[usr] starts applying sealant to the [src]"), SPAN_NOTICE("You start applying sealant to the [src]"))
playsound(src, 'sound/effects/squelch1.ogg', 30)
if(do_after(usr, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
var/obj/item/modular/sealant/sealant = C
sealant.sealant_color = tile_seal
tile_seal = sealant.sealant_color
update_icon()
return
to_chat(usr, SPAN_WARNING("You moved away."))
if(istype(C, /obj/item/stack/modulartiles))
if(tile_seal != null)
to_chat(usr, SPAN_NOTICE("The tiles have been locked in place by a hardened sealant. You will need to scrape it away with a screwdriver, used in GRAB mode, before you can alter the tiling in any way."))
return
if (check_tile() == FALSE)
if (check_tile(usr.a_intent) == FALSE)
to_chat(usr, SPAN_NOTICE("A tile is already in that spot. You can remove it by clicking on it with an active empty hand."))
return
var/obj/item/stack/modulartiles/tile = C
if (tile.use(1) == FALSE)
if (tile.amount < 1)
to_chat(usr, SPAN_WARNING("Somehow, you are holding less than one tile. This really shount't be happening."))
return
if (tile.use(1) == TRUE)
if (tile.amount >= 1)
set_tile(tile.tiles_color)
tile.use(1)
return
if(HAS_TRAIT(C, TRAIT_TOOL_SCREWDRIVER))
if(tile_seal == null)
Expand All @@ -130,14 +141,6 @@
to_chat(usr, SPAN_WARNING("That does not seem to work. If you are trying to scrape off the tile sealent, please remember to use GRAB intent."))
return

/turf/open/floor/plating/modular/attack_hand(mob/user)
if(tile_seal != null)
if(check_tile() == TRUE)
to_chat(usr,SPAN_NOTICE("There is no tile to pick up in this slot. Please make sure you are using the right intent."))
return
if(check_tile() == FALSE)
rem_tile()

/turf/open/floor/plating/modular/break_tile_to_plating()
if (!broken)
tile_top_left = null
Expand Down
65 changes: 16 additions & 49 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1135,56 +1135,23 @@
to_chat(src, "Only administrators may use this command.")
return

var/puzzlebox_admin_option = tgui_input_list(usr, "Select a Sequence", "Start Sequence", list("None - Leave", "Dock 31 Landing", "Dock 31 Elevator Up", "Dorms - Going Down","Pythia Statistic Icons","Resolution"), 0)
var/puzzlebox_admin_option = tgui_input_list(usr, "Select a Sequence", "Start Sequence", list("None - Leave", "Open Hideaway Podlocks", "Open TOS Outer Podlocks", "Open TOS Inner Podlocks"), 0)
if (!puzzlebox_admin_option) return
switch(puzzlebox_admin_option)
if("None - Leave")
return
if("Dock 31 Landing")
to_chat(world, narrate_body("The shuttle's Twilight Paradox drives sigh quietly as the shuttle makes a leapfrog style jump towards the PST. As it approaches, the stations on board systems take control of the shuttle and start to guide it towards its destination."))
sleep(150)
to_chat(world, narrate_body("The station is huge, likely the biggest artificial object in the Neroid Sector, if not all the Veils. The shuttle comes close near its top, from where the station widens considerably. It's hard to not notice how well maintained the outer hull of the station is, indicating that it is either freshly built, or unusually well maintained for an object its size."))
sleep(150)
to_chat(world, narrate_body("The shuttle slows down and starts to fly along the side of the station, near one of its closed wings. It turns sharply and ducks right under the wing and gives you a clear view of what seems to be a fleet of thousands of small drones, all parked in charging stations strewn what look like zero gravity manufacturing and 3d printing plants. All of this seems to be automated but is currently inert."))
sleep(150)
to_chat(world, narrate_body("The shuttle gets out from under the wing and heads for what is essentially the bottom of the station where it becomes paper thin again. Here, various sized ports and berths are located. You take notice of what looks to be several medium-sized corporate ships docked in one segment of the station's docking facilities."))
sleep(150)
to_chat(world, narrate_body("The shuttle arrives at its destination and the drives power off. The airlock takes a moment to pressurize, then beeps."))
return
if("Dock 31 Elevator Up")
to_chat(world, narrate_body("The elevator groans then rather violently jerks and begins its rapid ascent topside. Hanako was not kidding. The ascent is intense and pushes you into your chair somewhat. The sensation is not enough to be painful and with the jolt of adrenaline that follows it, certainly wakes you up somewhat."))
sleep(150)
to_chat(world, narrate_body("You notice bright blue patterns on the shaft of the elevator, seemingly wrapping around the shaft from all directions. The ascent is too rapid to make out what exactly is the source of these patterns, but these seem unique to the PST."))
sleep(150)
to_chat(world, narrate_body("The elevator stops as suddenly as it starts, giving you one final jerk and shot of adrenaline as a pair of doors begins to unseal. You have arrived at your destination."))
return
if("Dorms - Going Down")
to_chat(world, narrate_body("The elevator hums and beings its descent back into the depths of the PST. Compared to the previous ride, this descent is gentle. Pleasant. Really, all its missing is elevator music."))
sleep(100)
to_chat(world, narrate_body("Like the other shaft, this one is also filled with intricate, blue glowing patterns. You can make out their source this time - these all appear to be Liquid Data streams, housed in special cables that seem nearly translucent. You have never seen a solution like this before, normally Liquid Data devices are highly secure and kept in contained areas of ships."))
sleep(150)
to_chat(world, narrate_body("The elevator slows and stops as it arrives at its destination. As its doors start to unseal, you feel a breeze on your cheeks."))
return
if("Pythia Statistic Icons")
for(var/obj/structure/eventterminal/puzzle05/testament_of_sacrifice/pythia in world)
for(var/obj/structure/machinery/light/marker/admin/mel in world)
if(mel.light_id == "melinoe")
pythia.pythia_terminal_icons("data")
mel.emoteas("The terminal monitors fizzle for a moment, then each begin to display its own, unsynchronized stream of data. For a while, the data seems random.")
mel.emoteas("You then start to see patterns. The terminal seems to be displaying security records, conversation records, mission reports and other official data about each and every one of you present in the room, switching between person to person at random intervals.")
mel.emoteas("It takes you a moment to realize that not all the data is correct. Some of it seems to mention events that have not taken place but all, somewhat disturbingly, seem to end with your demise in some accident or combat deployment, some time in the last year.")
if("Resolution")
to_chat(world, narrate_head("A warning klaxon rings out across the station as airlocks start to seal and clamp shut. The familiar robotic voice speaks:"))
to_chat(world, narrate_body("Attention. Security Lockout. Unauthorized attempt to overwrite proprietary UACM technology. All personnel are to remain locked down in their assigned dorms until an All-Clear signal is sent. Expected time until resolution: 70 hours."))
sleep(150)
to_chat(world, narrate_head("The speakers fizzle and buzz, then pop. The warning klaxon stops. A female voice you've all heard before rings out from the loudspeaker:"))
to_chat(world, narrate_body("Attention Test Crews of the PST. This is CA-RW. It appears you have triggered a security lockout after you have, somehow, tried to overwrite the station's Artificial Intelligence with an unscheduled software package which we think triggered every security warning known to mankind."))
sleep(150)
to_chat(world, narrate_body("I would be mad if we weren't both slightly impressed. I'm going to wager a guess that you were helped by a certain overactive station engineer that knows way more about the PST for their own good and that you found an MUP hidden inside a Task Force 14 safe house."))
sleep(150)
to_chat(world, narrate_body("I'm sorry to do this to you, but we have no way of overriding the lockout remotely. This will require the physical presence of one of us and our very gentle little fingers. The Persephone is on its way. Expect one or both of us in less than twelve hours, likely with another bunch of recruits. Until then, enjoy what constitutes your new home. I left some snacks."))
sleep(150)
to_chat(world, narrate_body("Keep in mind that UACM brass has also taken notice of this alert and they are likely on the way too but knowing them it will take them a good sixty hours to even send a ship here. The next twenty-four hours on the PST are likely going to be heavily investigated by the authorities and if you want to insulate yourself from that sort of attention, we both respect that choice and will give you the means to do so, no questions asked."))
sleep(150)
to_chat(world, narrate_head("The speakers pop again, and this time die down for good. The PST is silent again, though the lockdown persists."))
return
if("Open Hideaway Podlocks")
for (var/obj/structure/machinery/door/poddoor/almayer/locked/A in world)
if(A.id == "crypt-a")
A.open()
return
if("Open TOS Outer Podlocks")
for (var/obj/structure/machinery/door/poddoor/almayer/locked/A in world)
if(A.id == "crypt-b")
A.open()
return
if("Open TOS Inner Podlocks")
for (var/obj/structure/machinery/door/poddoor/almayer/locked/A in world)
if(A.id == "crypt-c")
A.open()
return
Loading

0 comments on commit d48cb51

Please sign in to comment.