[MIRROR] Does some code standardization/consistency. (#3161)

* Does some code standardization/consistency.

* fixes merge conflict generation

* Missed a few, oops

* Update pierrot_throat.dm
This commit is contained in:
CitadelStationBot
2017-10-21 06:10:22 -05:00
committed by Poojawa
parent 953a353ce7
commit adc2e46114
151 changed files with 970 additions and 524 deletions

View File

@@ -50,9 +50,12 @@
announceinirc = 1
blockselfban = 1
kickbannedckey = 1
if( !bantype_pass ) return
if( !istext(reason) ) return
if( !isnum(duration) ) return
if( !bantype_pass )
return
if( !istext(reason) )
return
if( !isnum(duration) )
return
var/ckey
var/computerid
@@ -174,7 +177,8 @@
if(BANTYPE_ANY_JOB)
bantype_str = "ANYJOB"
bantype_pass = 1
if( !bantype_pass ) return
if( !bantype_pass )
return
var/bantype_sql
if(bantype_str == "ANY")

View File

@@ -65,7 +65,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist = new("data/banlist.bdb")
log_admin("Loading Banlist")
if (!length(GLOB.Banlist.dir)) log_admin("Banlist is empty.")
if (!length(GLOB.Banlist.dir))
log_admin("Banlist is empty.")
if (!GLOB.Banlist.dir.Find("base"))
log_admin("Banlist missing base dir.")
@@ -89,8 +90,10 @@ GLOBAL_PROTECT(Banlist)
message_admins("Invalid Ban.")
continue
if (!GLOB.Banlist["temp"]) continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
if (!GLOB.Banlist["temp"])
continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
RemoveBan(A)
return 1
@@ -133,7 +136,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist["id"] >> id
GLOB.Banlist.cd = "/base"
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
if (!GLOB.Banlist.dir.Remove(foldername))
return 0
if(!usr)
log_admin_private("Ban Expired: [key]")

View File

@@ -594,7 +594,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
if(!D) return
if(!D)
return
T.ForceContractDisease(new D)
SSblackbox.add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")

View File

@@ -101,7 +101,8 @@ if it doesn't return 1 and show_msg=1 it will prints a message explaining why th
generally it would be used like so:
/proc/admin_proc()
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
to_chat(world, "you have enough rights!")
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call

View File

@@ -334,9 +334,12 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
for(var/mob/living/H in GLOB.player_list)
if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H)) continue
if(is_special_character(H)) continue
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H))
continue
if(is_special_character(H))
continue
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
var/datum/objective/new_objective = new
@@ -546,7 +549,8 @@
if(!check_rights(R_DEBUG))
return
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
if(!J)
return
J.total_positions = -1
J.spawn_positions = -1
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")

View File

@@ -2,7 +2,8 @@
var/text
for(var/A in typesof(/obj/item))
var/obj/item/O = new A( locate(1,1,1) )
if(!O) continue
if(!O)
continue
var/icon/IL = new(O.lefthand_file)
var/list/Lstates = IL.IconStates()
var/icon/IR = new(O.righthand_file)
@@ -28,7 +29,5 @@
if(text)
var/F = file("broken_icons.txt")
fdel(F)
WRITE_FILE(F, text)
WRITE_FILE(F, text)
to_chat(world, "Completely successfully and written to [F]")

View File

@@ -181,7 +181,8 @@
if(varholder in locked && !check_rights(R_DEBUG,0))
return 1
var/thetype = input(user,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return 1
if(!thetype)
return 1
switch(thetype)
if("text")
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
@@ -200,7 +201,8 @@
var/datum/mapGenerator/MP = path
options[initial(MP.buildmode_name)] = path
var/type = input(user,"Select Generator Type","Type") as null|anything in options
if(!type) return
if(!type)
return
generator_path = options[type]
cornerA = null

View File

@@ -31,7 +31,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Advanced ProcCall"
set waitfor = 0
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
var/datum/target = null
var/targetselected = 0

View File

@@ -36,7 +36,8 @@
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
organ = organs[organ]
if(!organ) return
if(!organ)
return
var/obj/item/organ/O
var/obj/item/implant/I

View File

@@ -194,15 +194,20 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
if(!level) return
if(!level)
return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
if(!num_level)
return
if(!isnum(num_level))
return
var/type_text = input("Which type path?","Path?") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0
@@ -238,9 +243,11 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0

View File

@@ -545,15 +545,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) return
if(devastation == null)
return
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null) return
if(heavy == null)
return
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
if(light == null) return
if(light == null)
return
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) return
if(flash == null)
return
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) return
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
@@ -577,9 +582,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
if(heavy == null)
return
var/light = input("Range of light pulse.", text("Input")) as num|null
if(light == null) return
if(light == null)
return
if (heavy || light)
@@ -960,7 +967,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
set name = "Toggle AntagHUD"
set desc = "Toggles the Admin AntagHUD"
if(!holder) return
if(!holder)
return
var/adding_hud = !has_antag_hud()