Files
Paradise/code/modules/admin/verbs/freeze.dm
S34N 91660824fa Browser/TGUI Stat Panels (#24065)
* initial commit (broken)

* load the html

* fix this

* Fix various issues with browser statpanel

* Fix Alt Clicking opening up a window and Add back some object verbs to the browser stat panel

* Optimize stat panel and fix guardian verbs

* Restyles Stat Panel, Adds Subpanel Sub-Categories

* Use better layout for verbs in stat panel

* Updates statpanel verb widths to be more dynamic at higher screen resolutions.

* Adjust stat panel grid item widths and breakpoints

* refactors statpanel to use tgui API

* CI moment

* more CI

* this stupid thing

* Apply suggestions from code review

Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/client/client_procs.dm

* ci fix

* emergency mc debug view

* temp revert some code change suggestions due to massive runtiming

* proper atom click topic implementation

* optimise

* mob clicking in stat panels work

* yeet spell tab thingy

* yeet simple stat panel pref

* allow insertion of html into MC tab content

* tidy up status tab

* Apply suggestions from code review

* fix this

* fix CI

* oops

* fix index runtime

* fixes MC tab showing up for mentors, fixes runtime

* safeties!

* Return of theme support

* more fixes

* fix view range pref, tidy prefs tab

* Remove old stat panel from themes

* fixes

* make sure verbs don't go missing

* fix ooc/looc breaking

* Revert "make sure verbs don't go missing"

This reverts commit 7d07ad45ed.

* fix this properly

* fix stat panel hitting rate limiters

* fix borg status tab

* Object Window Niceties

* Adds file cycling for icon2base64

* optimizes icon2html() for icon files known to be in the rsc at compile time

* CI moment

* remove dupe emergency shuttle timers

* more robust verb updates

* statpanel tweaks

* zip archived changelog to avoid search results

* optimise

* fix mentor chat wonkyness when disabled

* debug log moment

* i am very smart

* reintroduce this because it was needed

* better time listings

* less jank

* stops telling admins they arent mentors

* returns MC tab pref for admins

* Update code/controllers/subsystem/SSstatpanel.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* lewcc

* OD typemaker prep

---------

Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Aylong <alexanderkitsa@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
2024-03-07 10:31:36 -05:00

107 lines
3.9 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////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.
/client/proc/freeze(atom/movable/M)
set name = "\[Admin\] Freeze"
if(!check_rights(R_ADMIN))
return
M.admin_Freeze(src)
/// 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, "<span class='warning'>Freeze is not able to be called on this type of object.</span")
return
///mob freeze procs
/mob/living/admin_Freeze(client/admin, skip_overlays = FALSE, mech = null)
if(!istype(admin))
return
if(!(src in GLOB.frozen_atom_list))
GLOB.frozen_atom_list += src
var/obj/effect/overlay/adminoverlay/AO = new
if(skip_overlays)
overlays += AO
anchored = TRUE
admin_prev_sleeping = AmountSleeping()
frozen = AO
PermaSleeping()
else
GLOB.frozen_atom_list -= src
if(skip_overlays)
overlays -= frozen
anchored = FALSE
frozen = null
SetSleeping(admin_prev_sleeping, TRUE)
admin_prev_sleeping = null
to_chat(src, "<b><font color= red>You have been [frozen ? "frozen" : "unfrozen"] by [admin]</b></font>")
message_admins("<span class='notice'>[key_name_admin(admin)] [frozen ? "froze" : "unfroze"] [key_name_admin(src)] [mech ? "in a [mech]" : ""]</span>")
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(..()) // 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 class='notice'>[key_name_admin(admin)] [frozen ? "froze" : "unfroze"] an empty [name]</span>")
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", list(z))
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", list(z))
GLOB.frozen_atom_list -= src
processes = TRUE
cut_overlay(freeze_overlay)
message_admins("<span class='notice'>[key_name_admin(admin)] [processes ? "unfroze" : "froze"] a supermatter crystal</span>")
log_admin("[key_name(admin)] [processes ? "unfroze" : "froze"] a supermatter crystal")