diff --git a/code/hud/hudtarget.cpp b/code/hud/hudtarget.cpp index 40f9ed04db2..64c62e8a5cf 100644 --- a/code/hud/hudtarget.cpp +++ b/code/hud/hudtarget.cpp @@ -4751,7 +4751,7 @@ int hud_communications_state(ship *sp, bool for_death_scream) } // Goober5000 - check for scrambled communications - if (emp_active_local() || sp->flags[Ship::Ship_Flags::Scramble_messages]) + if ((emp_active_local() && !sp->flags[Ship::Ship_Flags::EMP_doesnt_scramble_messages]) || sp->flags[Ship::Ship_Flags::Scramble_messages]) return COMM_SCRAMBLED; return COMM_OK; diff --git a/code/parse/sexp.cpp b/code/parse/sexp.cpp index 136cdc0126b..3506f3c6bf8 100644 --- a/code/parse/sexp.cpp +++ b/code/parse/sexp.cpp @@ -40553,14 +40553,14 @@ SCP_vector Sexp_help = { //phreak { OP_SCRAMBLE_MESSAGES, "scramble-messages\r\n" - "\tCauses messages to be sent as if the player has sustained communications subsystem or EMP damage. This effect can be reversed using unscramble-messages. Takes zero or more arguments.\r\n" - "\tAll (Optional):\tName of the ship for which to scramble messages. If no ships are specified, message scrambling will be turned on for all messages the player receives.\r\n" + "\tCauses messages to be sent or received as if the player had sustained communications subsystem or EMP damage. This effect can be reversed using unscramble-messages. Takes zero or more arguments.\r\n" + "\tAll (Optional):\tName of the ship for which to scramble messages. If no ships are specified, message scrambling will be turned on for the player.\r\n" }, //phreak { OP_UNSCRAMBLE_MESSAGES, "unscramble-messages\r\n" - "\tUndoes the effects of scramble-messages, causing messages to be sent clearly. Takes zero or more arguments.\r\n" - "\tAll (Optional):\tName of the ship for which to scramble messages. If no ships are specified, message scrambling will be turned on for all messages the player receives.\r\n" + "\tUndoes the effects of scramble-messages, causing messages to be sent or received clearly (conditions permitting). Takes zero or more arguments.\r\n" + "\tAll (Optional):\tName of the ship for which to scramble messages. If no ships are specified, message scrambling will be turned off for the player.\r\n" }, { OP_CUTSCENES_SET_CUTSCENE_BARS, "set-cutscene-bars\r\n" diff --git a/code/ship/ship.cpp b/code/ship/ship.cpp index c869fbffdd8..95d982b12fa 100644 --- a/code/ship/ship.cpp +++ b/code/ship/ship.cpp @@ -584,7 +584,7 @@ const int num_ai_tgt_weapon_info_flags = sizeof(ai_tgt_weapon_flags) / sizeof(fl SCP_vector Ai_tp_list; -// Constant for flag, Name of flag, In flags or flags2 +// Constant for flag, Name of flag ship_flag_name Ship_flag_names[] = { { Ship_Flags::Vaporize, "vaporize" }, { Ship_Flags::Warp_broken, "break-warp" }, @@ -620,6 +620,7 @@ ship_flag_name Ship_flag_names[] = { { Ship_Flags::No_builtin_messages, "no-builtin-messages"}, { Ship_Flags::Scramble_messages, "scramble-messages"}, { Ship_Flags::Maneuver_despite_engines, "maneuver-despite-engines" }, + { Ship_Flags::EMP_doesnt_scramble_messages, "emp-doesn't-scramble-messages" }, }; ship_flag_description Ship_flag_descriptions[] = { @@ -655,8 +656,9 @@ ship_flag_description Ship_flag_descriptions[] = { { Ship_Flags::No_death_scream, "Ship will never send a death message when destroyed."}, { Ship_Flags::Always_death_scream, "Ship will always send a death message when destroyed."}, { Ship_Flags::No_builtin_messages, "Ship will not send any persona messages."}, - { Ship_Flags::Scramble_messages, "All messages sent from this ship will appear scrambled, as if the ship had been hit by an EMP."}, + { Ship_Flags::Scramble_messages, "All messages sent from or received by this ship will appear scrambled, as if the ship had been hit by an EMP." }, { Ship_Flags::Maneuver_despite_engines, "Ship can maneuver even if its engines are disabled or disrupted" }, + { Ship_Flags::EMP_doesnt_scramble_messages, "EMP does not affect whether messages appear scrambled when sent from or received by this ship." }, }; extern const size_t Num_ship_flag_names = sizeof(Ship_flag_names) / sizeof(ship_flag_name); diff --git a/code/ship/ship_flags.h b/code/ship/ship_flags.h index b16e5c96a8c..4ba76e9545b 100644 --- a/code/ship/ship_flags.h +++ b/code/ship/ship_flags.h @@ -108,7 +108,8 @@ namespace Ship { No_thrusters, // The E - Thrusters on this ship are not rendered. Ship_locked, // Karajorma - Prevents the player from changing the ship class on loadout screen Weapons_locked, // Karajorma - Prevents the player from changing the weapons on the ship on the loadout screen - Scramble_messages, // Goober5000 - all messages sent from this ship appear scrambled + Scramble_messages, // Goober5000 - all messages sent from or received by this ship appear scrambled + EMP_doesnt_scramble_messages, // Goober5000 - when EMP is active, messages will not have the scramble effect No_secondary_lockon, // zookeeper - secondary lock-on disabled No_disabled_self_destruct, // Goober5000 - ship will not self-destruct after 90 seconds if engines or weapons destroyed (c.f. ai_maybe_self_destruct) Subsystem_movement_locked, // The_E -- Rotating subsystems are locked in place.