diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 29d72d603f..a3d14b26ad 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -9,13 +9,13 @@ GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, //Since it didn't really belong in any other category, I'm putting this here //This is for procs to replace all the goddamn 'in world's that are chilling around the code -GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**. Excludes /mob/dead/new_player +GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**. GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless -GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob +GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player GLOBAL_LIST_EMPTY(drones_list) GLOBAL_LIST_EMPTY(dead_mob_list) //all dead mobs, including clientless. Excludes /mob/dead/new_player -GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin. +GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin. GLOBAL_LIST_EMPTY(silicon_mobs) //all silicon mobs GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain brains or simple animals diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index ea01a87506..88c7d09005 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -41,7 +41,7 @@ set waitfor = FALSE var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s imaginary friend?", ROLE_PAI, null, null, 75, friend) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) friend.key = C.key friend_initialized = TRUE else diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm index 9e273f19f7..f33a69a3af 100644 --- a/code/datums/brain_damage/split_personality.dm +++ b/code/datums/brain_damage/split_personality.dm @@ -25,7 +25,7 @@ set waitfor = FALSE var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s split personality?", ROLE_PAI, null, null, 75, stranger_backseat) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) stranger_backseat.key = C.key log_game("[key_name(stranger_backseat)] became [key_name(owner)]'s split personality.") message_admins("[key_name_admin(stranger_backseat)] became [key_name_admin(owner)]'s split personality.") @@ -183,7 +183,7 @@ set waitfor = FALSE var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s brainwashed mind?", null, null, null, 75, stranger_backseat) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) stranger_backseat.key = C.key else qdel(src) diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 4368797f06..88e2b40ad6 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -243,7 +243,7 @@ var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) var/mob/living/simple_animal/shade/S = new(src) S.real_name = name S.name = name diff --git a/code/modules/admin/fun_balloon.dm b/code/modules/admin/fun_balloon.dm index 6508953694..c41fa4c346 100644 --- a/code/modules/admin/fun_balloon.dm +++ b/code/modules/admin/fun_balloon.dm @@ -53,7 +53,7 @@ var/question = "Would you like to be [group_name]?" var/list/candidates = pollCandidatesForMobs(question, ROLE_PAI, null, FALSE, 100, bodies) while(LAZYLEN(candidates) && LAZYLEN(bodies)) - var/client/C = pick_n_take(candidates) + var/mob/dead/observer/C = pick_n_take(candidates) var/mob/living/body = pick_n_take(bodies) to_chat(body, "Your mob has been taken over by a ghost!") diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 48e7cf896f..f9582bdce8 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -80,7 +80,7 @@ GLOBAL_LIST_EMPTY(antagonists) var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", null, job_rank, 50, owner.current) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!") message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") owner.current.ghostize(0) diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index 5695a8c480..6c723e96ec 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -62,8 +62,8 @@ to_chat(H, "You already used this contract!") return used = TRUE - var/client/C = pick(candidates) - spawn_antag(C, get_turf(src), href_list["school"],H.mind) + var/mob/dead/observer/C = pick(candidates) + spawn_antag(C.client, get_turf(src), href_list["school"],H.mind) else to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.") @@ -124,8 +124,8 @@ if(!(check_usability(user))) return used = TRUE - var/client/C = pick(nuke_candidates) - spawn_antag(C, get_turf(src), "syndieborg", user.mind) + var/mob/dead/observer/G = pick(nuke_candidates) + spawn_antag(G.client, get_turf(src), "syndieborg", user.mind) do_sparks(4, TRUE, src) qdel(src) else @@ -218,8 +218,8 @@ if(used) return used = TRUE - var/client/C = pick(candidates) - spawn_antag(C, get_turf(src), initial(demon_type.name),user.mind) + var/mob/dead/observer/C = pick(candidates) + spawn_antag(C.client, get_turf(src), initial(demon_type.name),user.mind) to_chat(user, shatter_msg) to_chat(user, veil_msg) playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1) diff --git a/code/modules/antagonists/blob/blob/powers.dm b/code/modules/antagonists/blob/blob/powers.dm index 131f3c14cc..9e915ee0fa 100644 --- a/code/modules/antagonists/blob/blob/powers.dm +++ b/code/modules/antagonists/blob/blob/powers.dm @@ -171,7 +171,7 @@ blobber.update_icons() blobber.adjustHealth(blobber.maxHealth * 0.5) blob_mobs += blobber - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) blobber.key = C.key SEND_SOUND(blobber, sound('sound/effects/blobattack.ogg')) SEND_SOUND(blobber, sound('sound/effects/attackblob.ogg')) diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index 2eb3315e03..a4eed086c8 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -338,7 +338,7 @@ set waitfor = FALSE var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [L.name], an inactive clock cultist?", ROLE_SERVANT_OF_RATVAR, null, ROLE_SERVANT_OF_RATVAR, 50, L) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) to_chat(L, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!") message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.") L.ghostize(0) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 4c95b0a408..030a59b14b 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -575,7 +575,7 @@ structure_check() searches for nearby cultist structures required for the invoca set waitfor = FALSE var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [mob_to_revive.name], an inactive blood cultist?", ROLE_CULTIST, null, ROLE_CULTIST, 50, mob_to_revive) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) to_chat(mob_to_revive.mind, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form.") message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.") mob_to_revive.ghostize(0) diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm index 858b2d1ef1..0d9032bcb6 100644 --- a/code/modules/antagonists/devil/devil.dm +++ b/code/modules/antagonists/devil/devil.dm @@ -300,8 +300,8 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", sleep(1) if(!D) return - to_chat(world, "\"SLOTH, WRATH, GLUTTONY, ACEDIA, ENVY, GREED, PRIDE! FIRES OF HELL AWAKEN!!\"") - SEND_SOUND(world, sound('sound/hallucinations/veryfar_noise.ogg')) + send_to_playing_players("\"SLOTH, WRATH, GLUTTONY, ACEDIA, ENVY, GREED, PRIDE! FIRES OF HELL AWAKEN!!\"") + sound_to_playing_players('sound/hallucinations/veryfar_noise.ogg') give_appropriate_spells() D.convert_to_archdevil() if(istype(D.loc, /obj/effect/dummy/slaughter/)) diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm index a578b06042..1d694e4033 100644 --- a/code/modules/antagonists/revenant/revenant.dm +++ b/code/modules/antagonists/revenant/revenant.dm @@ -382,7 +382,7 @@ inert = TRUE visible_message("[src] settles down and seems lifeless.") return - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) key_of_revenant = C.key if(!key_of_revenant) qdel(revenant) diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm index 118bc9b5df..bfde6397b7 100644 --- a/code/modules/awaymissions/mission_code/Academy.dm +++ b/code/modules/awaymissions/mission_code/Academy.dm @@ -130,7 +130,7 @@ var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as Wizard Academy Defender?", ROLE_WIZARD, null, ROLE_WIZARD, 50, current_wizard) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) message_admins("[key_name_admin(C)] was spawned as Wizard Academy Defender") current_wizard.ghostize() // on the off chance braindead defender gets back in current_wizard.key = C.key @@ -272,7 +272,7 @@ var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [user.real_name] Servant?", ROLE_WIZARD, null, ROLE_WIZARD, 50, H) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) message_admins("[key_name_admin(C)] was spawned as Dice Servant") H.key = C.key diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm index 8986c6a44b..7a68181f0c 100644 --- a/code/modules/events/holiday/xmas.dm +++ b/code/modules/events/holiday/xmas.dm @@ -75,7 +75,7 @@ /datum/round_event/santa/start() var/list/candidates = pollGhostCandidates("Santa is coming to town! Do you want to be Santa?", poll_time=150) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) santa = new /mob/living/carbon/human(pick(GLOB.blobstart)) santa.key = C.key diff --git a/code/modules/events/wizard/imposter.dm b/code/modules/events/wizard/imposter.dm index 0ab0e6c2e8..0ad98b97eb 100644 --- a/code/modules/events/wizard/imposter.dm +++ b/code/modules/events/wizard/imposter.dm @@ -13,7 +13,7 @@ var/list/candidates = pollGhostCandidates("Would you like to be an imposter wizard?", ROLE_WIZARD) if(!candidates) return //Sad Trombone - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) new /obj/effect/particle_effect/smoke(W.loc) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 24b61424e1..ddbbf4c30c 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -420,7 +420,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians to_chat(src, "You attempt to reset [G.real_name]'s personality...") var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, null, FALSE, 100) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) to_chat(G, "Your user reset you, and your body was taken over by a ghost. Looks like they weren't happy with your performance.") to_chat(src, "Your [G.real_name] has been successfully reset.") message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(G)])") @@ -495,7 +495,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_HOLOPARASITE) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) spawn_guardian(user, C.key) else to_chat(user, "[failure_message]") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index dbe284b928..989c8278a5 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -445,7 +445,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp var/list/mob/dead/observer/candidates = pollCandidatesForMob(poll_message, ROLE_PAI, null, FALSE, 100, M) if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) to_chat(M, "Your mob has been taken over by a ghost!") message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(M)])") M.ghostize(0) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index f4b211ff41..e8937b5dae 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -593,7 +593,7 @@ var/list/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, SM, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm if(LAZYLEN(candidates)) - var/client/C = pick(candidates) + var/mob/dead/observer/C = pick(candidates) SM.key = C.key SM.mind.enslave_mind_to_creator(user) SM.sentience_act()