diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 1211f9e14f8..34822d2d509 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -1,3 +1,4 @@ +/var/datum/announcement/minor/minor_announcement = new() /var/datum/announcement/priority/priority_announcement = new(do_log = 0) /var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1) @@ -15,6 +16,11 @@ sound = new_sound log = do_log newscast = do_newscast + +/datum/announcement/minor/New(var/do_log = 0, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) + ..(do_log, new_sound, do_newscast) + title = "Attention" + announcement_type = "Minor Announcement" /datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) ..(do_log, new_sound, do_newscast) @@ -55,8 +61,9 @@ datum/announcement/proc/Message(message as text, message_title as text) if (announcer) M << " -[html_encode(announcer)]" -datum/announcement/minor/Message(message as text, message_title as text) - world << "[message]" +/datum/announcement/minor/Message(message as text, message_title as text) + world << "[message_title]" + world << "[message]" datum/announcement/priority/Message(message as text, message_title as text) world << "

[message_title]

" diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index f32407a62af..d1bc36e3625 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -79,8 +79,8 @@ rcd light flash thingy on matter drain /datum/AI_Module/large/lockdown module_name = "Hostile Station Lockdown" mod_pick_name = "lockdown" - description = "Take control of the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks." - cost = 20 + description = "Overload the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks. The networks will automatically reset after 90 seconds." + cost = 30 one_time = 1 power_type = /mob/living/silicon/ai/proc/lockdown @@ -89,15 +89,12 @@ rcd light flash thingy on matter drain set category = "Malfunction" set name = "Initiate Hostile Lockdown" - if(src.stat == 2) - src <<"You cannot begin a lockdown because you are dead!" - return - - if(malf_cooldown) + if(src.stat == DEAD) + src << "You cannot begin a lockdown because you are dead!" return var/obj/machinery/door/airlock/AL - for(var/obj/machinery/door/D in airlocks) + for(var/obj/machinery/door/airlock/D in airlocks) if(!(D.z in config.contact_levels)) continue spawn() @@ -107,8 +104,7 @@ rcd light flash thingy on matter drain AL.locked = 0 //For airlocks that were bolted open. AL.safe = 0 //DOOR CRUSH AL.close() - AL.locked = 1 //Bolt it! - AL.lights = 0 //Stealth bolt for a classic AI door trap. + AL.lock() AL.electrified_until = -1 //Shock it! else if(!D.stat) //So that only powered doors are closed. D.close() //Close ALL the doors! @@ -117,40 +113,30 @@ rcd light flash thingy on matter drain if(C) C.post_status("alert", "lockdown") - src.verbs += /mob/living/silicon/ai/proc/disablelockdown - src << "Lockdown Initiated." - malf_cooldown = 1 - spawn(30) - malf_cooldown = 0 + verbs -= /mob/living/silicon/ai/proc/lockdown + minor_announcement.Announce("Hostile runtime detected in door controllers. Isolation lockdown protocols are now in effect. Please remain calm.","Network Alert") + src << "Lockdown initiated. Network reset in 90 seconds." + spawn(900) //90 Seconds. + disablelockdown() //Reset the lockdown after 90 seconds. /mob/living/silicon/ai/proc/disablelockdown() set category = "Malfunction" set name = "Disable Lockdown" - if(src.stat == 2) - src <<"You cannot disable lockdown because you are dead!" - return - if(malf_cooldown) - return - var/obj/machinery/door/airlock/AL - for(var/obj/machinery/door/D in airlocks) + for(var/obj/machinery/door/airlock/D in airlocks) spawn() if(istype(D, /obj/machinery/door/airlock)) AL = D if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire. - AL.locked = 0 + AL.unlock() AL.electrified_until = 0 AL.open() AL.safe = 1 - AL.lights = 1 //Essentially reset the airlock to normal. else if(!D.stat) //Opens only powered doors. - D.open() //Open everything! - - src << "Lockdown Lifted." - malf_cooldown = 1 - spawn(30) - malf_cooldown = 0 + D.open() //Open everything! + + minor_announcement.Announce("Automatic system reboot complete. Have a secure day.","Network Reset") /datum/AI_Module/large/disable_rcd module_name = "RCD disable" diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index c89552719bb..8fe44113b27 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -69,7 +69,6 @@ var/list/ai_verbs_default = list( var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite - var/malf_cooldown = 0 //Cooldown var for malf modules var/obj/machinery/power/apc/malfhack = null var/explosive = 0 //does the AI explode when it dies? diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 0950f5d1594..b0909f87af6 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -174,8 +174,7 @@ var/global/maint_all_access = 0 for(var/obj/machinery/door/airlock/D in A) D.emergency = 1 D.update_icon(0) - world << "Attention!" - world << "The maintenance access requirement has been revoked on all airlocks." + minor_announcement.Announce("The maintenance access requirement has been revoked on all airlocks.") maint_all_access = 1 /proc/revoke_maint_all_access() @@ -183,6 +182,5 @@ var/global/maint_all_access = 0 for(var/obj/machinery/door/airlock/D in A) D.emergency = 0 D.update_icon(0) - world << "Attention!" - world << "The maintenance access requirement has been readded on all maintenance airlocks." + minor_announcement.Announce("The maintenance access requirement has been readded on all maintenance airlocks.") maint_all_access = 0 \ No newline at end of file