Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
#define SOUND_ARES_MESSAGE (1<<8)
#define SOUND_OBSERVER_ANNOUNCEMENTS (1<<9)
#define SOUND_FAX_MACHINE (1<<10)
#define SOUND_ROUND_END (1<<11)

//toggles_chat
#define CHAT_OOC (1<<0)
Expand Down Expand Up @@ -206,7 +205,7 @@

#define TOGGLES_LANGCHAT_DEFAULT (LANGCHAT_SEE_EMOTES)

#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_ROUND_END|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC|SOUND_OBSERVER_ANNOUNCEMENTS|SOUND_FAX_MACHINE)
#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC|SOUND_OBSERVER_ANNOUNCEMENTS|SOUND_FAX_MACHINE)

#define TOGGLES_FLASHING_DEFAULT (FLASH_ROUNDSTART|FLASH_ROUNDEND|FLASH_CORPSEREVIVE|FLASH_ADMINPM|FLASH_UNNEST)

Expand Down
12 changes: 0 additions & 12 deletions code/__DEFINES/particle.dm

This file was deleted.

1 change: 1 addition & 0 deletions code/__DEFINES/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define SOUND_CHANNEL_LOBBY 1023
#define SOUND_CHANNEL_Z 1024


//default byond sound echo list index positions.
//ECHO_DIRECT and ECHO_ROOM are the only two that actually appear to do anything, and represent the dry and wet channels of the environment effects, respectively.
#define ECHO_DIRECT 1
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ unless the surgical tool is completely unsuited to what it's being used for.*/
///Tools routinely used to hit people, which wouldn't make sense to give 'you can't open an incision with xyz' messages.
#define SURGERY_TOOLS_NO_INIT_MSG list(\
/obj/item/stack/medical/advanced/bruise_pack,\
/obj/item/stack/medical/advanced/ointment,\
/obj/item/stack/medical/bruise_pack,\
/obj/item/stack/medical/ointment,\
/obj/item/tool/kitchen/utensil/fork,\
/obj/item/stack/cable_coil,\
/obj/item/tool/lighter,\
Expand Down
2 changes: 0 additions & 2 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -680,5 +680,3 @@ DEFINE_BITFIELD(insert_flags, list(
"PLAY_INSERT_SYNTH" = PLAY_INSERT_SYNTH,
"PLAY_INSERT_CO" = PLAY_INSERT_CO
))

DEFINE_BITFIELD(particle_flags, list("PARTICLE_ATTACH_MOB" = PARTICLE_ATTACH_MOB))
2 changes: 0 additions & 2 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -675,5 +675,3 @@ GLOBAL_PROTECT(topic_tokens)

GLOBAL_LIST_EMPTY(topic_commands)
GLOBAL_PROTECT(topic_commands)

GLOBAL_LIST_EMPTY(marine_medics)
2 changes: 1 addition & 1 deletion code/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

#define FLAGS_EQUALS(flag, flags) (((flag) & (flags)) == (flags))

#define IS_DIAGONAL_DIR(dir) (dir & (NORTH|SOUTH) && dir & (EAST|WEST))
#define IS_DIAGONAL_DIR(dir) (dir & ~(NORTH|SOUTH))

// Inverse direction, taking into account UP|DOWN if necessary.
#define REVERSE_DIR(dir) ( (((dir) & 85) << 1) | (((dir) & 170) >> 1) )
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

/datum/config_entry/number/whiskey_required_players
min_val = 0
config_entry_value = 120
config_entry_value = 140
integer = TRUE

/datum/config_entry/number/nuclear_lock_marines_percentage
Expand Down
117 changes: 32 additions & 85 deletions code/controllers/subsystem/hijack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ SUBSYSTEM_DEF(hijack)
/// The min ground z for open_space turfs when crashed
var/crashed_ground_z_min = 0

/// The bottom left origin point where the shipmap crashes to the ground map
var/turf/ground_origin

/// Whether or not lifeboats are still allowed to depart or not
var/escape_possible = TRUE

/// The x origin for the mainship map
var/ship_origin_x = 0

Expand All @@ -128,8 +122,8 @@ SUBSYSTEM_DEF(hijack)
/// Where the ship is currently transiting to
var/datum/spaceport/spaceport

/// An alist of area -> machinery (fuelpumps) for lookup
var/alist/area_machinery_lookup = alist()
/// A list of all fuel pumps
var/list/obj/structure/machinery/fuelpump/fuelpumps = list()

/// A list of all APCs on the main ship
var/list/obj/structure/machinery/power/apc/almayer/apcs = list()
Expand Down Expand Up @@ -265,16 +259,9 @@ SUBSYSTEM_DEF(hijack)
for(var/area/almayer/cycled_area as anything in current_run)
current_run -= cycled_area

var/new_area_state = cycled_area.power_equip

var/obj/structure/machinery/machine = SShijack.area_machinery_lookup[cycled_area]
if(machine)
// Pumps don't care about area power but health
new_area_state = machine.operable()

if(progress_areas[cycled_area] != new_area_state)
progress_areas[cycled_area] = new_area_state
announce_area_state_change(cycled_area, new_area_state)
if(progress_areas[cycled_area] != cycled_area.power_equip)
progress_areas[cycled_area] = !progress_areas[cycled_area]
announce_area_power_change(cycled_area)

if(progress_areas[cycled_area])
switch(cycled_area.hijack_evacuation_type)
Expand Down Expand Up @@ -336,21 +323,17 @@ SUBSYSTEM_DEF(hijack)
var/message = ""

for(var/area/cycled_area as anything in progress_areas)
var/new_area_state = cycled_area.power_equip
var/obj/structure/machinery/machine = SShijack.area_machinery_lookup[cycled_area]
if(machine)
// Pumps don't care about area power but health
new_area_state = machine.operable()
message += "[cycled_area] - [new_area_state ? "Online" : "Offline"]\n"
progress_areas[cycled_area] = new_area_state
message += "[cycled_area] - [cycled_area.power_equip ? "Online" : "Offline"]\n"
progress_areas[cycled_area] = cycled_area.power_equip

message += "\nCritical damage sustained to ship systems. Altitude rapidly decreasing. Initiating sublight burn to exit AO.\nMaintain fueling functionality to initiate quantum jump to [spaceport.name]."

marine_announcement(message, HIJACK_ANNOUNCE)

///Called when an area's operable status is changed to announce that it has been changed
/datum/controller/subsystem/hijack/proc/announce_area_state_change(area/changed_area, new_state)
var/message = "[changed_area] - [new_state ? "Online" : "Offline"]"
///Called when an area power status is changed to announce that it has been changed
/datum/controller/subsystem/hijack/proc/announce_area_power_change(area/changed_area)
var/message = "[changed_area] - [changed_area.power_equip ? "Online" : "Offline"]"

shipwide_ai_announcement(message, HIJACK_ANNOUNCE, sound('sound/misc/notice2.ogg'))

///Called to announce to xenos the state of evacuation progression
Expand All @@ -359,37 +342,18 @@ SUBSYSTEM_DEF(hijack)

var/marine_warning_areas = ""
var/xeno_warning_areas = ""
var/marine_no_repairable = " All fueling areas operational."
var/broken_unrepairable = 0

for(var/area/cycled_area as anything in progress_areas)
var/new_area_state = cycled_area.power_equip
var/repairable = TRUE
var/obj/structure/machinery/machine = SShijack.area_machinery_lookup[cycled_area]
if(machine)
// Pumps don't care about area power but health
repairable = FALSE
new_area_state = machine.operable()
progress_areas[cycled_area] = new_area_state
if(new_area_state)
// Powered: xenos interested to know this
if(cycled_area.power_equip)
xeno_warning_areas += "[cycled_area], "
continue
if(repairable)
// Not powered, but can be powered: marines interested to know this
marine_warning_areas += "[cycled_area], "
else
broken_unrepairable++
marine_warning_areas += "[cycled_area], "

// Remove ending commas and whitespace
if(xeno_warning_areas)
xeno_warning_areas = copytext(xeno_warning_areas, 1, -2)

if(marine_warning_areas)
marine_warning_areas = copytext(marine_warning_areas, 1, -2)
if(broken_unrepairable > 0)
var/total_machines = length(SShijack.area_machinery_lookup)
var/working_machines = total_machines - broken_unrepairable
marine_no_repairable = " [working_machines]/[total_machines] fueling areas remain operational."

var/datum/hive_status/hive
for(var/hivenumber in GLOB.hive_datum)
Expand All @@ -409,11 +373,11 @@ SUBSYSTEM_DEF(hijack)

switch(announce)
if(1)
marine_announcement("Emergency fuel replenishment is at 50%. Tachyon field accelerators currently charging.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : marine_no_repairable]", HIJACK_ANNOUNCE)
marine_announcement("Emergency fuel replenishment is at 50%. Tachyon field accelerators currently charging.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
if(2)
marine_announcement("Emergency fuel replenishment is at 100%. Tachyon field accelerators fully charged, quantum jump initiating. Ensure constant supply of fuel to the tachyon field accelerators.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : marine_no_repairable]", HIJACK_ANNOUNCE)
marine_announcement("Emergency fuel replenishment is at 100%. Tachyon field accelerators fully charged, quantum jump initiating. Ensure constant supply of fuel to the tachyon field accelerators.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
if(3)
shipwide_ai_announcement("Tachyon quantum jump progress at 50 percent. Ensure constant supply of fuel to the tachyon field accelerators.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : marine_no_repairable]", HIJACK_ANNOUNCE, sound('sound/misc/notice2.ogg'))
shipwide_ai_announcement("Tachyon quantum jump progress at 50 percent. Ensure constant supply of fuel to the tachyon field accelerators.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE, sound('sound/misc/notice2.ogg'))
if(4)
shipwide_ai_announcement("Tachyon quantum jump complete. Initiating docking procedures with [spaceport.name]. Lifeboats and pods re-enabled.", HIJACK_ANNOUNCE, sound('sound/misc/notice2.ogg'))

Expand All @@ -438,14 +402,6 @@ SUBSYSTEM_DEF(hijack)

return "[duration2text_sec(sd_time_remaining)]"

/// Plays the passed sfx for any xenos shipside
/datum/controller/subsystem/hijack/proc/play_sfx_for_shipside_xenos(sound/soundin, vol=45)
for(var/mob/living/carbon/xenomorph as anything in GLOB.xeno_mob_list)
var/turf/xeno_turf = get_turf(xenomorph)
if(!xeno_turf || !is_mainship_level(xeno_turf.z))
continue
playsound_client(xenomorph.client, soundin, vol=vol)


//~~~~~~~~~~~~~~~~~~~~~~~~ EVAC STUFF ~~~~~~~~~~~~~~~~~~~~~~~~//

Expand Down Expand Up @@ -662,7 +618,7 @@ SUBSYSTEM_DEF(hijack)

var/sound_picked = pick('sound/theme/nuclear_detonation1.ogg','sound/theme/nuclear_detonation2.ogg')
for(var/client/player as anything in GLOB.clients)
playsound_client(player, sound_picked, vol=90)
playsound_client(player, sound_picked, 90)

var/list/alive_mobs = list() //Everyone who will be destroyed on the zlevel(s).
var/list/dead_mobs = list() //Everyone who only needs to see the cinematic.
Expand Down Expand Up @@ -708,7 +664,7 @@ SUBSYSTEM_DEF(hijack)
explosive_cinematic.icon_state = "summary_destroyed"

for(var/client/player as anything in GLOB.clients)
playsound_client(player, 'sound/effects/explosionfar.ogg', vol=90)
playsound_client(player, 'sound/effects/explosionfar.ogg', 90)


sleep(0.5 SECONDS)
Expand All @@ -729,7 +685,11 @@ SUBSYSTEM_DEF(hijack)
/datum/controller/subsystem/hijack/proc/initiate_ground_crash()
hijack_status = HIJACK_OBJECTIVES_GROUND_CRASH
marine_announcement("Tachyon quantum jump drive deactivated due to insufficient fueling. Entry into atmosphere imminent.", HIJACK_ANNOUNCE, sound('sound/mecha/internaldmgalarm.ogg'))
play_sfx_for_shipside_xenos('sound/mecha/internaldmgalarm.ogg')

// Break all shipside ships and disable all non-pod/elevator pads
unlock_all_dropship_doors() // Unlock doors because they'll be uninteractable
disallow_dropship_launching()
disallow_dropship_pad_landing()

// Figure out the main Z by assuming the LZs are on that Z
var/obj/lz = locate(/obj/structure/machinery/computer/shuttle/dropship/flight/lz1)
Expand All @@ -739,7 +699,7 @@ SUBSYSTEM_DEF(hijack)

// Figure out the bottom left of playable space with 1 extra border
var/obj/effect/landmark/mainship_crashsite/origin_landmark = locate() in GLOB.landmarks_list
ground_origin = get_turf(origin_landmark)
var/turf/ground_origin = get_turf(origin_landmark)
var/border_type = /turf/closed/wall/strata_ice/jungle
var/cordon_type = FALSE
if(ground_origin)
Expand Down Expand Up @@ -800,14 +760,6 @@ SUBSYSTEM_DEF(hijack)
drop = FALSE,
)

// Break all shipside ships and disable all non-pod/elevator pads
unlock_all_dropship_doors() // Unlock doors because they'll be uninteractable
disallow_dropship_launching()
disallow_dropship_pad_landing()

escape_possible = FALSE
shipwide_ai_announcement("ALERT: Lifeboat telemetry equipment destroyed. Cause: Atmospheric reentry.\n\nEvacuation via port and starboard lifeboats is no longer possible.", HIJACK_ANNOUNCE, sound('sound/effects/creak1.ogg'))

// Place the crash template
var/datum/map_config/ship_map_config = SSmapping.configs[SHIP_MAP]
var/datum/map_template/template = SSmapping.map_templates[ship_map_config?.ground_crash_template_name]
Expand Down Expand Up @@ -842,7 +794,6 @@ SUBSYSTEM_DEF(hijack)
drop = FALSE,
)
shipwide_ai_announcement("ALERT: Altitude rapidly decreasing. Brace for impact.", HIJACK_ANNOUNCE, sound('sound/effects/GQfullcall.ogg'))
play_sfx_for_shipside_xenos('sound/effects/GQfullcall.ogg')
if(GLOB.security_level < SEC_LEVEL_RED)
set_security_level(SEC_LEVEL_RED, no_sound = TRUE, announce = FALSE)

Expand Down Expand Up @@ -1073,8 +1024,6 @@ SUBSYSTEM_DEF(hijack)
disallow_dropship_pad_landing()

marine_announcement("Initiating quantum jump. Opening virtual mass field. Lifeboats and pods disabled until arrival.", HIJACK_ANNOUNCE, sound('sound/mecha/powerup.ogg'))
play_sfx_for_shipside_xenos('sound/mecha/powerup.ogg')

addtimer(CALLBACK(src, PROC_REF(enter_ftl)), 5 SECONDS)

/// Updates a specific space turf to have the speedspace animation
Expand Down Expand Up @@ -1120,7 +1069,6 @@ SUBSYSTEM_DEF(hijack)
/datum/controller/subsystem/hijack/proc/initiate_ftl_crash()
hijack_status = HIJACK_OBJECTIVES_FTL_CRASH
shipwide_ai_announcement("Tachyon quantum jump drive deactivated due to insufficient fueling. Brace for destabilization of hyperdrive field.", HIJACK_ANNOUNCE, sound('sound/mecha/internaldmgalarm.ogg'))
play_sfx_for_shipside_xenos('sound/mecha/internaldmgalarm.ogg')

addtimer(CALLBACK(src, PROC_REF(leave_ftl), TRUE), 5 SECONDS)
if(GLOB.security_level < SEC_LEVEL_RED)
Expand Down Expand Up @@ -1170,21 +1118,20 @@ SUBSYSTEM_DEF(hijack)
/// Warn exploding pumps
/datum/controller/subsystem/hijack/proc/explode_pumps_with_warning(time_till = 10 SECONDS)
shipwide_ai_announcement("ALERT: Build up detected within pumping systems. Overload in [DisplayTimeText(time_till)].", HIJACK_ANNOUNCE, sound('sound/effects/double_klaxon.ogg'))
play_sfx_for_shipside_xenos('sound/effects/double_klaxon.ogg')
addtimer(CALLBACK(src, PROC_REF(explode_pumps)), time_till)
for(var/key,value in SShijack.area_machinery_lookup)
var/obj/structure/machinery/machine = value
playsound(machine, 'sound/effects/pipe_hissing.ogg', vol = 40)
machine.visible_message(SPAN_HIGHDANGER("[machine] begins hissing violently!"))
for(var/turf/position in machine.locs)
for(var/obj/structure/machinery/fuelpump/pump as anything in fuelpumps)
playsound(pump, 'sound/effects/pipe_hissing.ogg', vol = 40)
pump.visible_message(SPAN_HIGHDANGER("[pump] begins hissing violently!"))
var/turf/origin = get_turf(pump)
for(var/turf/position in block(origin, locate(origin.x + 3, origin.y, origin.z)))
new /obj/effect/warning/explosive(position, time_till)

/// Called to explode the fuel pumps
/datum/controller/subsystem/hijack/proc/explode_pumps()
var/datum/space_weapon_ammo/rocket_launcher/swing_rockets/rockets = new
rockets.name = "ship explosion"
for(var/key,machine in SShijack.area_machinery_lookup)
rockets.hit_target(get_turf(machine), shake=FALSE)
for(var/obj/structure/machinery/fuelpump/pump as anything in fuelpumps)
rockets.hit_target(get_turf(pump), shake=FALSE)
qdel(rockets)

/// Called when FTL is completed successfully to load in shuttles
Expand Down
Loading
Loading