everything to controllers

This commit is contained in:
deathride58
2018-07-02 00:10:31 -04:00
parent db2a15d42d
commit 63013f8964
60 changed files with 486 additions and 356 deletions
+4
View File
@@ -131,6 +131,10 @@
/proc/log_query_debug(text)
WRITE_LOG(GLOB.query_debug_log, "SQL: [text]")
/proc/log_job_debug(text)
if (CONFIG_GET(flag/log_job_debug))
WRITE_LOG(GLOB.world_job_debug_log, "JOB: [text]")
/* Log to both DD and the logfile. */
/proc/log_world(text)
WRITE_LOG(GLOB.world_runtime_log, text)
+1 -1
View File
@@ -433,7 +433,7 @@
if(!gametypeCheck.age_check(M.client))
continue
if(jobbanType)
if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, ROLE_SYNDICATE))
if(jobban_isbanned(M, jobbanType) || QDELETED(M) || jobban_isbanned(M, ROLE_SYNDICATE) || QDELETED(M))
continue
showCandidatePollWindow(M, poll_time, Question, result, ignore_category, time_passed, flashwindow)
+1
View File
@@ -529,6 +529,7 @@ Proc for attack log creation, because really why not
step(X, pick(NORTH, SOUTH, EAST, WEST))
/proc/deadchat_broadcast(message, mob/follow_target=null, turf/turf_target=null, speaker_key=null, message_type=DEADCHAT_REGULAR)
message = "<span class='linkify'>[message]</span>"
for(var/mob/M in GLOB.player_list)
var/datum/preferences/prefs
if(M.client && M.client.prefs)
+1 -1
View File
@@ -1,4 +1,4 @@
// Ensure the frequency is within bounds of what it should be sending/recieving at
// Ensure the frequency is within bounds of what it should be sending/receiving at
/proc/sanitize_frequency(frequency, free = FALSE)
. = round(frequency)
if(free)
+2
View File
@@ -524,6 +524,8 @@
return
var/datum/DBQuery/query_admin_rank_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] p INNER JOIN [format_table_name("admin")] a ON p.ckey = a.ckey SET p.lastadminrank = a.rank")
query_admin_rank_update.Execute()
qdel(query_admin_rank_update)
//json format backup file generation stored per server
var/json_file = file("data/admins_backup.json")
var/list/file_data = list("ranks" = list(), "admins" = list())
+2 -2
View File
@@ -64,7 +64,7 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
//Takes a value of time in deciseconds.
//Returns a text value of that number in hours, minutes, or seconds.
/proc/DisplayTimeText(time_value, truncate = FALSE)
var/second = time_value*0.1
var/second = (time_value)*0.1
var/second_adjusted = null
var/second_rounded = FALSE
var/minute = null
@@ -144,7 +144,7 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
else if(day && (!minute || !second))
hour = " and 1 hour"
else
hour = "[truncate ? "hour" : "1 hour"]"
hour = "[truncate ? "hour" : "1 hour"]"
else
hour = null
-15
View File
@@ -218,21 +218,6 @@
. = "NONE"
return .
/proc/ui_style2icon(ui_style)
switch(ui_style)
if("Retro")
return 'icons/mob/screen_retro.dmi'
if("Plasmafire")
return 'icons/mob/screen_plasmafire.dmi'
if("Slimecore")
return 'icons/mob/screen_slimecore.dmi'
if("Operative")
return 'icons/mob/screen_operative.dmi'
if("Clockwork")
return 'icons/mob/screen_clockwork.dmi'
else
return 'icons/mob/screen_midnight.dmi'
//colour formats
/proc/rgb2hsl(red, green, blue)
red /= 255;green /= 255;blue /= 255;
+8 -6
View File
@@ -186,7 +186,7 @@ Turf and target are separate in case you want to teleport some distance from a t
return 1
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
/mob/proc/rename_self(role, client/C)
/mob/proc/apply_pref_name(role, client/C)
if(!C)
C = client
var/oldname = real_name
@@ -194,8 +194,10 @@ Turf and target are separate in case you want to teleport some distance from a t
var/loop = 1
var/safety = 0
var/banned = jobban_isbanned(src, "appearance")
while(loop && safety < 5)
if(C && C.prefs.custom_names[role] && !safety && (!jobban_isbanned(src, "appearance")))
if(C && C.prefs.custom_names[role] && !safety && !banned)
newname = C.prefs.custom_names[role]
else
switch(role)
@@ -207,10 +209,8 @@ Turf and target are separate in case you want to teleport some distance from a t
newname = pick(GLOB.mime_names)
if("ai")
newname = pick(GLOB.ai_names)
if("deity")
newname = pick(GLOB.clown_names|GLOB.ai_names|GLOB.mime_names) //pick any old name
else
return
return FALSE
for(var/mob/living/M in GLOB.player_list)
if(M == src)
@@ -224,6 +224,8 @@ Turf and target are separate in case you want to teleport some distance from a t
if(newname)
fully_replace_character_name(oldname,newname)
return TRUE
return FALSE
//Picks a string of symbols to display as the law number for hacked or ion laws
@@ -899,7 +901,7 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
/proc/check_target_facings(mob/living/initator, mob/living/target)
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
That said, this proc should not be used if the change facing proc of the click code is overriden at the same time*/
That said, this proc should not be used if the change facing proc of the click code is overridden at the same time*/
if(!ismob(target) || target.lying)
//Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side
return FALSE