mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Rewrote blackholes (gravitational anomalies) and wormholes to try and optimise them a little. If you have any concerns about how I've done so just give me a shout and I'll either rework them or revert my changes back. Wormholes especially seem a bit faster on my laptop. Smoke has temporarily been removed from the blackhole event until I get time to investigate why the hell effect_systems are using so much memory ( spark effects were using 40% of my processor a second ago D: ). To compensate this I made them a new sprite.
Commented out the authentication system. It was the remnants of the old goon authentication stuff (or maybe even older) and wasn't actually used in our code at all (at least not in any useful way, it was merely called and short-circuited to 1, so all those if(authenticated) were totally pointless. This has removed 3 unused variables from every client, a bunch of unused variables from the config and two empty text files! Committed (as a config option) a feature requested by Apoc station. It causes a 'reply to' window to popup when an admin PMs a non-admin player. It's meant to grab their attention so they can't say "I didn't see your PM". It defaults to off. To turn it on just uncomment the #POPUP_ADMIN_PM line in config/config.txt Fixed a derp in isday where it was fetching the month instead of the day. Removed medal references from Gib() Removed the medal_hub global variables because they aren't used in any way shape or form. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3444 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -7,7 +7,7 @@ var/global/BSACooldown = 0
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
log_adminwarn(rendered)
|
||||
for (var/mob/M in world)
|
||||
if (M && M.client && M.client.holder && M.client.authenticated)
|
||||
if (M && M.client && M.client.holder)
|
||||
if (admin_ref)
|
||||
M << dd_replaceText(rendered, "%admin_ref%", "\ref[M]")
|
||||
else
|
||||
@@ -959,15 +959,15 @@ var/global/BSACooldown = 0
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
|
||||
|
||||
if (href_list["adminauth"])
|
||||
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
|
||||
var/mob/M = locate(href_list["adminauth"])
|
||||
if (ismob(M) && !M.client.authenticated && !M.client.authenticating)
|
||||
M.client.verbs -= /client/proc/authorize
|
||||
M.client.authenticated = text("admin/[]", usr.client.authenticated)
|
||||
log_admin("[key_name(usr)] authorized [key_name(M)]")
|
||||
message_admins("\blue [key_name_admin(usr)] authorized [key_name_admin(M)]", 1)
|
||||
M.client << text("You have been authorized by []", usr.key)
|
||||
// if (href_list["adminauth"])
|
||||
// if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
|
||||
// var/mob/M = locate(href_list["adminauth"])
|
||||
// if (ismob(M) && !M.client.authenticated && !M.client.authenticating)
|
||||
// M.client.verbs -= /client/proc/authorize
|
||||
// M.client.authenticated = text("admin/[]", usr.client.authenticated)
|
||||
// log_admin("[key_name(usr)] authorized [key_name(M)]")
|
||||
// message_admins("\blue [key_name_admin(usr)] authorized [key_name_admin(M)]", 1)
|
||||
// M.client << text("You have been authorized by []", usr.key)
|
||||
|
||||
if (href_list["revive"])
|
||||
if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
|
||||
@@ -1803,32 +1803,16 @@ var/global/BSACooldown = 0
|
||||
world << sound('granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(50, 300))
|
||||
spawn(rand(100, 600))
|
||||
del(bh)
|
||||
if("timeanomalies")
|
||||
|
||||
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","STA")
|
||||
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('spanomalies.ogg')
|
||||
var/list/turfs = list( )
|
||||
var/turf/picked
|
||||
for(var/turf/T in world)
|
||||
if(T.z == 1 && istype(T,/turf/simulated/floor) && !istype(T,/turf/space))
|
||||
turfs += T
|
||||
for(var/turf/T in world)
|
||||
set background = 1
|
||||
if(prob(20) && T.z == 1 && istype(T,/turf/simulated/floor))
|
||||
spawn(50+rand(0,3000))
|
||||
picked = pick(turfs)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal( T )
|
||||
P.target = picked
|
||||
P.creator = null
|
||||
P.icon = 'objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
spawn(rand(300,600))
|
||||
del(P)
|
||||
//moved to its own dm so I could split it up and prevent the spawns copying variables over and over
|
||||
//can be found in code\game\game_modes\events\wormholes.dm
|
||||
wormhole_event()
|
||||
|
||||
if("goblob")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BL")
|
||||
@@ -2218,10 +2202,10 @@ var/global/BSACooldown = 0
|
||||
var/dat = "<html><head><title>Options for [M.key]</title></head>"
|
||||
var/foo = "\[ "
|
||||
if (ismob(M) && M.client)
|
||||
if(!M.client.authenticated && !M.client.authenticating)
|
||||
foo += text("<A HREF='?src=\ref[src];adminauth=\ref[M]'>Authorize</A> | ")
|
||||
else
|
||||
foo += text("<B>Authorized</B> | ")
|
||||
// if(!M.client.authenticated && !M.client.authenticating)
|
||||
// foo += text("<A HREF='?src=\ref[src];adminauth=\ref[M]'>Authorize</A> | ")
|
||||
// else
|
||||
// foo += text("<B>Authorized</B> | ")
|
||||
foo += text("<A HREF='?src=\ref[src];prom_demot=\ref[M.client]'>Promote/Demote</A> | ")
|
||||
if(!istype(M, /mob/new_player))
|
||||
if(!ismonkey(M))
|
||||
@@ -2518,14 +2502,14 @@ var/global/BSACooldown = 0
|
||||
|
||||
for(var/mob/CM in world)
|
||||
if(CM.client)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2) || !CM.client.authenticated)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
|
||||
for(var/mob/CM in world)
|
||||
if(CM.client)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2) || !CM.client.authenticated)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
|
||||
Reference in New Issue
Block a user