//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////Freeze Mob/Mech Verb -- Ported from NSS Pheonix (Unbound Travels)///////// //////////////////////////////////////////////////////////////////////////////// //////Allows admin's to right click on any mob/mech and freeze them in place./// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms. USER_CONTEXT_MENU(admin_freeze, R_ADMIN, "\[Admin\] Freeze", atom/movable/M) M.admin_Freeze(client) /// Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen. /atom/movable/proc/admin_Freeze(client/admin) to_chat(admin, "Freeze is not able to be called on this type of object.You have been [frozen ? "frozen" : "unfrozen"] by [admin]") message_admins(SPAN_NOTICE("[key_name_admin(admin)] [frozen ? "froze" : "unfroze"] [key_name_admin(src)] [mech ? "in a [mech]" : ""]")) log_admin("[key_name(admin)] [frozen ? "froze" : "unfroze"] [key_name(src)] [mech ? "in a [mech]" : ""]") update_icons() return frozen /mob/living/simple_animal/slime/admin_Freeze(admin) if(..()) // The result of the parent call here will be the value of the mob's `frozen` variable after they get (un)frozen. adjustHealth(1000) //arbitrary large value else revive() /mob/living/simple_animal/admin_Freeze(admin) // If we were frozen before this call, make sure we // reset our health before attempting a rejuvenate, // as removing status effects can perform stat calls. if(frozen && del_on_death) health = admin_prev_health if(..()) // The result of the parent call here will be the value of the mob's `frozen` variable after they get (un)frozen. admin_prev_health = health health = 0 else revive() overlays.Cut() //////////////////////////Freeze Mech /obj/mecha/admin_Freeze(client/admin) var/obj/effect/overlay/adminoverlay/freeze_overlay = new if(!frozen) GLOB.frozen_atom_list += src frozen = TRUE overlays += freeze_overlay else GLOB.frozen_atom_list -= src frozen = FALSE overlays -= freeze_overlay if(occupant) occupant.admin_Freeze(admin, mech = name) // We also want to freeze the driver of the mech. else message_admins(SPAN_NOTICE("[key_name_admin(admin)] [frozen ? "froze" : "unfroze"] an empty [name]")) log_admin("[key_name(admin)] [frozen ? "froze" : "unfroze"] an empty [name]") /obj/machinery/atmospherics/supermatter_crystal/admin_Freeze(client/admin) var/obj/effect/overlay/adminoverlay/freeze_overlay = new if(processes) radio.autosay("Alert: Unknown intervention has frozen causality around the crystal. It is not progressing in local timespace.", name, "Engineering") GLOB.frozen_atom_list += src processes = FALSE add_overlay(freeze_overlay) else radio.autosay("Alert: Unknown intervention has ceased around the crystal. It has returned to the regular flow of time.", name, "Engineering") GLOB.frozen_atom_list -= src processes = TRUE cut_overlay(freeze_overlay) message_admins(SPAN_NOTICE("[key_name_admin(admin)] [processes ? "unfroze" : "froze"] a supermatter crystal")) log_admin("[key_name(admin)] [processes ? "unfroze" : "froze"] a supermatter crystal") /obj/machinery/atmospherics/fission_reactor/admin_Freeze(client/admin) var/obj/effect/overlay/adminoverlay/freeze_overlay = new freeze_overlay.pixel_x = 16 if(!admin_intervention) radio.autosay("Alert: Unknown intervention is interfering in reactor core operations. It is not progressing in local timespace.", name, "Engineering") GLOB.frozen_atom_list += src admin_intervention = TRUE add_overlay(freeze_overlay) else radio.autosay("Alert: Unknown intervention has ceased within the reactor core. It has returned to the regular flow of time.", name, "Engineering") GLOB.frozen_atom_list -= src admin_intervention = FALSE cut_overlay(freeze_overlay) message_admins(SPAN_NOTICE("[key_name_admin(admin)] [!admin_intervention ? "unfroze" : "froze"] the NGCR Reactor")) log_admin("[key_name(admin)] [!admin_intervention ? "unfroze" : "froze"] the NGCR Reactor")