mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 16:07:36 +01:00
e1770df81e
Replace /datum/gas_mixture/proc/return_pressure with XGM_PRESSURE(xgm) macro. Having such a relatively simple statement contributing proc overhead to procs called millions of times is ridiculous Rename /datum/gas_mixture/proc/zburn to react, deleting the old react which was just an alias for it. Free proc overhead Turn check_combustibility into a macro CHECK_COMBUSTIBLE(is_cmb, xgm). also rewrite it slightly so that it only needs to do one pass. Its a bit nasty so I apologize for that, but speeeeed. Delete most powernet and obj/machinery/power procs for handling power, replacing them with macros. The fact that we were unironically calling a draw_power() on APCs to call draw_power() on their terminals to call draw_power() on their powernet every single process tick was insane. Turn `between` into a macro alias for clamp() since the param order is different turn `Percent` into a macro AS_PCT Rewrite significant chunks of update_canmove so its not quite as horrifying of a proc and hopefully doesn't eat the entire mob subsystem every movement now
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
/datum/admin_secret_item/fun_secret/ghost_mode
|
|
name = "Ghost Mode"
|
|
var/list/affected_mobs
|
|
|
|
/datum/admin_secret_item/fun_secret/ghost_mode/New()
|
|
..()
|
|
affected_mobs = list()
|
|
|
|
/datum/admin_secret_item/fun_secret/ghost_mode/execute(var/mob/user)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
var/list/affected_areas = list()
|
|
for(var/mob/M in GLOB.living_mob_list)
|
|
if(M.stat == CONSCIOUS && !(M in affected_mobs))
|
|
affected_mobs |= M
|
|
switch(rand(1,4))
|
|
if(1)
|
|
M.show_message(SPAN_NOTICE("You shudder as if cold..."), 1)
|
|
if(2)
|
|
M.show_message(SPAN_NOTICE("You feel something gliding across your back..."), 1)
|
|
if(3)
|
|
M.show_message(SPAN_NOTICE("Your eyes twitch, you feel like something you can't see is here..."), 1)
|
|
if(4)
|
|
M.show_message(SPAN_NOTICE("You notice something moving out of the corner of your eye, but nothing is there..."), 1)
|
|
|
|
for(var/obj/W in orange(5,M))
|
|
if(prob(25) && !W.anchored)
|
|
step_rand(W)
|
|
|
|
var/area/A = get_area(M)
|
|
if(A.requires_power && !A.always_unpowered && A.power_light && !is_centcom_level(A.z) && !is_reserved_level(A.z))
|
|
affected_areas |= get_area(M)
|
|
|
|
affected_mobs |= user
|
|
for(var/area/AffectedArea in affected_areas)
|
|
AffectedArea.power_light = 0
|
|
SEND_SIGNAL(AffectedArea, COMSIG_AREA_POWER_CHANGE)
|
|
spawn(rand(25,50))
|
|
AffectedArea.power_light = 1
|
|
SEND_SIGNAL(AffectedArea, COMSIG_AREA_POWER_CHANGE)
|
|
|
|
sleep(100)
|
|
for(var/mob/M in affected_mobs)
|
|
M.show_message(SPAN_NOTICE("The chilling wind suddenly stops..."), 1)
|
|
affected_mobs.Cut()
|
|
affected_areas.Cut()
|