From 0fa321a6f9b2276e901bdee1932360668b17e23d Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Sat, 12 Dec 2015 07:33:10 -0800 Subject: [PATCH] Misc. Fixes, shuttle_caller_list, autoCall --- code/game/area/Space Station 13 areas.dm | 4 +++ .../game/machinery/computer/communications.dm | 23 ++----------- code/modules/mob/living/silicon/ai/ai.dm | 4 ++- code/modules/mob/living/silicon/ai/death.dm | 32 ++----------------- 4 files changed, 12 insertions(+), 51 deletions(-) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 565948bb6da..b23b5419d3e 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -413,6 +413,10 @@ var/list/ghostteleportlocs = list() icon_state = "shuttle3" requires_power = 0 +/area/shuttle/abandoned + name = "Abandoned Ship" + icon_state = "shuttle" + /area/airtunnel1/ // referenced in airtunnel.dm:759 /area/dummy/ // Referenced in engine.dm:261 diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index b46e1102d8f..87d4b1ce974 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -34,6 +34,7 @@ light_color = LIGHT_COLOR_LIGHTBLUE /obj/machinery/computer/communications/New() + shuttle_caller_list += src ..() crew_announcement.newscast = 1 @@ -480,26 +481,8 @@ /obj/machinery/computer/communications/Destroy() - - for(var/obj/machinery/computer/communications/commconsole in world) - if(istype(commconsole.loc,/turf) && commconsole != src) - return ..() - - for(var/obj/item/weapon/circuitboard/communications/commboard in world) - if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) - return ..() - - for(var/mob/living/silicon/ai/shuttlecaller in player_list) - if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) - return ..() - - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team) - return ..() - - shuttle_master.requestEvac(null, "All communication consoles, boards, and AI's have been destroyed.") - log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.") - message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1) - + shuttle_caller_list -= src + shuttle_master.autoEvac() return ..() /obj/item/weapon/circuitboard/communications/Destroy() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index f34804bfbba..89b667f814f 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -186,8 +186,8 @@ var/list/ai_verbs_default = list( hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") ai_list += src + shuttle_caller_list += src ..() - return /mob/living/silicon/ai/proc/on_mob_init() src << "You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras)." @@ -229,6 +229,8 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/Destroy() ai_list -= src + shuttle_caller_list -= src + shuttle_master.autoEvac() qdel(eyeobj) // No AI, no Eye return ..() diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index dceb0710121..44119424aa0 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -12,36 +12,8 @@ see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO - var/callshuttle = 0 - - for(var/obj/machinery/computer/communications/commconsole in world) - if((commconsole.z in config.admin_levels)) - continue - if(istype(commconsole.loc,/turf)) - break - callshuttle++ - - for(var/obj/item/weapon/circuitboard/communications/commboard in world) - if((commboard.z in config.admin_levels)) - continue - if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) - break - callshuttle++ - - for(var/mob/living/silicon/ai/shuttlecaller in player_list) - if((shuttlecaller.z in config.admin_levels)) - continue - if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) - break - callshuttle++ - - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team) - callshuttle = 0 - - if(callshuttle == 3) //if all three conditions are met - shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.") - log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.") - message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1) + shuttle_caller_list -= src + shuttle_master.autoEvac() if(explosive) spawn(10)