Changes implicit nulls to be explicit (#24587)

* , , -> null

* more

* bam

* lets undo these, for atomicity

* NOW THIS IS MORE

* lol

* oops
This commit is contained in:
Contrabang
2024-03-14 18:38:32 +00:00
committed by GitHub
parent 5b829d8c0b
commit 694959178b
30 changed files with 95 additions and 95 deletions
+2 -2
View File
@@ -11,12 +11,12 @@
var/dice = num2text(sum) + "d" + num2text(side)
if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes")
if(alert("Do you want to inform the world about your game?", null,"Yes", "No") == "Yes")
to_chat(world, "<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>")
var/result = roll(dice)
if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes")
if(alert("Do you want to inform the world about the result?", null,"Yes", "No") == "Yes")
to_chat(world, "<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>")
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
+2 -2
View File
@@ -89,7 +89,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
set_typing(C, TRUE)
msg = clean_input("Message:", "Private message to [holder ? key_name(C, FALSE) : key_name_hidden(C, FALSE)]", , src)
msg = clean_input("Message:", "Private message to [holder ? key_name(C, FALSE) : key_name_hidden(C, FALSE)]", null, src)
set_typing(C, FALSE)
if(!msg)
@@ -227,7 +227,7 @@
// We only allow PMs once every 10 seconds, othewrise the channel can get spammed very quickly
last_discord_pm_time = world.time + 10 SECONDS
var/msg = clean_input("Message:", "Private message to admins on Discord / 400 character limit", , src)
var/msg = clean_input("Message:", "Private message to admins on Discord / 400 character limit", null, src)
if(!msg)
return
+8 -8
View File
@@ -10,10 +10,10 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
to_chat(usr, "<span class='warning'>The round hasn't started yet!</span>")
return
if(GLOB.deathsquad_sent)
if(alert("A Deathsquad is already being sent, are you sure you want to send another?",, "Yes", "No") != "Yes")
if(alert("A Deathsquad is already being sent, are you sure you want to send another?", null, "Yes", "No") != "Yes")
return
else
if(alert("Do you want to send in the Deathsquad? Once enabled, this is irreversible.",, "Yes", "No") != "Yes")
if(alert("Do you want to send in the Deathsquad? Once enabled, this is irreversible.", null, "Yes", "No") != "Yes")
return
message_admins("<span class='notice'>[key_name_admin(proccaller)] has started to spawn a DeathSquad.</span>")
log_admin("[key_name_admin(proccaller)] has started to spawn a DeathSquad.")
@@ -21,7 +21,7 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
var/mission = sanitize(copytext_char(input(src, "Please specify which mission the Deathsquad shall undertake.", "Specify Mission", "",), 1, MAX_MESSAGE_LEN))
if(!mission)
if(alert("Error, no mission set. Do you want to exit the setup process?",, "Yes", "No") == "Yes")
if(alert("Error, no mission set. Do you want to exit the setup process?", null, "Yes", "No") == "Yes")
message_admins("[key_name_admin(proccaller)] cancelled their Deathsquad.")
log_admin("[key_name(proccaller)] cancelled their Deathsquad.")
return
@@ -42,7 +42,7 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
var/is_leader = TRUE
if(GLOB.deathsquad_sent)
if(alert("A Deathsquad leader has previously been sent with an unrestricted NAD, would you like to spawn another unrestricted NAD?",, "Yes", "No") != "Yes")
if(alert("A Deathsquad leader has previously been sent with an unrestricted NAD, would you like to spawn another unrestricted NAD?", null, "Yes", "No") != "Yes")
is_leader = FALSE
GLOB.deathsquad_sent = TRUE
message_admins("[key_name_admin(proccaller)] has sent a Deathsquad with [commando_number] commandos.")
@@ -63,17 +63,17 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
new_nuke = TRUE
nuke_code = rand(10000, 99999)
if(alert("Do you want a new nuclear warhead to be spawned with this team?",, "Yes", "No") == "Yes")
if(alert("Do you want a new nuclear warhead to be spawned with this team?", null, "Yes", "No") == "Yes")
new_nuke = TRUE
// Find ghosts willing to be Deathsquad
var/list/commando_ghosts = list()
if(alert("Would you like to custom pick your Deathsquad?",, "Yes", "No") == "Yes")
if(alert("Would you like to custom pick your Deathsquad?", null, "Yes", "No") == "Yes")
var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_deathsquad")
commando_ghosts = pollCandidatesWithVeto(src, usr, commando_number, "Join the DeathSquad?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source)
commando_ghosts = pollCandidatesWithVeto(src, usr, commando_number, "Join the DeathSquad?", null, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source)
else
var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_deathsquad")
commando_ghosts = SSghost_spawns.poll_candidates("Join the Deathsquad?",, GLOB.responseteam_age, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source)
commando_ghosts = SSghost_spawns.poll_candidates("Join the Deathsquad?", null, GLOB.responseteam_age, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source)
if(length(commando_ghosts) > commando_number)
commando_ghosts.Cut(commando_number + 1) //cuts the ghost candidates down to the amount requested
if(!length(commando_ghosts))
+3 -3
View File
@@ -20,7 +20,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/returnval = null
var/class = null
switch(alert("Proc owned by something?",,"Yes","No"))
switch(alert("Proc owned by something?", null,"Yes","No"))
if("Yes")
targetselected = 1
if(src.holder && src.holder.marked_datum)
@@ -487,7 +487,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
return
if(M.ckey)
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.", null,"Yes","No") != "Yes")
return
else
var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
@@ -708,7 +708,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_DEBUG))
return
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
if(alert("Are you sure? This will start up the engine. Should only be used during debug!", null,"Yes","No") != "Yes")
return
for(var/obj/machinery/power/emitter/E in GLOB.machines)
+3 -3
View File
@@ -10,11 +10,11 @@
if(!SSticker)
alert("The game hasn't started yet!")
return
if(alert("Do you want to spawn a Gimmick Team at YOUR CURRENT LOCATION?",,"Yes","No")=="No")
if(alert("Do you want to spawn a Gimmick Team at YOUR CURRENT LOCATION?", null,"Yes","No")=="No")
return
var/turf/T = get_turf(mob)
var/pick_manually = 0
if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.",,"Yes","No")=="Yes")
if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.", null,"Yes","No")=="Yes")
pick_manually = 1
var/list/teamsizeoptions = list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
var/teamsize = input(src, "How many team members?") as null|anything in teamsizeoptions
@@ -36,7 +36,7 @@
if(isnull(dresscode))
return
var/is_syndicate = FALSE
if(alert("Do you want these characters automatically classified as antagonists?",,"Yes","No")=="Yes")
if(alert("Do you want these characters automatically classified as antagonists?", null,"Yes","No")=="Yes")
is_syndicate = TRUE
var/datum/outfit/O = outfit_list[dresscode]
@@ -13,13 +13,13 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
if(!SSticker)
alert("The game hasn't started yet!")
return
if(alert("Do you want to send in the Syndicate Infiltration Team?",,"Yes","No")=="No")
if(alert("Do you want to send in the Syndicate Infiltration Team?", null,"Yes","No")=="No")
return
var/spawn_dummies = 0
if(alert("Spawn full-size team, even if there aren't enough ghosts to populate them?",,"Yes","No")=="Yes")
if(alert("Spawn full-size team, even if there aren't enough ghosts to populate them?", null,"Yes","No")=="Yes")
spawn_dummies = 1
var/pick_manually = 0
if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.",,"Yes","No")=="Yes")
if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.", null,"Yes","No")=="Yes")
pick_manually = 1
var/list/teamsizeoptions = list(2,3,4,5,6)
var/teamsize = input(src, "How many team members, including the team leader?") as null|anything in teamsizeoptions
@@ -36,7 +36,7 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
var/tcamount = text2num(tctext)
tcamount = clamp(tcamount, 0, 1000)
if(GLOB.sent_syndicate_infiltration_team == 1)
if(alert("A Syndicate Infiltration Team has already been sent. Sure you want to send another?",,"Yes","No")=="No")
if(alert("A Syndicate Infiltration Team has already been sent. Sure you want to send another?", null,"Yes","No")=="No")
return
var/syndicate_leader_selected = 0
+1 -1
View File
@@ -356,7 +356,7 @@ GLOBAL_PROTECT(VVmaint_only)
L += var_value
switch(alert("Would you like to associate a value with the list entry?",,"Yes","No"))
switch(alert("Would you like to associate a value with the list entry?", null,"Yes","No"))
if("Yes")
L[var_value] = mod_list_add_ass(O) //hehe
if(O)
+4 -4
View File
@@ -366,7 +366,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//Check if they were an alien
if(G_found.mind.assigned_role=="Alien")
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
if(alert("This character appears to have been an alien. Would you like to respawn them as such?", null,"Yes","No")=="Yes")
var/turf/T
if(GLOB.xeno_spawn.len) T = pick(GLOB.xeno_spawn)
else T = pick(GLOB.latejoin)
@@ -488,10 +488,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!issilicon(new_character))//If they are not a cyborg/AI.
if(!record_found && new_character.mind.assigned_role != new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. Offstation special characters announced anyway.
//Power to the user!
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?", null,"No","Yes")=="Yes")
GLOB.data_core.manifest_inject(new_character)
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
if(alert(new_character,"Would you like an active AI to announce this character?", null,"No","Yes")=="Yes")
call(TYPE_PROC_REF(/mob/new_player, AnnounceArrival))(new_character, new_character.mind.assigned_role)
message_admins("<span class='notice'>[key_name_admin(usr)] has respawned [key_name_admin(G_found)] as [new_character.real_name].</span>", 1)
@@ -631,7 +631,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!message)
return
switch(alert("Should this be announced to the general population?",,"Yes","No", "Cancel"))
switch(alert("Should this be announced to the general population?", null,"Yes","No", "Cancel"))
if("Yes")
var/beepsound = input(usr, "What sound should the announcement make?", "Announcement Sound", "") as anything in MsgSound
@@ -6,7 +6,7 @@
if(!check_rights(R_ADMIN|R_DEBUG))
return
var/choice = alert("Do you want to rebuild space transitions?",,"Yes", "No")
var/choice = alert("Do you want to rebuild space transitions?", null,"Yes", "No")
if(choice == "No")
return
@@ -29,7 +29,7 @@
if(!check_rights(R_ADMIN|R_DEBUG))
return
var/choice = alert("Are you sure you want to make a space map out of turfs?",,"Yes","No")
var/choice = alert("Are you sure you want to make a space map out of turfs?", null,"Yes","No")
if(choice == "No")
return
@@ -15,7 +15,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
if(GLOB.sent_syndicate_strike_team == 1)
alert("The Syndicate are already sending a team, Mr. Dumbass.")
return
if(alert("Do you want to send in the Syndicate Strike Team? Once enabled, this is irreversible.",,"Yes","No")=="No")
if(alert("Do you want to send in the Syndicate Strike Team? Once enabled, this is irreversible.", null,"Yes","No")=="No")
return
alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. The first one selected/spawned will be the team leader.")
@@ -25,7 +25,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
while(!input)
input = sanitize(copytext_char(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
if(alert("Error, no mission set. Do you want to exit the setup process?", null,"Yes","No")=="Yes")
return
if(GLOB.sent_syndicate_strike_team)
@@ -46,7 +46,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
// Find ghosts willing to be SST
var/image/I = new('icons/obj/cardboard_cutout.dmi', "cutout_commando")
var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = I)
var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?", null, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = I)
if(!length(commando_ghosts))
to_chat(usr, "<span class='userdanger'>Nobody volunteered to join the SST.</span>")
return