Skip to content

Commit

Permalink
done woo
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe2013 committed Jul 18, 2024
1 parent c0252f8 commit 8b4c533
Show file tree
Hide file tree
Showing 8 changed files with 796 additions and 1,737 deletions.
8 changes: 8 additions & 0 deletions code/game/objects/items/stacks/sheets/mineral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,11 @@ GLOBAL_LIST_INIT(iron_recipes, list ( \
perunit = 2000
stack_id = "chitin"
black_market_value = 35

/obj/item/stack/sheet/mineral/chitin/metal
name = "unknown metal"
desc = "An unknown, dark metal."
singular_name = "unknown metal sheet"
icon_state = "sheet-chitin"
sheettype = "unknownmetal"
stack_id = "unknownmetal"
4 changes: 4 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ var/list/admin_verbs_major_event = list(
/client/proc/toggle_cutscene_verb,
/client/proc/decay_old_simulation_cutscene_verb,
/client/proc/go_to_next_simulation_verb,
/client/proc/boss_roar_verb,
/client/proc/boss_finish_verb,
/client/proc/end_game_good,
/client/proc/end_game_bad,
)

var/list/admin_verbs_spawn = list(
Expand Down
87 changes: 85 additions & 2 deletions code/modules/simulacrum/simulacrumcutscenes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

/proc/simulacrum_text_6(mob/living/carbon/human/human, should_roar)
var/atom/movable/screen/text/screen_text/text_box = new /atom/movable/screen/text/screen_text/simulacrum_message()
text_box.text_to_play = "192 Simulations Later..."
text_box.text_to_play = "321 Simulations Later..."
text_box.player = human.client
text_box.color = "#8a2398"
LAZYADD(human.client.screen_texts, text_box)
Expand All @@ -104,4 +104,87 @@
text_box.after_play()
teleport_to_simulation(human, should_roar, FALSE)

// Write the ending one later
/proc/simulacrum_text_ending_good(mob/living/carbon/human/human)
var/atom/movable/screen/text/screen_text/text_box = new /atom/movable/screen/text/screen_text/simulacrum_message()
text_box.text_to_play = "It's finally over."
text_box.player = human.client
text_box.color = "#233598"
LAZYADD(human.client.screen_texts, text_box)
text_box.play_to_client()
sleep(2.5 SECONDS)
var/atom/movable/screen/text/screen_text/body = new /atom/movable/screen/text/screen_text/simulacrum_message/body()
body.text_to_play = "As the dropship flies through space, your squad doesn't talk much. There's too much to think about, too many battles seen to process."
body.player = human.client
body.color = "#535ca9"
LAZYADD(human.client.screen_texts, body)
body.play_to_client()
sleep(3 SECONDS)
var/atom/movable/screen/text/screen_text/body2 = new /atom/movable/screen/text/screen_text/simulacrum_message/body/secondary()
body2.text_to_play = "The following week is a blur, with countless interviews and medical screenings being done. But life goes on."
body2.player = human.client
body2.color = "#535ca9"
LAZYADD(human.client.screen_texts, body2)
body2.play_to_client()
sleep(3 SECONDS)
var/assembled_fatestring = ""
for(var/fate in GLOB.simulation_controller.fate_list)
assembled_fatestring += "[fate][fate == GLOB.simulation_controller.fate_list[length(GLOB.simulation_controller.fate_list)] ? "" : "<br>"]"
var/atom/movable/screen/text/screen_text/body3 = new /atom/movable/screen/text/screen_text/simulacrum_message/body/fatelist()
body3.text_to_play = assembled_fatestring
body3.player = human.client
body3.color = "#535ca9"
LAZYADD(human.client.screen_texts, body3)
body3.play_to_client()
sleep(5 SECONDS)
text_box.after_play()
body.after_play()
body2.after_play()
body3.after_play()
sleep(7 SECONDS)
simulacrum_text_ending_good_2(human)

/proc/simulacrum_text_ending_good_2(mob/living/carbon/human/human)
var/atom/movable/screen/text/screen_text/text_box = new /atom/movable/screen/text/screen_text/simulacrum_message()
text_box.text_to_play = "..."
text_box.player = human.client
text_box.color = "#8a2398"
LAZYADD(human.client.screen_texts, text_box)
text_box.play_to_client()
sleep(2.5 SECONDS)
var/atom/movable/screen/text/screen_text/body = new /atom/movable/screen/text/screen_text/simulacrum_message/body()
body.text_to_play = "\"Why am I back here? I'm dead, aren't I?\""
body.player = human.client
body.color = "#9f53a9"
LAZYADD(human.client.screen_texts, body)
body.play_to_client()
sleep(2.5 SECONDS)
text_box.after_play()
body.after_play()
teleport_to_simulation(human, FALSE, FALSE)
message_admins("END THE ROUND IN A LITTLE TINY BIT")

/proc/simulacrum_text_ending_bad(mob/living/carbon/human/human, should_roar)
var/atom/movable/screen/text/screen_text/text_box = new /atom/movable/screen/text/screen_text/simulacrum_message()
text_box.text_to_play = "That was our chance."
text_box.player = human.client
text_box.color = "#8a2398"
LAZYADD(human.client.screen_texts, text_box)
text_box.play_to_client()
sleep(2.5 SECONDS)
var/atom/movable/screen/text/screen_text/body = new /atom/movable/screen/text/screen_text/simulacrum_message/body()
body.text_to_play = "You know it still watches. It simulates, endlessly. A thousand more deaths you may experience, that is certain."
body.player = human.client
body.color = "#9f53a9"
LAZYADD(human.client.screen_texts, body)
body.play_to_client()
sleep(5 SECONDS)
text_box.after_play()
body.after_play()
message_admins("END THE ROUND NOW")
sleep(15 SECONDS)
if(human.client)
winset(human.client, "infowindow", "is-visible=true")
winset(human.client, "outputwindow", "is-visible=true")
winset(human.client, "mainwindow.split", "splitter=400")
human.client.fit_viewport()
human.client.nuke_chat()
53 changes: 53 additions & 0 deletions code/modules/simulacrum/simulacrumevent.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// <p>The USS Rover has detected a distorted signal on the desert planet of LV-739. In accordance with standard procedure, ship has been taken out of FTL travel and crew awakened for possible distress signal. Signal is detected 73.8 meters at heading 98.6 degrees from landing zone.</p>

/turf/open/floor/void
name = "empty space"
desc = "A dark surface with no reflection or sound. Darker than the black of the abyss."
Expand Down Expand Up @@ -110,6 +112,37 @@
icon_state = "ancient-4"
overlay_iconstate = "ancient-4fx"

/obj/structure/simulacrum_device/central/destructable
breakable = TRUE
indestructible = FALSE
unacidable = FALSE
health = 5000
debris = list(/obj/item/stack/sheet/mineral/chitin/metal)
var/been_shot = FALSE

/obj/structure/simulacrum_device/central/destructable/get_examine_text(mob/user)
. = ..()
if(health > 4000)
. += SPAN_INFO("It looks undamaged.")
else if(health > 2500)
. += SPAN_INFO("It looks fairly damaged.")
else if(health > 1000)
. += SPAN_INFO("It looks like it's falling apart!")

/obj/structure/simulacrum_device/central/destructable/bullet_act(obj/projectile/P)
. = ..()
health -= P.ammo.damage
if(!been_shot)
visible_message(SPAN_BOLDNOTICE("[src] lets out a small psychic groan as bullets chip away at its metal."))
been_shot = TRUE
if(health <= 0)
handle_debris(0, 0)
deconstruct(FALSE)

/obj/structure/simulacrum_device/central/destructable/handle_debris(severity = 0, direction = 0)
visible_message(SPAN_NOTICE("[src] shatters to pieces, an unearthly low groan being the last noise it makes."))
return ..()

/obj/structure/simulacrum_device/pillar
icon_state = "ancient-2"
overlay_iconstate = "ancient-2fx"
Expand All @@ -133,3 +166,23 @@

to_chat(user, SPAN_NOTICE("You enter through the door into the pitch darkness. No going back now."))
user.forceMove(locate(4, 165, 2))

/obj/structure/simulacrum_ladder
name = "ladder"
desc = "A sturdy metal ladder. There's sunshine coming down through the hole above."
icon = 'icons/obj/structures/structures.dmi'
icon_state = "ladder11"
indestructible = TRUE
unacidable = TRUE
light_color = "#ffffff"
light_power = 4
light_range = 4

/obj/structure/simulacrum_ladder/attack_hand(mob/user)
. = ..()
to_chat(user, SPAN_NOTICE("You begin to go up the ladder..."))
if(!do_after(user, 5 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC))
return

to_chat(user, SPAN_NOTICE("You go up the ladder, and out into the bright desert sun."))
user.forceMove(locate(78, 106, 2))
4 changes: 4 additions & 0 deletions code/modules/simulacrum/simulacrummisc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
/atom/movable/screen/text/screen_text/simulacrum_message/body/secondary
screen_loc = "LEFT,TOP-5"

/atom/movable/screen/text/screen_text/simulacrum_message/body/fatelist
screen_loc = "LEFT,TOP-6.5"


/atom/movable/screen/text/screen_text/simulacrum_message/play_to_client()
player?.add_to_screen(src)
if(fade_in_time)
Expand Down
126 changes: 120 additions & 6 deletions code/modules/simulacrum/simulacrumprocs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
to_chat(human, SPAN_BOLDWARNING("You collapse, drifting to unconsciousness as this cacaphony of sound assaults your senses."))
overlay_screen.icon_state = "impairedoverlay7"
human.Stun(100000000)
human.SetEarDeafness(1000000000)
human.loc = null
human.SetEyeBlind(100000000)
save_human(human)
human.ghost_locked = TRUE
Expand All @@ -73,24 +73,27 @@
simulacrum_text_1(human)

/proc/teleport_to_simulation(mob/living/carbon/human/human, roar = TRUE, initial_run = FALSE)
human.forceMove(locate(GLOB.simulation_controller.next_simulation[1], GLOB.simulation_controller.next_simulation[2], GLOB.simulation_controller.next_simulation[3]))
var/turf/teleport_turf = locate(GLOB.simulation_controller.next_simulation[1], GLOB.simulation_controller.next_simulation[2], GLOB.simulation_controller.next_simulation[3])
var/turf/picked_turf = pick(block(teleport_turf.x - 1, teleport_turf.y - 1, teleport_turf.z, teleport_turf.x + 1, teleport_turf.y + 1, teleport_turf.z))
human.forceMove(picked_turf)
if(!initial_run)
load_human(human)
sleep(4 SECONDS) // give time for weeds and me
to_chat(human, SPAN_NOTICE("You appear from the nothingness."))
if(human.client)
winset(human.client, "infowindow", "is-visible=true")
winset(human.client, "outputwindow", "is-visible=true")
winset(human.client, "mainwindow.split", "splitter=400")
human.client.fit_viewport()
human.client.nuke_chat()
if(roar)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), human.client, 'sound/voice/alien_distantroar_3.ogg', human.loc, 55, FALSE), 10 SECONDS)
human.hudswitch_blocked = FALSE
human.hud_used.show_hud(HUD_STYLE_STANDARD, human)
human.SetStun(0)
human.SetEarDeafness(0)
human.SetEyeBlind(0)
human.rejuvenate()
human.clear_fullscreen("simulacrum_ko", TRUE)
to_chat(human, SPAN_NOTICE("You appear from the nothingness."))

/mob/living/carbon/human
var/ghost_locked = FALSE
Expand All @@ -107,12 +110,16 @@ GLOBAL_DATUM_INIT(simulation_controller, /datum/simulation_controller, new)
var/list/non_completed_simulations = list(
"desert_dam" = list(list(61, 194, 3), list(98, 194, 3), list(135, 194, 3)),
"varadero" = list(list(24, 162, 3), list(58, 162, 3), list(92, 162, 3)),
"ice_colony" = list(list(19, 128, 3), list(55, 128, 3), list(91, 128, 3)),
"chances_claim" = list(list(23, 86, 3), list(61, 86, 3), list(99, 86, 3)),
"final" = list(list(19, 54, 3)),
)
var/list/next_simulation = list(24, 194, 3)
var/list/non_completed_cutscenes = list("2", "3", "4", "5", "6")
var/next_cutscene = ""
var/current_cutscene_completed = FALSE
var/everyone_already_koed
var/list/fate_list = list()

/client/proc/pick_simulation_verb()
set name = "Pick Next Simulation"
Expand Down Expand Up @@ -193,6 +200,9 @@ GLOBAL_DATUM_INIT(simulation_controller, /datum/simulation_controller, new)
to_chat(src, SPAN_NOTICE("Next simulation has not been selected."))
return

if(tgui_input_list(src, "Are you sure you want to advance the simulation?", "Advance?", list("yes", "no")) != "yes")
return

to_chat(src, SPAN_NOTICE("Advancing simulation. Cutscene [GLOB.simulation_controller.next_cutscene ? "will" : "will not"] play."))

for(var/savename in GLOB.simulacrum_playersaves)
Expand All @@ -205,7 +215,7 @@ GLOBAL_DATUM_INIT(simulation_controller, /datum/simulation_controller, new)
var/atom/movable/screen/fullscreen/overlay_screen = save.tied_human.overlay_fullscreen("simulacrum_ko", /atom/movable/screen/fullscreen/impaired)
overlay_screen.icon_state = "impairedoverlay7"
save.tied_human.Stun(100000000)
save.tied_human.SetEarDeafness(1000000000)
save.tied_human.loc = null
save.tied_human.SetEyeBlind(100000000)
save.tied_human.hudswitch_blocked = TRUE
save.tied_human.hud_used.show_hud(HUD_STYLE_NOHUD, save.tied_human)
Expand All @@ -224,4 +234,108 @@ GLOBAL_DATUM_INIT(simulation_controller, /datum/simulation_controller, new)
if("5")
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(simulacrum_text_5), save.tied_human, TRUE)
if("6")
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(simulacrum_text_6), save.tied_human, TRUE)
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(simulacrum_text_6), save.tied_human, FALSE)

else
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(teleport_to_simulation), save.tied_human, TRUE, FALSE)

/client/proc/boss_roar_verb()
set name = "Boss Roar"
set category = "Admin.Simulation"

if(!check_rights(R_EVENT))
return

for(var/savename in GLOB.simulacrum_playersaves)
var/datum/simulacrum_humansave/save = GLOB.simulacrum_playersaves[savename]
to_chat(save.tied_human, SPAN_BOLDWARNING("The strange device lets out a low groan as xenomorphs start to appear from nothingness!"))

/client/proc/boss_finish_verb()
set name = "Boss Finished"
set category = "Admin.Simulation"

if(!check_rights(R_EVENT))
return

for(var/savename in GLOB.simulacrum_playersaves)
var/datum/simulacrum_humansave/save = GLOB.simulacrum_playersaves[savename]
to_chat(save.tied_human, SPAN_BOLDWARNING("You now see the faintest sign of light to your south."))

for(var/turf/T as anything in block(56, 54, 3, 68, 54, 3))
T.ChangeTurf(/turf/open/floor/void)

/client/proc/end_game_good()
set name = "Game End - Good"
set category = "Admin.Simulation"

if(!check_rights(R_EVENT))
return

if(tgui_input_list(src, "Are you sure you want to end the game well?", "End game?", list("yes", "no")) != "yes")
return

assemble_fates()
for(var/savename in GLOB.simulacrum_playersaves)
var/datum/simulacrum_humansave/save = GLOB.simulacrum_playersaves[savename]
if(!save.tied_human)
message_admins("FUCKFUCKFUCK. A save with ckey [save.tied_ckey] no longer has a tied human!!!! FUCK2")
continue

save.tied_human.Stun(100000000)
save.tied_human.loc = null
save.tied_human.SetEyeBlind(100000000)
save.tied_human.hudswitch_blocked = TRUE
save.tied_human.hud_used.show_hud(HUD_STYLE_NOHUD, save.tied_human)
winset(save.tied_human, "mainwindow.split", "splitter=1000")
winset(save.tied_human, "infowindow", "is-visible=false")
winset(save.tied_human, "outputwindow", "is-visible=false")

INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(simulacrum_text_ending_good), save.tied_human)

/client/proc/end_game_bad()
set name = "Game End - Bad"
set category = "Admin.Simulation"

if(!check_rights(R_EVENT))
return

if(tgui_input_list(src, "Are you sure you want to end the game badly?", "End game?", list("yes", "no")) != "yes")
return

assemble_fates()
for(var/savename in GLOB.simulacrum_playersaves)
var/datum/simulacrum_humansave/save = GLOB.simulacrum_playersaves[savename]
if(!save.tied_human)
message_admins("FUCKFUCKFUCK. A save with ckey [save.tied_ckey] no longer has a tied human!!!! FUCK3")
continue

save.tied_human.Stun(100000000)
save.tied_human.loc = null
save.tied_human.SetEyeBlind(100000000)
save.tied_human.hudswitch_blocked = TRUE
save.tied_human.hud_used.show_hud(HUD_STYLE_NOHUD, save.tied_human)
winset(save.tied_human, "mainwindow.split", "splitter=1000")
winset(save.tied_human, "infowindow", "is-visible=false")
winset(save.tied_human, "outputwindow", "is-visible=false")

INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(simulacrum_text_ending_bad), save.tied_human)

/proc/assemble_fates()
var/list/human_names = list()
var/list/fate_list_pre = list(
"Following their harrowing experience, %NAME% quietly left the USCM at the first opportunity. %NAME% retired to the backwater colony of LV-325, living out their days peacefully. They died on August 9th, 2238 of natural causes.",
"%NAME% continued their enlistment in the USCM following the incident. They were killed in a USCM raid on a CLF cell on June 14th, 2185.",
"%NAME% became far more withdrawn after the incident. Once discharged from the USCM, they moved to Station 949, becoming a private security officer. They passed away from a rapidly-expanding brain tumor on Febuary 14th, 2199.",
// Add more later
)
var/list/final_fates = list()
for(var/savename in GLOB.simulacrum_playersaves)
var/datum/simulacrum_humansave/save = GLOB.simulacrum_playersaves[savename]
human_names += save.tied_human.real_name

for(var/name in human_names)
var/fate_string = pick(fate_list_pre)
fate_list_pre -= fate_string
final_fates += replacetext(fate_string, "%NAME%", name)

GLOB.simulation_controller.fate_list = final_fates
Loading

0 comments on commit 8b4c533

Please sign in to comment.