-OPTIMIZATION TIME

-Almost every instance of 'for(mob in world)' has been killed. Because GODDAMN was it being run a bunch. Instead, a series of global lists have been made, and they are all handled auto-magically through New()'s, Del()'s, Login()'s, death()'s, etc...

Lists are as follows:
-mob_list : Contains all atom/mobs by ref
-player_list : Like mob_list, but only contains mobs with clients attached
-admin_list : Like player_list, but holds all mobs with clients attached and admin status
-living_mob_list : Contains all mobs that ARE alive, regardless of client status
-dead_mob_list : Contains all mobs that are dead, which comes down to corpses and ghosts
-cable_list : A list containing every obj/structure/cable in existence
Note: There is an object (/obj/item/debuglist) that you can use to check the contents of each of the lists except for cables (Since getting a message saying "a cable," x9001 isn't very helpful)

These lists have been tested as much as I could on my own, and have been mostly implemented. There are still places where they could be used, but for now it's important that the core is working. If this all checks out I would really like to implement it into the MC as well, simply so it doesn't check call Life() on every mob by checking for all the ones in world every damn tick.

Just testing locally I was able to notice improvements with certain aspects, like admin verbs being MUCH more responsive (They checked for every mob in the world every time they were clicked), many sources of needless lag were cut out (Like Adminwho and Who checking every single mob when clicked), and due to the cable_list powernet rebuilding is MUCH more efficient, because instead of checking for every cable in the world every time a powernet was broken (read: A cable was deleted), it runs though the pre-made list, and even with a singulo tearing all the way across the station, the powernet load was VERY small compared to pretty much everything else.

If you want to know how any of this works, check global_lists.dm, there I have it rigorously commented, and it should provide an understanding of what's going on.

Mob related in worlds before this commit: 1262
After: 4
I'm helping


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4179 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
sieve32@gmail.com
2012-07-26 03:04:05 +00:00
parent db14f50657
commit 7bf6788082
122 changed files with 1111 additions and 441 deletions

View File

@@ -1,4 +1,4 @@
/proc/togglebuildmode(mob/M as mob in world) /proc/togglebuildmode(mob/M as mob in player_list)
set name = "Toggle Build Mode" set name = "Toggle Build Mode"
set category = "Special Verbs" set category = "Special Verbs"
if(M.client) if(M.client)
@@ -165,7 +165,7 @@
if("number") if("number")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
if("mob-reference") if("mob-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in world master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
if("obj-reference") if("obj-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
if("turf-reference") if("turf-reference")

View File

@@ -3,7 +3,7 @@
spawn() spawn()
if(!nosleep) if(!nosleep)
sleep(40) sleep(40)
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in player_list)
if (!isnull(H.mind) && (H.mind.assigned_role != "MODE")) if (!isnull(H.mind) && (H.mind.assigned_role != "MODE"))
var/datum/data/record/G = new() var/datum/data/record/G = new()
var/datum/data/record/M = new() var/datum/data/record/M = new()

View File

@@ -70,7 +70,7 @@
if(prob(40)) if(prob(40))
if(gibbed != 0) return 0 if(gibbed != 0) return 0
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client) if(G.client)
if(G.client.be_alien) if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5) if(((G.client.inactivity/10)/60) <= 5)

View File

@@ -101,8 +101,8 @@ var/global/datum/tension/tension_master
if(forcenexttick) if(forcenexttick)
forcenexttick = 0 forcenexttick = 0
for (var/mob/M in world) for (var/mob/M in admin_list)
if (M.client && M.client.holder) if (M.client)
M << "<font color='red' size='3'><b> The tensioner wishes to create additional antagonists! Press (<a href='?src=\ref[tension_master];Supress=1'>this</a>) in 60 seconds to abort!</b></font>" M << "<font color='red' size='3'><b> The tensioner wishes to create additional antagonists! Press (<a href='?src=\ref[tension_master];Supress=1'>this</a>) in 60 seconds to abort!</b></font>"
spawn(600) spawn(600)
@@ -201,7 +201,7 @@ var/global/datum/tension/tension_master
proc/get_num_players() proc/get_num_players()
var/peeps = 0 var/peeps = 0
for (var/mob/M in world) for (var/mob/M in player_list)
if (!M.client) if (!M.client)
continue continue
peeps += 1 peeps += 1
@@ -296,7 +296,7 @@ var/global/datum/tension/tension_master
var/mob/living/silicon/malfAI = null var/mob/living/silicon/malfAI = null
var/datum/mind/themind = null var/datum/mind/themind = null
for(var/mob/living/silicon/ai/ai in world) for(var/mob/living/silicon/ai/ai in player_list)
if(ai.client) if(ai.client)
AIs += ai AIs += ai
@@ -336,7 +336,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list() var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new var/datum/preferences/preferences = new
@@ -373,7 +373,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list() var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new var/datum/preferences/preferences = new
@@ -409,7 +409,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list() var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new var/datum/preferences/preferences = new
@@ -440,7 +440,7 @@ var/global/datum/tension/tension_master
var/mob/dead/observer/theghost = null var/mob/dead/observer/theghost = null
var/time_passed = world.time var/time_passed = world.time
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate")) if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
spawn(0) spawn(0)
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No")) switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
@@ -482,7 +482,7 @@ var/global/datum/tension/tension_master
var/list/mob/living/carbon/human/candidates = list() var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in world) for(var/mob/living/carbon/human/applicant in player_list)
var/datum/preferences/preferences = new var/datum/preferences/preferences = new
@@ -523,7 +523,7 @@ var/global/datum/tension/tension_master
var/mob/dead/observer/theghost = null var/mob/dead/observer/theghost = null
var/time_passed = world.time var/time_passed = world.time
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate")) if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
spawn(0) spawn(0)
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No")) switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
@@ -570,7 +570,7 @@ var/global/datum/tension/tension_master
if(closet_spawn) if(closet_spawn)
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc) new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
for (var/obj/effect/landmark/A in world) for (var/obj/effect/landmark/A in /area/syndicate_station/start)//Because that's the only place it can BE -Sieve
if (A.name == "Syndicate-Gear-Closet") if (A.name == "Syndicate-Gear-Closet")
new /obj/structure/closet/syndicate/personal(A.loc) new /obj/structure/closet/syndicate/personal(A.loc)
del(A) del(A)
@@ -635,7 +635,7 @@ var/global/datum/tension/tension_master
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
spawn(0) spawn(0)
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
if("Yes") if("Yes")
@@ -653,7 +653,7 @@ var/global/datum/tension/tension_master
if(candidates.len) if(candidates.len)
var/numagents = 6 var/numagents = 6
//Spawns commandos and equips them. //Spawns commandos and equips them.
for (var/obj/effect/landmark/L in world) for (var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad)
if(numagents<=0) if(numagents<=0)
break break
if (L.name == "Syndicate-Commando") if (L.name == "Syndicate-Commando")
@@ -692,7 +692,7 @@ var/global/datum/tension/tension_master
// P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>" // P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>"
// P.name = "Spec. Ops. Manual" // P.name = "Spec. Ops. Manual"
for (var/obj/effect/landmark/L in world) for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite)
if (L.name == "Syndicate-Commando-Bomb") if (L.name == "Syndicate-Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
// del(L) // del(L)
@@ -708,7 +708,7 @@ var/global/datum/tension/tension_master
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
spawn(0) spawn(0)
switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No")) switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
if("Yes") if("Yes")
@@ -727,7 +727,7 @@ var/global/datum/tension/tension_master
var/numagents = 3 var/numagents = 3
//Spawns commandos and equips them. //Spawns commandos and equips them.
for (var/obj/effect/landmark/L in world) for (var/obj/effect/landmark/L in /area/borg_deathsquad)
if(numagents<=0) if(numagents<=0)
break break
if (L.name == "Borg-Deathsquad") if (L.name == "Borg-Deathsquad")

View File

@@ -287,10 +287,9 @@ datum/shuttle_controller
settimeleft(SHUTTLETRANSITTIME) settimeleft(SHUTTLETRANSITTIME)
start_location.move_contents_to(end_location, null, NORTH) start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world) for(var/obj/machinery/door/D in end_location)
if( get_area(D) == end_location ) spawn(0)
spawn(0) D.close()
D.close()
// Some aesthetic turbulance shaking // Some aesthetic turbulance shaking
for(var/mob/M in end_location) for(var/mob/M in end_location)
if(M.client) if(M.client)
@@ -307,10 +306,9 @@ datum/shuttle_controller
start_location = locate(/area/shuttle/escape_pod1/station) start_location = locate(/area/shuttle/escape_pod1/station)
end_location = locate(/area/shuttle/escape_pod1/transit) end_location = locate(/area/shuttle/escape_pod1/transit)
start_location.move_contents_to(end_location, null, NORTH) start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world) for(var/obj/machinery/door/D in end_location)
if( get_area(D) == end_location ) spawn(0)
spawn(0) D.close()
D.close()
for(var/mob/M in end_location) for(var/mob/M in end_location)
if(M.client) if(M.client)
@@ -326,10 +324,9 @@ datum/shuttle_controller
start_location = locate(/area/shuttle/escape_pod2/station) start_location = locate(/area/shuttle/escape_pod2/station)
end_location = locate(/area/shuttle/escape_pod2/transit) end_location = locate(/area/shuttle/escape_pod2/transit)
start_location.move_contents_to(end_location, null, NORTH) start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world) for(var/obj/machinery/door/D in end_location)
if( get_area(D) == end_location ) spawn(0)
spawn(0) D.close()
D.close()
for(var/mob/M in end_location) for(var/mob/M in end_location)
if(M.client) if(M.client)
@@ -345,10 +342,9 @@ datum/shuttle_controller
start_location = locate(/area/shuttle/escape_pod3/station) start_location = locate(/area/shuttle/escape_pod3/station)
end_location = locate(/area/shuttle/escape_pod3/transit) end_location = locate(/area/shuttle/escape_pod3/transit)
start_location.move_contents_to(end_location, null, NORTH) start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world) for(var/obj/machinery/door/D in end_location)
if( get_area(D) == end_location ) spawn(0)
spawn(0) D.close()
D.close()
for(var/mob/M in end_location) for(var/mob/M in end_location)
if(M.client) if(M.client)
@@ -364,10 +360,9 @@ datum/shuttle_controller
start_location = locate(/area/shuttle/escape_pod5/station) start_location = locate(/area/shuttle/escape_pod5/station)
end_location = locate(/area/shuttle/escape_pod5/transit) end_location = locate(/area/shuttle/escape_pod5/transit)
start_location.move_contents_to(end_location, null, EAST) start_location.move_contents_to(end_location, null, EAST)
for(var/obj/machinery/door/D in world) for(var/obj/machinery/door/D in end_location)
if( get_area(D) == end_location ) spawn(0)
spawn(0) D.close()
D.close()
for(var/mob/M in end_location) for(var/mob/M in end_location)
if(M.client) if(M.client)

View File

@@ -132,3 +132,8 @@
new /obj/item/clothing/mask/gas/sexymime(src.loc) new /obj/item/clothing/mask/gas/sexymime(src.loc)
new /obj/item/clothing/under/sexymime(src.loc) new /obj/item/clothing/under/sexymime(src.loc)
del(src) del(src)
///obj/effect/landmark/costume/hidden/master/New()
// var/list/templist = list()
// templist += src
// for(var/obj/effect/landmark/costume/hidden/H in z1

View File

@@ -173,11 +173,11 @@
// Brains/MMIs/pAIs // Brains/MMIs/pAIs
for(var/mob/living/carbon/brain/C in world) for(var/mob/living/carbon/brain/C in player_list)
if(get_turf(C) in V) if(get_turf(C) in V)
if(isInSight(source,C)) if(isInSight(source,C))
hear += C hear += C
for(var/mob/living/silicon/pai/C in world) for(var/mob/living/silicon/pai/C in player_list)
if(get_turf(C) in V) if(get_turf(C) in V)
if(isInSight(source,C)) if(isInSight(source,C))
hear += C hear += C

View File

@@ -0,0 +1,122 @@
//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
var/global/list/player_list = list()//List of all logged in players (Based on mob reference)
var/global/list/admin_list = list()//List of all logged in admins (Based on mob reference)
var/global/list/mob_list = list()//List of all mobs, including clientless
var/global/list/living_mob_list = list()//List of all living mobs, including clientless
var/global/list/dead_mob_list = list()//List of all dead mobs, including clientless
var/global/list/client_list = list()//List of all clients, based on ckey
var/global/list/cable_list = list()//Index for all cables, so that powernets don't have to look through the entire world all the time
//////////////////////////
/////Initial Building/////
//////////////////////////
//Realistically, these should never be run, but ideally, they should only be run once at round-start
proc/make_player_list()//Global proc that rebuilds the player list
for(var/mob/p in player_list)//Clears out everyone that logged out
if(!(p.client))
player_list -= p
for(var/mob/M in world)//Adds everyone that has logged in
if(M.client)
player_list += M
proc/make_admin_list()//Rebuild that shit to try and avoid issues with stealthmins
admin_list = list()
for(var/mob/M in player_list)
if(M.client && M.client.holder)
admin_list += M
proc/make_mob_list()
for(var/mob/p in mob_list)
if(!p)//If it's a null reference, remove it
mob_list -= p
for(var/mob/M in world)
mob_list += M
proc/make_extra_mob_list()
for(var/mob/p in living_mob_list)
if(!p)
living_mob_list -= p
if(p.stat == DEAD)//Transfer
living_mob_list -= p
dead_mob_list += p
for(var/mob/p in dead_mob_list)
if(!p)
dead_mob_list -= p
if(p.stat != DEAD)
dead_mob_list -= p
living_mob_list += p
for(var/mob/M in world)
if(M.stat == DEAD)
living_mob_list += M
else
dead_mob_list += M
//Alright, this proc should NEVER be called in the code, ever. This is more of an 'oh god everything is broken'-emergency button.
proc/rebuild_mob_lists()
player_list = list()
admin_list = list()
mob_list = list()
living_mob_list = list()
dead_mob_list = list()
client_list = list()
for(var/mob/M in world)
mob_list += M
if(M.client)
player_list += M
if(M.client.holder)
admin_list += M
if(M.stat != DEAD)
living_mob_list += M
else
dead_mob_list += M
for(var/client/C)
client_list += C.ckey
proc/add_to_mob_list(var/mob/A)//Adds an individual mob
if(A)
mob_list |= A
if(A.client)
player_list |= A
if(A.client.holder)
admin_list |= A
proc/remove_from_mob_list(var/mob/R)//Removes an individual mob
mob_list -= R
if(R.client)
player_list -= R
if(R.client.holder)
admin_list -= R
proc/make_client_list()//Rebuilds client list
for(var/mob/c in client_list)
if(!c.client)
client_list -= c.ckey
for(var/mob/M in world)
if(M.client)
client_list += M.ckey
/obj/item/listdebug//Quick debugger for the global lists
icon = 'icons/obj/assemblies.dmi'
icon_state = "radio-igniter-tank"
/obj/item/listdebug/attack_self()
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
if("Players")
usr << dd_list2text(player_list,",")
if("Admins")
usr << dd_list2text(admin_list,",")
if("Mobs")
usr << dd_list2text(mob_list,",")
if("Living Mobs")
usr << dd_list2text(living_mob_list,",")
if("Dead Mobs")
usr << dd_list2text(dead_mob_list,",")
if("Clients")
usr << dd_list2text(client_list,",")

View File

@@ -813,7 +813,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
if( newname == "Inactive AI" || findtext(newname,"cyborg") ) //To prevent common meta-gaming name-choices if( newname == "Inactive AI" || findtext(newname,"cyborg") ) //To prevent common meta-gaming name-choices
M << "That name is reserved." M << "That name is reserved."
return return
for (var/mob/living/silicon/ai/A in world) for (var/mob/living/silicon/ai/A in player_list)
if (A.real_name == newname && newname!=randomname) if (A.real_name == newname && newname!=randomname)
M << "There's already an AI with that name." M << "There's already an AI with that name."
return return
@@ -843,7 +843,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(badname) if(badname)
M << "That name is reserved." M << "That name is reserved."
return clname(M) return clname(M)
for (var/mob/A in world) for (var/mob/A in player_list)
if(A.real_name == newname) if(A.real_name == newname)
M << "That name is reserved." M << "That name is reserved."
return clname(M) return clname(M)
@@ -870,7 +870,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/names = list() var/list/names = list()
var/list/borgs = list() var/list/borgs = list()
var/list/namecounts = list() var/list/namecounts = list()
for (var/mob/living/silicon/robot/A in world) for (var/mob/living/silicon/robot/A in player_list)
var/name = A.real_name var/name = A.real_name
if (A.stat == 2) if (A.stat == 2)
continue continue
@@ -892,7 +892,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/names = list() var/list/names = list()
var/list/ais = list() var/list/ais = list()
var/list/namecounts = list() var/list/namecounts = list()
for (var/mob/living/silicon/ai/A in world) for (var/mob/living/silicon/ai/A in player_list)
var/name = A.real_name var/name = A.real_name
if (A.stat == 2) if (A.stat == 2)
continue continue
@@ -934,34 +934,34 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/sortmobs() /proc/sortmobs()
var/list/mob_list = list() var/list/moblist = list()
for(var/mob/living/silicon/ai/M in world) for(var/mob/living/silicon/ai/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/silicon/pai/M in world) for(var/mob/living/silicon/pai/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/silicon/robot/M in world) for(var/mob/living/silicon/robot/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/carbon/human/M in world) for(var/mob/living/carbon/human/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/carbon/brain/M in world) for(var/mob/living/carbon/brain/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/carbon/alien/M in world) for(var/mob/living/carbon/alien/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/dead/observer/M in world) for(var/mob/dead/observer/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/new_player/M in world) for(var/mob/new_player/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/carbon/monkey/M in world) for(var/mob/living/carbon/monkey/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/carbon/metroid/M in world) for(var/mob/living/carbon/metroid/M in mob_list)
mob_list.Add(M) moblist.Add(M)
for(var/mob/living/simple_animal/M in world) for(var/mob/living/simple_animal/M in mob_list)
mob_list.Add(M) moblist.Add(M)
// for(var/mob/living/silicon/hivebot/M in world) // for(var/mob/living/silicon/hivebot/M in world)
// mob_list.Add(M) // mob_list.Add(M)
// for(var/mob/living/silicon/hive_mainframe/M in world) // for(var/mob/living/silicon/hive_mainframe/M in world)
// mob_list.Add(M) // mob_list.Add(M)
return mob_list return moblist
/proc/convert2energy(var/M) /proc/convert2energy(var/M)
var/E = M*(SPEED_OF_LIGHT_SQ) var/E = M*(SPEED_OF_LIGHT_SQ)

View File

@@ -2,7 +2,7 @@ proc/sql_poll_players()
if(!sqllogging) if(!sqllogging)
return return
var/playercount = 0 var/playercount = 0
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) if(M.client)
playercount += 1 playercount += 1
var/DBConnection/dbcon = new() var/DBConnection/dbcon = new()
@@ -22,8 +22,8 @@ proc/sql_poll_admins()
if(!sqllogging) if(!sqllogging)
return return
var/admincount = 0 var/admincount = 0
for (var/mob/M in world) for (var/mob/M in admin_list)
if(M && M.client && M.client.holder) if(M && M.client)
admincount += 1 admincount += 1
var/DBConnection/dbcon = new() var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")

View File

@@ -46,14 +46,14 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
// This function counts a passed job. // This function counts a passed job.
proc/countJob(rank) proc/countJob(rank)
var/jobCount = 0 var/jobCount = 0
for(var/mob/H in world) for(var/mob/H in player_list)
if(H.mind && H.mind.assigned_role == rank) if(H.mind && H.mind.assigned_role == rank)
jobCount++ jobCount++
return jobCount return jobCount
/proc/AutoUpdateAI(obj/subject) /proc/AutoUpdateAI(obj/subject)
if (subject!=null) if (subject!=null)
for(var/mob/living/silicon/ai/M in world) for(var/mob/living/silicon/ai/M in player_list)
if ((M.client && M.machine == subject)) if ((M.client && M.machine == subject))
subject.attack_ai(M) subject.attack_ai(M)

View File

@@ -53,14 +53,14 @@
/obj/machinery/camera/motion/proc/cancelAlarm() /obj/machinery/camera/motion/proc/cancelAlarm()
if (detectTime == -1) if (detectTime == -1)
for (var/mob/living/silicon/aiPlayer in world) for (var/mob/living/silicon/aiPlayer in player_list)
if (status) aiPlayer.cancelAlarm("Motion", src.loc.loc) if (status) aiPlayer.cancelAlarm("Motion", src.loc.loc)
detectTime = 0 detectTime = 0
return 1 return 1
/obj/machinery/camera/motion/proc/triggerAlarm() /obj/machinery/camera/motion/proc/triggerAlarm()
if (!detectTime) return 0 if (!detectTime) return 0
for (var/mob/living/silicon/aiPlayer in world) for (var/mob/living/silicon/aiPlayer in player_list)
if (status) aiPlayer.triggerAlarm("Motion", src.loc.loc, src) if (status) aiPlayer.triggerAlarm("Motion", src.loc.loc, src)
detectTime = -1 detectTime = -1
return 1 return 1
@@ -82,5 +82,5 @@
detectTime = world.time - 301 detectTime = world.time - 301
triggerAlarm() triggerAlarm()
else else
for (var/mob/living/silicon/aiPlayer in world) // manually cancel, to not disturb internal state for (var/mob/living/silicon/aiPlayer in player_list) // manually cancel, to not disturb internal state
aiPlayer.cancelAlarm("Motion", src.loc.loc) aiPlayer.cancelAlarm("Motion", src.loc.loc)

View File

@@ -84,12 +84,12 @@
var/list/cameras = list() var/list/cameras = list()
for (var/obj/machinery/camera/C in src) for (var/obj/machinery/camera/C in src)
cameras += C cameras += C
for (var/mob/living/silicon/aiPlayer in world) for (var/mob/living/silicon/aiPlayer in player_list)
if (state == 1) if (state == 1)
aiPlayer.cancelAlarm("Power", src, source) aiPlayer.cancelAlarm("Power", src, source)
else else
aiPlayer.triggerAlarm("Power", src, cameras, source) aiPlayer.triggerAlarm("Power", src, cameras, source)
for(var/obj/machinery/computer/station_alert/a in world) for(var/obj/machinery/computer/station_alert/a in player_list)
if(state == 1) if(state == 1)
a.cancelAlarm("Power", src, source) a.cancelAlarm("Power", src, source)
else else
@@ -108,12 +108,12 @@
//src.updateicon() //src.updateicon()
for(var/obj/machinery/camera/C in RA) for(var/obj/machinery/camera/C in RA)
cameras += C cameras += C
for(var/mob/living/silicon/aiPlayer in world) for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src) aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
for(var/obj/machinery/computer/station_alert/a in world) for(var/obj/machinery/computer/station_alert/a in world)
a.triggerAlarm("Atmosphere", src, cameras, src) a.triggerAlarm("Atmosphere", src, cameras, src)
else if (src.atmosalm == 2) else if (src.atmosalm == 2)
for(var/mob/living/silicon/aiPlayer in world) for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.cancelAlarm("Atmosphere", src, src) aiPlayer.cancelAlarm("Atmosphere", src, src)
for(var/obj/machinery/computer/station_alert/a in world) for(var/obj/machinery/computer/station_alert/a in world)
a.cancelAlarm("Atmosphere", src, src) a.cancelAlarm("Atmosphere", src, src)
@@ -138,7 +138,7 @@
var/list/cameras = list() var/list/cameras = list()
for (var/obj/machinery/camera/C in src) for (var/obj/machinery/camera/C in src)
cameras += C cameras += C
for (var/mob/living/silicon/ai/aiPlayer in world) for (var/mob/living/silicon/ai/aiPlayer in player_list)
aiPlayer.triggerAlarm("Fire", src, cameras, src) aiPlayer.triggerAlarm("Fire", src, cameras, src)
for (var/obj/machinery/computer/station_alert/a in world) for (var/obj/machinery/computer/station_alert/a in world)
a.triggerAlarm("Fire", src, cameras, src) a.triggerAlarm("Fire", src, cameras, src)
@@ -156,9 +156,9 @@
else if(D.density) else if(D.density)
spawn(0) spawn(0)
D.open() D.open()
for (var/mob/living/silicon/ai/aiPlayer in world) for (var/mob/living/silicon/ai/aiPlayer in player_list)
aiPlayer.cancelAlarm("Fire", src, src) aiPlayer.cancelAlarm("Fire", src, src)
for (var/obj/machinery/computer/station_alert/a in world) for (var/obj/machinery/computer/station_alert/a in player_list)
a.cancelAlarm("Fire", src, src) a.cancelAlarm("Fire", src, src)
return return

View File

@@ -705,7 +705,7 @@
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST))) || locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
if (!M.client) if (!M.client)
for(var/mob/dead/observer/ghost in world) for(var/mob/dead/observer/ghost in player_list)
if(ghost.corpse == M && ghost.client) if(ghost.corpse == M && ghost.client)
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>" ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break break

View File

@@ -94,7 +94,7 @@ var/list/blob_nodes = list()
switch(stage) switch(stage)
if (0) if (0)
send_intercept(1) send_intercept(1)
for (var/mob/living/silicon/ai/aiPlayer in world) for (var/mob/living/silicon/ai/aiPlayer in living_mob_list)
if (aiPlayer.client) if (aiPlayer.client)
var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. NanoTrasen will not send an emergency shuttle under any circumstances." var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. NanoTrasen will not send an emergency shuttle under any circumstances."
//var/law = "The station is under quarantine. The biohazard must be destroyed at all costs and must not be allowed to spread. Anyone using a space suit for any reason other than to destroy the biohazard is to be terminated. NanoTrasen will not send an emergency shuttle under any circumstances." //var/law = "The station is under quarantine. The biohazard must be destroyed at all costs and must not be allowed to spread. Anyone using a space suit for any reason other than to destroy the biohazard is to be terminated. NanoTrasen will not send an emergency shuttle under any circumstances."

View File

@@ -52,8 +52,8 @@
var/numAlive = 0 var/numAlive = 0
var/numSpace = 0 var/numSpace = 0
var/numOffStation = 0 var/numOffStation = 0
for (var/mob/living/silicon/ai/aiPlayer in world) for (var/mob/living/silicon/ai/aiPlayer in mob_list)
for(var/mob/M in world) for(var/mob/living/carbon/human/M in mob_list)
if ((M != aiPlayer && M.client)) if ((M != aiPlayer && M.client))
if (M.stat == 2) if (M.stat == 2)
numDead += 1 numDead += 1

View File

@@ -33,7 +33,7 @@
intercepttext += "Nuclear Authentication Code: [nukecode] <BR>" intercepttext += "Nuclear Authentication Code: [nukecode] <BR>"
intercepttext += "Message ends." intercepttext += "Message ends."
for (var/mob/living/silicon/ai/aiPlayer in world) for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client) if (aiPlayer.client)
var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. The nuclear failsafe must be activated at any cost, the code is: [nukecode]." var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. The nuclear failsafe must be activated at any cost, the code is: [nukecode]."
aiPlayer.set_zeroth_law(law) aiPlayer.set_zeroth_law(law)

View File

@@ -40,8 +40,8 @@
proc/create_fragments(var/wave_size = 1) proc/create_fragments(var/wave_size = 1)
var/list/candidates = list() var/list/candidates = list()
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client && G.client.be_alien) if(G.client.be_alien)
if(G.corpse) if(G.corpse)
if(G.corpse.stat==2) if(G.corpse.stat==2)
candidates.Add(G) candidates.Add(G)

View File

@@ -210,7 +210,7 @@
..() ..()
var/list/possibleIDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega") var/list/possibleIDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
for(var/mob/living/carbon/aChangeling in world) for(var/mob/living/carbon/aChangeling in player_list)
if(aChangeling.changeling) if(aChangeling.changeling)
possibleIDs -= aChangeling.changeling.changelingID possibleIDs -= aChangeling.changeling.changelingID

View File

@@ -477,7 +477,7 @@
spawn(10) spawn(10)
var/list/candidates = list() var/list/candidates = list()
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
candidates += G candidates += G
for(var/mob/dead/observer/G in candidates) for(var/mob/dead/observer/G in candidates)

View File

@@ -84,7 +84,7 @@
var/list/possible_targets = get_unconvertables() var/list/possible_targets = get_unconvertables()
if(!possible_targets.len) if(!possible_targets.len)
for(var/mob/living/carbon/human/player in world) for(var/mob/living/carbon/human/player in player_list)
if(player.mind && !(player.mind in cult)) if(player.mind && !(player.mind in cult))
possible_targets += player.mind possible_targets += player.mind
@@ -266,7 +266,7 @@
/datum/game_mode/cult/proc/get_unconvertables() /datum/game_mode/cult/proc/get_unconvertables()
var/list/ucs = list() var/list/ucs = list()
for(var/mob/living/carbon/human/player in world) for(var/mob/living/carbon/human/player in mob_list)
if(!is_convertable_to_cult(player.mind)) if(!is_convertable_to_cult(player.mind))
ucs += player.mind ucs += player.mind
return ucs return ucs

View File

@@ -163,7 +163,7 @@
A.power_change() A.power_change()
/proc/appendicitis() /proc/appendicitis()
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses) for(var/datum/disease/D in H.viruses)
foundAlready = 1 foundAlready = 1
@@ -204,7 +204,7 @@
// virus_type = /datum/disease/t_virus // virus_type = /datum/disease/t_virus
if("pierrot's throat") if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses) for(var/datum/disease/D in H.viruses)
@@ -249,7 +249,7 @@
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE; If there's no ghost... well, sucks. Wasted event. -- Urist var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE; If there's no ghost... well, sucks. Wasted event. -- Urist
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client) if(G.client)
if(G.client.be_alien) if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5) if(((G.client.inactivity/10)/60) <= 5)
@@ -282,7 +282,7 @@
sleep(100) sleep(100)
*/ */
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in living_mob_list)
if(istype(H,/mob/living/carbon/human)) if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE,0) H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5)) if (prob(5))
@@ -294,7 +294,7 @@
else else
randmutg(H) randmutg(H)
domutcheck(H,null,1) domutcheck(H,null,1)
for(var/mob/living/carbon/monkey/M in world) for(var/mob/living/carbon/monkey/M in living_mob_list)
M.apply_effect((rand(15,75)),IRRADIATE,0) M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100) sleep(100)
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert") command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
@@ -395,7 +395,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
*/ */
//AI laws //AI laws
for(var/mob/living/silicon/ai/M in world) for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0) if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS") var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS") var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
@@ -414,7 +414,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
var/allergysev = pick("deathly", "mildly", "severely", "contagiously") var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
var/crew var/crew
var/list/pos_crew = list() var/list/pos_crew = list()
for(var/mob/living/carbon/human/pos in world) for(var/mob/living/carbon/human/pos in player_list)
pos_crew += pos.real_name pos_crew += pos.real_name
crew = pick(pos_crew) crew = pick(pos_crew)
switch(rand(1,14)) switch(rand(1,14))

View File

@@ -1064,7 +1064,7 @@ ________________________________________________________________________________
U << "\blue Hacking \the [A]..." U << "\blue Hacking \the [A]..."
spawn(0) spawn(0)
var/turf/location = get_turf(U) var/turf/location = get_turf(U)
for(var/mob/living/silicon/ai/AI in world) for(var/mob/living/silicon/ai/AI in player_list)
AI << "\red <b>Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]</b>." AI << "\red <b>Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]</b>."
if(A:files&&A:files.known_tech.len) if(A:files&&A:files.known_tech.len)
for(var/datum/tech/current_data in S.stored_research) for(var/datum/tech/current_data in S.stored_research)
@@ -1239,7 +1239,7 @@ ________________________________________________________________________________
voice = "[pick(wizard_first)] [pick(wizard_second)]" voice = "[pick(wizard_first)] [pick(wizard_second)]"
if(91 to 100)//Small chance of an existing crew name. if(91 to 100)//Small chance of an existing crew name.
var/names[] = new() var/names[] = new()
for(var/mob/living/carbon/human/M in world) for(var/mob/living/carbon/human/M in player_list)
if(M==U||!M.client||!M.real_name) continue if(M==U||!M.client||!M.real_name) continue
names.Add(M.real_name) names.Add(M.real_name)
voice = !names.len ? "Cuban Pete" : pick(names) voice = !names.len ? "Cuban Pete" : pick(names)

View File

@@ -139,10 +139,9 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
var/mob/dead/observer/G var/mob/dead/observer/G
var/list/candidates = list() var/list/candidates = list()
for(G in world) for(G in player_list)
if(G.client)//Now everyone can ninja! if(((G.client.inactivity/10)/60) <= 5)
if(((G.client.inactivity/10)/60) <= 5) candidates.Add(G)
candidates.Add(G)
//The ninja will be created on the right spawn point or at late join. //The ninja will be created on the right spawn point or at late join.
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin )) var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
@@ -165,7 +164,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
//Xenos and deathsquads take precedence over everything else. //Xenos and deathsquads take precedence over everything else.
//Unless the xenos are hiding in a locker somewhere, this'll find em. //Unless the xenos are hiding in a locker somewhere, this'll find em.
for(var/mob/living/carbon/alien/humanoid/xeno in world) for(var/mob/living/carbon/alien/humanoid/xeno in player_list)
if(istype(xeno)) if(istype(xeno))
xeno_list += xeno xeno_list += xeno
@@ -362,7 +361,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
//=======//CURRENT PLAYER VERB//=======// //=======//CURRENT PLAYER VERB//=======//
/client/proc/cmd_admin_ninjafy(var/mob/M in world) /client/proc/cmd_admin_ninjafy(var/mob/M in player_list)
set category = null set category = null
set name = "Make Space Ninja" set name = "Make Space Ninja"
@@ -426,8 +425,8 @@ As such, it's hard-coded for now. No reason for it not to be, really.
return return
var/mob/dead/observer/G var/mob/dead/observer/G
for(var/mob/dead/observer/G_find in world) for(var/mob/dead/observer/G_find in player_list)
if(G_find.client&&ckey(G_find.key)==ckey(input)) if(ckey(G_find.key)==ckey(input))
G = G_find G = G_find
break break

View File

@@ -80,7 +80,7 @@ Whitespace:Seperator;
///Checks to see if the game can be setup and ran with the current number of players or whatnot. ///Checks to see if the game can be setup and ran with the current number of players or whatnot.
/datum/game_mode/proc/can_start() /datum/game_mode/proc/can_start()
var/playerC = 0 var/playerC = 0
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if((player.client)&&(player.ready)) if((player.client)&&(player.ready))
playerC++ playerC++
if(playerC >= required_players) if(playerC >= required_players)
@@ -133,7 +133,7 @@ Whitespace:Seperator;
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom) var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) if(M.client)
clients++ clients++
if(ishuman(M)) if(ishuman(M))
@@ -249,7 +249,7 @@ Whitespace:Seperator;
// Ultimate randomizing code right here // Ultimate randomizing code right here
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if(player.client && player.ready) if(player.client && player.ready)
players += player players += player
@@ -331,7 +331,7 @@ Whitespace:Seperator;
/datum/game_mode/proc/num_players() /datum/game_mode/proc/num_players()
. = 0 . = 0
for(var/mob/new_player/P in world) for(var/mob/new_player/P in player_list)
if(P.client && P.ready) if(P.client && P.ready)
. ++ . ++
@@ -341,7 +341,7 @@ Whitespace:Seperator;
/////////////////////////////////// ///////////////////////////////////
/datum/game_mode/proc/get_living_heads() /datum/game_mode/proc/get_living_heads()
var/list/heads = list() var/list/heads = list()
for(var/mob/living/carbon/human/player in world) for(var/mob/living/carbon/human/player in player_list)
if(player.stat!=2 && player.mind && (player.mind.assigned_role in command_positions)) if(player.stat!=2 && player.mind && (player.mind.assigned_role in command_positions))
heads += player.mind heads += player.mind
return heads return heads
@@ -352,7 +352,7 @@ Whitespace:Seperator;
//////////////////////////// ////////////////////////////
/datum/game_mode/proc/get_all_heads() /datum/game_mode/proc/get_all_heads()
var/list/heads = list() var/list/heads = list()
for(var/mob/player in world) for(var/mob/player in player_list)
if(player.mind && (player.mind.assigned_role in command_positions)) if(player.mind && (player.mind.assigned_role in command_positions))
heads += player.mind heads += player.mind
return heads return heads

View File

@@ -75,7 +75,6 @@ var/global/datum/controller/gameticker/ticker
src.mode = new mtype src.mode = new mtype
else else
src.mode = config.pick_mode(master_mode) src.mode = config.pick_mode(master_mode)
if (!src.mode.can_start()) if (!src.mode.can_start())
world << "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed. Reverting to pre-game lobby." world << "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed. Reverting to pre-game lobby."
del(mode) del(mode)
@@ -160,12 +159,12 @@ var/global/datum/controller/gameticker/ticker
var/obj/structure/stool/bed/temp_buckle = new(src) var/obj/structure/stool/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around //Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
if(station_missed) if(station_missed)
for(var/mob/living/M in world) for(var/mob/living/M in living_mob_list)
M.buckled = temp_buckle //buckles the mob so it can't do anything M.buckled = temp_buckle //buckles the mob so it can't do anything
if(M.client) if(M.client)
M.client.screen += cinematic //show every client the cinematic M.client.screen += cinematic //show every client the cinematic
else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived" else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived"
for(var/mob/living/M in world) for(var/mob/living/M in living_mob_list)
M.buckled = temp_buckle M.buckled = temp_buckle
if(M.client) if(M.client)
M.client.screen += cinematic M.client.screen += cinematic
@@ -243,7 +242,7 @@ var/global/datum/controller/gameticker/ticker
proc/create_characters() proc/create_characters()
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if(player.ready) if(player.ready)
if(player.mind && player.mind.assigned_role=="AI") if(player.mind && player.mind.assigned_role=="AI")
player.close_spawn_windows() player.close_spawn_windows()
@@ -254,14 +253,14 @@ var/global/datum/controller/gameticker/ticker
proc/collect_minds() proc/collect_minds()
for(var/mob/living/player in world) for(var/mob/living/player in player_list)
if(player.mind) if(player.mind)
ticker.minds += player.mind ticker.minds += player.mind
proc/equip_characters() proc/equip_characters()
var/captainless=1 var/captainless=1
for(var/mob/living/carbon/human/player in world) for(var/mob/living/carbon/human/player in player_list)
if(player && player.mind && player.mind.assigned_role) if(player && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain") if(player.mind.assigned_role == "Captain")
captainless=0 captainless=0
@@ -315,7 +314,7 @@ var/global/datum/controller/gameticker/ticker
/datum/controller/gameticker/proc/declare_completion() /datum/controller/gameticker/proc/declare_completion()
for (var/mob/living/silicon/ai/aiPlayer in world) for (var/mob/living/silicon/ai/aiPlayer in mob_list)
if (aiPlayer.stat != 2) if (aiPlayer.stat != 2)
world << "<b>[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the game were:</b>" world << "<b>[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the game were:</b>"
else else
@@ -328,7 +327,7 @@ var/global/datum/controller/gameticker/ticker
robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [robo.key]), ":" (Played by: [robo.key]), "]" robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [robo.key]), ":" (Played by: [robo.key]), "]"
world << "[robolist]" world << "[robolist]"
for (var/mob/living/silicon/robot/robo in world) for (var/mob/living/silicon/robot/robo in mob_list)
if (!robo.connected_ai) if (!robo.connected_ai)
if (robo.stat != 2) if (robo.stat != 2)
world << "<b>[robo.name] (Played by: [robo.key]) survived as an AI-less borg! Its laws were:</b>" world << "<b>[robo.name] (Played by: [robo.key]) survived as an AI-less borg! Its laws were:</b>"
@@ -346,7 +345,7 @@ var/global/datum/controller/gameticker/ticker
//Print a list of antagonists to the server log //Print a list of antagonists to the server log
var/list/total_antagonists = list() var/list/total_antagonists = list()
//Look into all mobs in world, dead or alive //Look into all mobs in world, dead or alive
for(var/mob/M in world) for(var/mob/M in mob_list)
if(M.mind && M.mind.special_role) //If they have a mind and are an antagonist of some sort... if(M.mind && M.mind.special_role) //If they have a mind and are an antagonist of some sort...
var/temprole = M.mind.special_role var/temprole = M.mind.special_role

View File

@@ -88,7 +88,7 @@
/datum/intercept_text/proc/pick_mob() /datum/intercept_text/proc/pick_mob()
var/list/dudes = list() var/list/dudes = list()
for(var/mob/living/carbon/human/man in world) for(var/mob/living/carbon/human/man in player_list)
if (!man.mind) continue if (!man.mind) continue
if (man.mind.assigned_role=="MODE") continue if (man.mind.assigned_role=="MODE") continue
dudes += man dudes += man

View File

@@ -36,7 +36,7 @@ rcd light flash thingy on matter drain
/client/proc/fireproof_core() /client/proc/fireproof_core()
set category = "Malfunction" set category = "Malfunction"
set name = "Fireproof Core" set name = "Fireproof Core"
for(var/mob/living/silicon/ai/ai in world) for(var/mob/living/silicon/ai/ai in player_list)
ai.fire_res_on_core = 1 ai.fire_res_on_core = 1
usr.verbs -= /client/proc/fireproof_core usr.verbs -= /client/proc/fireproof_core
usr << "\red Core fireproofed." usr << "\red Core fireproofed."
@@ -49,7 +49,7 @@ rcd light flash thingy on matter drain
set category = "Malfunction" set category = "Malfunction"
set name = "Upgrade Turrets" set name = "Upgrade Turrets"
usr.verbs -= /client/proc/upgrade_turrets usr.verbs -= /client/proc/upgrade_turrets
for(var/obj/machinery/turret/turret in world) for(var/obj/machinery/turret/turret in player_list)
turret.health += 30 turret.health += 30
turret.shot_delay = 20 turret.shot_delay = 20

View File

@@ -28,7 +28,7 @@
/datum/game_mode/malfunction/pre_setup() /datum/game_mode/malfunction/pre_setup()
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if(player.mind && player.mind.assigned_role == "AI") if(player.mind && player.mind.assigned_role == "AI")
malf_ai+=player.mind malf_ai+=player.mind
if(malf_ai.len) if(malf_ai.len)
@@ -178,9 +178,8 @@
for(var/datum/mind/AI_mind in ticker.mode:malf_ai) for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
ticker.mode:explosion_in_progress = 1 ticker.mode:explosion_in_progress = 1
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) M << 'Alarm.ogg'
M << 'Alarm.ogg'
world << "Self-destructing in 10" world << "Self-destructing in 10"
for (var/i=9 to 1 step -1) for (var/i=9 to 1 step -1)
sleep(10) sleep(10)

View File

@@ -41,16 +41,15 @@
var/area/escape_zone = locate(/area/shuttle/escape/centcom) var/area/escape_zone = locate(/area/shuttle/escape/centcom)
var/area/pod_zone = list( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom ) var/area/pod_zone = list( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
for(var/mob/living/player in world) for(var/mob/living/player in player_list)
if (player.client) if (player.stat != 2)
if (player.stat != 2) var/turf/location = get_turf(player.loc)
var/turf/location = get_turf(player.loc) if (location in escape_zone)
if (location in escape_zone) survivors[player.real_name] = "shuttle"
survivors[player.real_name] = "shuttle" else if (location.loc.type in pod_zone)
else if (location.loc.type in pod_zone) survivors[player.real_name] = "pod"
survivors[player.real_name] = "pod" else
else survivors[player.real_name] = "alive"
survivors[player.real_name] = "alive"
feedback_set_details("round_end_result","end - evacuation") feedback_set_details("round_end_result","end - evacuation")
feedback_set("round_end_result",survivors.len) feedback_set("round_end_result",survivors.len)

View File

@@ -162,7 +162,7 @@
var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "") var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "")
if(!DNAstring) if(!DNAstring)
return return
for(var/mob/living/carbon/M in world) for(var/mob/living/carbon/M in mob_list)
if(!M.dna) if(!M.dna)
continue continue
if(M.dna.unique_enzymes == DNAstring) if(M.dna.unique_enzymes == DNAstring)

View File

@@ -171,7 +171,7 @@ datum/objective/hijack
return 0 return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom) var/area/shuttle = locate(/area/shuttle/escape/centcom)
var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai) var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai)
for(var/mob/living/player in world) for(var/mob/living/player in player_list)
if(player.type in protected_mobs) continue if(player.type in protected_mobs) continue
if (player.mind && (player.mind != owner)) if (player.mind && (player.mind != owner))
if (!player.stat) //they're not dead or in crit if (!player.stat) //they're not dead or in crit
@@ -194,7 +194,7 @@ datum/objective/block
return 0 return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom) var/area/shuttle = locate(/area/shuttle/escape/centcom)
var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
for(var/mob/living/player in world) for(var/mob/living/player in player_list)
if(player.type in protected_mobs) continue if(player.type in protected_mobs) continue
if (player.mind) if (player.mind)
if (player.stat != 2) if (player.stat != 2)
@@ -215,7 +215,7 @@ datum/objective/silence
var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom) var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom)
var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom) var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom)
for(var/mob/living/player in world) for(var/mob/living/player in player_list)
if (player == owner.current) if (player == owner.current)
continue continue
if (player.mind) if (player.mind)
@@ -457,11 +457,11 @@ datum/objective/absorb
if (ticker) if (ticker)
var/n_p = 1 //autowin var/n_p = 1 //autowin
if (ticker.current_state == GAME_STATE_SETTING_UP) if (ticker.current_state == GAME_STATE_SETTING_UP)
for(var/mob/new_player/P in world) for(var/mob/new_player/P in player_list)
if(P.client && P.ready && P.mind!=owner) if(P.client && P.ready && P.mind!=owner)
n_p ++ n_p ++
else if (ticker.current_state == GAME_STATE_PLAYING) else if (ticker.current_state == GAME_STATE_PLAYING)
for(var/mob/living/carbon/human/P in world) for(var/mob/living/carbon/human/P in player_list)
if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner) if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
n_p ++ n_p ++
target_amount = min(target_amount, n_p) target_amount = min(target_amount, n_p)

View File

@@ -47,7 +47,7 @@
var/list/datum/mind/possible_headrevs = get_players_for_role(BE_REV) var/list/datum/mind/possible_headrevs = get_players_for_role(BE_REV)
var/head_check = 0 var/head_check = 0
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if(player.mind.assigned_role in command_positions) if(player.mind.assigned_role in command_positions)
head_check = 1 head_check = 1
break break

View File

@@ -11,9 +11,8 @@
world << "<B>Build your own station with the sandbox-panel command!</B>" world << "<B>Build your own station with the sandbox-panel command!</B>"
/datum/game_mode/sandbox/pre_setup() /datum/game_mode/sandbox/pre_setup()
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) M.CanBuild()
M.CanBuild()
return 1 return 1
/datum/game_mode/sandbox/check_finished() /datum/game_mode/sandbox/check_finished()

View File

@@ -5,7 +5,7 @@
set desc = "Summon Guns" set desc = "Summon Guns"
set name = "Wizards: No sense of right and wrong!" set name = "Wizards: No sense of right and wrong!"
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in player_list)
if(H.stat == 2 || !(H.client)) continue if(H.stat == 2 || !(H.client)) continue
if(is_special_character(H)) continue if(is_special_character(H)) continue
if(prob(25)) if(prob(25))

View File

@@ -104,7 +104,7 @@ var/global/datum/controller/occupations/job_master
break break
proc/ResetOccupations() proc/ResetOccupations()
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if((player) && (player.mind)) if((player) && (player.mind))
player.mind.assigned_role = null player.mind.assigned_role = null
player.mind.special_role = null player.mind.special_role = null
@@ -172,7 +172,7 @@ var/global/datum/controller/occupations/job_master
A.spawn_positions = 3 A.spawn_positions = 3
//Get the players who are ready //Get the players who are ready
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role)) if((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role))
unassigned += player unassigned += player
@@ -415,7 +415,7 @@ var/global/datum/controller/occupations/job_master
var/level3 = 0 //low var/level3 = 0 //low
var/level4 = 0 //never var/level4 = 0 //never
var/level5 = 0 //banned var/level5 = 0 //banned
for(var/mob/new_player/player in world) for(var/mob/new_player/player in player_list)
if(!((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role))) if(!((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role)))
continue //This player is not ready continue //This player is not ready
if(jobban_isbanned(player, job.title)) if(jobban_isbanned(player, job.title))

View File

@@ -55,7 +55,7 @@ var/global/list/obj/machinery/camera/Cameras = list()
var/list/namecounts = list() var/list/namecounts = list()
var/list/humans = list() var/list/humans = list()
var/list/others = list() var/list/others = list()
for(var/mob/living/M in world) for(var/mob/living/M in mob_list)
//Cameras can't track people wearing an agent card or a ninja hood. //Cameras can't track people wearing an agent card or a ninja hood.
var/human = 0 var/human = 0
if(istype(M, /mob/living/carbon/human)) if(istype(M, /mob/living/carbon/human))
@@ -242,11 +242,11 @@ var/global/list/obj/machinery/camera/Cameras = list()
spawn(900) spawn(900)
network = initial(network) network = initial(network)
icon_state = initial(icon_state) icon_state = initial(icon_state)
for(var/mob/living/silicon/ai/O in world) for(var/mob/living/silicon/ai/O in mob_list)
if (O.current == src) if (O.current == src)
O.cancel_camera() O.cancel_camera()
O << "Your connection to the camera has been lost." O << "Your connection to the camera has been lost."
for(var/mob/O in world) for(var/mob/O in mob_list)
if (istype(O.machine, /obj/machinery/computer/security)) if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine var/obj/machinery/computer/security/S = O.machine
if (S.current == src) if (S.current == src)
@@ -307,12 +307,12 @@ var/global/list/obj/machinery/camera/Cameras = list()
itemname = P.name itemname = P.name
info = P.notehtml info = P.notehtml
U << "You hold \a [itemname] up to the camera ..." U << "You hold \a [itemname] up to the camera ..."
for(var/mob/living/silicon/ai/O in world) for(var/mob/living/silicon/ai/O in player_list)
//if (O.current == src) //if (O.current == src)
if(U.name == "Unknown") O << "<b>[U]</b> holds \a [itemname] up to one of your cameras ..." if(U.name == "Unknown") O << "<b>[U]</b> holds \a [itemname] up to one of your cameras ..."
else O << "<b><a href='byond://?src=\ref[O];track2=\ref[O];track=\ref[U]'>[U]</a></b> holds \a [itemname] up to one of your cameras ..." else O << "<b><a href='byond://?src=\ref[O];track2=\ref[O];track=\ref[U]'>[U]</a></b> holds \a [itemname] up to one of your cameras ..."
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname)) O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
for(var/mob/O in world) for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security)) if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine var/obj/machinery/computer/security/S = O.machine
if (S.current == src) if (S.current == src)
@@ -388,11 +388,11 @@ var/global/list/obj/machinery/camera/Cameras = list()
// now disconnect anyone using the camera // now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated. //Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they can't use it anyway? //I guess that doesn't matter since they can't use it anyway?
for(var/mob/living/silicon/ai/O in world) for(var/mob/living/silicon/ai/O in player_list)
if (O.current == src) if (O.current == src)
O.cancel_camera() O.cancel_camera()
O << "Your connection to the camera has been lost." O << "Your connection to the camera has been lost."
for(var/mob/O in world) for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security)) if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine var/obj/machinery/computer/security/S = O.machine
if (S.current == src) if (S.current == src)

View File

@@ -52,7 +52,7 @@
return return
var/mob/selected = null var/mob/selected = null
for(var/mob/M in world) for(var/mob/M in player_list)
//Dead people only thanks! //Dead people only thanks!
if ((M.stat != 2) || (!M.client)) if ((M.stat != 2) || (!M.client))
continue continue

View File

@@ -516,7 +516,7 @@
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
return ..() return ..()
for(var/mob/living/silicon/ai/shuttlecaller in world) for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
return ..() return ..()
@@ -541,7 +541,7 @@
if((istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) && commboard != src) if((istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) && commboard != src)
return ..() return ..()
for(var/mob/living/silicon/ai/shuttlecaller in world) for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
return ..() return ..()

View File

@@ -38,7 +38,7 @@
dat += "<A href='?src=\ref[src];screen=1'>1. Cyborg Status</A><BR>" dat += "<A href='?src=\ref[src];screen=1'>1. Cyborg Status</A><BR>"
dat += "<A href='?src=\ref[src];screen=2'>2. Emergency Full Destruct</A><BR>" dat += "<A href='?src=\ref[src];screen=2'>2. Emergency Full Destruct</A><BR>"
if(screen == 1) if(screen == 1)
for(var/mob/living/silicon/robot/R in world) for(var/mob/living/silicon/robot/R in mob_list)
if(istype(user, /mob/living/silicon/ai)) if(istype(user, /mob/living/silicon/ai))
if (R.connected_ai != user) if (R.connected_ai != user)
continue continue
@@ -224,7 +224,7 @@
sleep(10) sleep(10)
while(src.timeleft) while(src.timeleft)
for(var/mob/living/silicon/robot/R in world) for(var/mob/living/silicon/robot/R in mob_list)
if(!R.scrambledcodes) if(!R.scrambledcodes)
R.self_destruct() R.self_destruct()

View File

@@ -19,7 +19,7 @@ Possible to do for anyone motivated enough:
last_request = world.time last_request = world.time
user << "<span class='notice'>You request an AI's presence.</span>" user << "<span class='notice'>You request an AI's presence.</span>"
var/area/area = get_area(src) var/area/area = get_area(src)
for(var/mob/living/silicon/ai/AI in world) for(var/mob/living/silicon/ai/AI in player_list)
if(!AI.client) continue if(!AI.client) continue
AI << "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=\ref[src]'>\the [area]</a>.</span>" AI << "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=\ref[src]'>\the [area]</a>.</span>"
else else

View File

@@ -98,9 +98,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
..() ..()
var/image/blood = image(loc = src) var/image/blood = image(loc = src)
blood.override = 1 blood.override = 1
for(var/mob/living/silicon/ai/AI in world) for(var/mob/living/silicon/ai/AI in player_list)
if(AI.client) AI.client.images += blood
AI.client.images += blood
examine() examine()
set src in view(2) set src in view(2)

View File

@@ -225,3 +225,39 @@ datum/controller/game_controller
return 1 return 1
/datum/failsafe // This thing pretty much just keeps poking the master controller
var/spinning = 1
var/current_iteration = 0
/datum/failsafe/proc/spin()
if(!master_controller) // Well fuck. How did this happen?
sleep(50)
if(!master_controller)
master_controller = new /datum/controller/game_controller()
spawn(-1)
master_controller.setup()
else
while(spinning)
current_iteration = controller_iteration
sleep(600) // Wait 15 seconds
if(current_iteration == controller_iteration) // Mm. The master controller hasn't ticked yet.
for (var/mob/M in admin_list)
if (M.client)
M << "<font color='red' size='2'><b> Warning. The Master Controller has not fired in the last 60 seconds. Restart recommended. Automatic restart in 60 seconds.</b></font>"
sleep(600)
if(current_iteration == controller_iteration)
for (var/mob/M in admin_list)
if (M.client)
M << "<font color='red' size='2'><b> Warning. The Master Controller has not fired in the last 2 minutes. Automatic restart beginning.</b></font>"
master_controller.process()
sleep(150)
else
for (var/mob/M in admin_list)
if (M.client)
M << "<font color='red' size='2'><b> The Master Controller has fired. Automatic restart aborted.</b></font>"

View File

@@ -766,7 +766,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/who = src.owner var/who = src.owner
if(prob(50)) if(prob(50))
who = P:owner who = P:owner
for(var/mob/living/silicon/ai/ai in world) for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message. // Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src) if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>") ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")

View File

@@ -298,7 +298,7 @@
/obj/effect/manifest/proc/manifest() /obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>" var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in world) for(var/mob/living/carbon/human/M in mob_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment()) dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
P.info = dat P.info = dat

View File

@@ -189,8 +189,8 @@
if (M.brainmob && M.brainmob.mind) if (M.brainmob && M.brainmob.mind)
M.brainmob.mind.transfer_to(O) M.brainmob.mind.transfer_to(O)
else else
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.corpse == M.brainmob && G.client && G.corpse.mind) if(G.corpse == M.brainmob && G.corpse.mind)
G.corpse.mind.transfer_to(O) G.corpse.mind.transfer_to(O)
del(G) del(G)
break break

View File

@@ -50,8 +50,8 @@
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R) /obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
if(!R.key) if(!R.key)
for(var/mob/dead/observer/ghost in world) for(var/mob/dead/observer/ghost in player_list)
if(ghost.corpse == R && ghost.client) if(ghost.corpse == R)
ghost.client.mob = ghost.corpse ghost.client.mob = ghost.corpse
if(R.health < 0) if(R.health < 0)

View File

@@ -46,7 +46,7 @@ AI MODULES
src.transmitInstructions(comp.current, usr) src.transmitInstructions(comp.current, usr)
comp.current << "These are your laws now:" comp.current << "These are your laws now:"
comp.current.show_laws() comp.current.show_laws()
for(var/mob/living/silicon/robot/R in world) for(var/mob/living/silicon/robot/R in mob_list)
if(R.lawupdate && (R.connected_ai == comp.current)) if(R.lawupdate && (R.connected_ai == comp.current))
R << "Your AI has set your 'laws waiting' flag." R << "Your AI has set your 'laws waiting' flag."
usr << "Upload complete. The AI's laws have been modified." usr << "Upload complete. The AI's laws have been modified."

View File

@@ -33,7 +33,7 @@
features += "AI allowed" features += "AI allowed"
var/n = 0 var/n = 0
for (var/mob/M in world) for (var/mob/M in player_list)
if (M.client) if (M.client)
n++ n++

View File

@@ -163,7 +163,7 @@ var/list/mechtoys = list(
//I know this is an absolutly horrendous way to do this, very inefficient, but it's the only reliable way I can think of. //I know this is an absolutly horrendous way to do this, very inefficient, but it's the only reliable way I can think of.
//Check for mobs //Check for mobs
for(var/mob/living/M in world) for(var/mob/living/M in mob_list)
var/area/A = get_area(M) var/area/A = get_area(M)
if(!A || !A.type) continue if(!A || !A.type) continue
if(A.type == /area/supply/station) if(A.type == /area/supply/station)

View File

@@ -9,7 +9,7 @@
else if(T == "players") else if(T == "players")
var/n = 0 var/n = 0
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) if(M.client)
n++ n++
return n return n
@@ -27,7 +27,7 @@
var/n = 0 var/n = 0
var/admins = 0 var/admins = 0
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) if(M.client)
if(M.client.holder) if(M.client.holder)

View File

@@ -1,9 +1,7 @@
proc/get_all_clients() proc/get_all_clients()
var/list/client/clients = list() var/list/client/clients = list()
for (var/mob/M in world) for (var/mob/M in player_list)
if (!M.client)
continue
clients += M.client clients += M.client
@@ -12,12 +10,7 @@ proc/get_all_clients()
proc/get_all_admin_clients() proc/get_all_admin_clients()
var/list/client/clients = list() var/list/client/clients = list()
for (var/mob/M in world) for (var/mob/M in admin_list)
if (!M.client)
continue
if (!M.client.holder)
continue
clients += M.client clients += M.client
@@ -32,14 +25,11 @@ proc/get_all_admin_clients()
var/list/peeps = list() var/list/peeps = list()
for (var/mob/M in world) for (var/client/C in client_list)
if (!M.client) if (C.stealth && !usr.client.holder)
continue peeps += "\t[C.fakekey]"
if (M.client.stealth && !usr.client.holder)
peeps += "\t[M.client.fakekey]"
else else
peeps += "\t[M.client][M.client.stealth ? " <i>(as [M.client.fakekey])</i>" : ""]" peeps += "\t[C.key][C.stealth ? " <i>(as [C.fakekey])</i>" : ""]"
peeps = sortList(peeps) peeps = sortList(peeps)
@@ -54,9 +44,9 @@ proc/get_all_admin_clients()
usr << "<b>Current Admins:</b>" usr << "<b>Current Admins:</b>"
for (var/mob/M in world) for (var/mob/M in admin_list)
if(M && M.client && M.client.holder) if(M && M.client)
if(usr.client.holder) if(usr.client)
var/afk = 0 var/afk = 0
if( M.client.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one. if( M.client.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
afk = 1 afk = 1

View File

@@ -33,7 +33,7 @@
/datum/vote/proc/getvotes() /datum/vote/proc/getvotes()
var/list/L = list() var/list/L = list()
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count
L[M.client.vote] += 1 L[M.client.vote] += 1
@@ -51,7 +51,7 @@
voting = 0 voting = 0
nextvotetime = world.timeofday + 10*config.vote_delay nextvotetime = world.timeofday + 10*config.vote_delay
for(var/mob/M in world) // clear vote window from all clients for(var/mob/M in player_list) // clear vote window from all clients
if(M.client) if(M.client)
M << browse(null, "window=vote") M << browse(null, "window=vote")
M.client.showvote = 0 M.client.showvote = 0
@@ -322,7 +322,7 @@
log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [usr.name]/[usr.key]") log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [usr.name]/[usr.key]")
for(var/mob/CM in world) for(var/mob/CM in player_list)
if(CM.client) if(CM.client)
if( config.vote_no_default || (config.vote_no_dead && CM.stat == 2) ) if( config.vote_no_default || (config.vote_no_dead && CM.stat == 2) )
CM.client.vote = "none" CM.client.vote = "none"

View File

@@ -11,10 +11,6 @@ var/global/list/processing_objects = list()
var/global/list/active_diseases = list() var/global/list/active_diseases = list()
//items that ask to be called every cycle //items that ask to be called every cycle
// This list will map client ckeys to client objects
// It will be automatically kept up to date by client/New and client/Del
var/global/list/client_list = list()
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
var/global/list/global_map = null var/global/list/global_map = null

View File

@@ -53,9 +53,9 @@ obj/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1
a_computerid = src.owner:computer_id a_computerid = src.owner:computer_id
a_ip = src.owner:address a_ip = src.owner:address
var/list/client/clients = get_all_clients() // var/list/client/clients = get_all_clients()
var/who var/who
for(var/client/C in clients) for(var/client/C in client_list)
if(!who) if(!who)
who = "[C]" who = "[C]"
else else

View File

@@ -6,8 +6,8 @@ var/global/BSACooldown = 0
/proc/message_admins(var/text, var/admin_ref = 0, var/admin_holder_ref = 0) /proc/message_admins(var/text, var/admin_ref = 0, var/admin_holder_ref = 0)
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>" var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
log_adminwarn(rendered) log_adminwarn(rendered)
for (var/mob/M in world) for (var/mob/M in admin_list)
if (M && M.client && M.client.holder) if (M)
var/msg = rendered var/msg = rendered
if (admin_ref) if (admin_ref)
msg = dd_replaceText(msg, "%admin_ref%", "\ref[M]") msg = dd_replaceText(msg, "%admin_ref%", "\ref[M]")
@@ -1630,14 +1630,14 @@ var/global/BSACooldown = 0
if("monkey") if("monkey")
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M") feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in mob_list)
spawn(0) spawn(0)
H.monkeyize() H.monkeyize()
ok = 1 ok = 1
if("corgi") if("corgi")
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M") feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in mob_list)
spawn(0) spawn(0)
H.corgize() H.corgize()
ok = 1 ok = 1
@@ -1688,7 +1688,7 @@ var/global/BSACooldown = 0
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","PW") feedback_add_details("admin_secrets_fun_used","PW")
message_admins("\blue [key_name_admin(usr)] teleported all players to the prison station.", 1) message_admins("\blue [key_name_admin(usr)] teleported all players to the prison station.", 1)
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in mob_list)
var/turf/loc = find_loc(H) var/turf/loc = find_loc(H)
var/security = 0 var/security = 0
if(loc.z > 1 || prisonwarped.Find(H)) if(loc.z > 1 || prisonwarped.Find(H))
@@ -1731,7 +1731,7 @@ var/global/BSACooldown = 0
return return
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TA([objective])") feedback_add_details("admin_secrets_fun_used","TA([objective])")
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in player_list)
if(H.stat == 2 || !H.client || !H.mind) continue if(H.stat == 2 || !H.client || !H.mind) continue
if(is_special_character(H)) continue if(is_special_character(H)) continue
//traitorize(H, objective, 0) //traitorize(H, objective, 0)
@@ -1744,7 +1744,7 @@ var/global/BSACooldown = 0
ticker.mode.greet_traitor(H) ticker.mode.greet_traitor(H)
//ticker.mode.forge_traitor_objectives(H.mind) //ticker.mode.forge_traitor_objectives(H.mind)
ticker.mode.finalize_traitor(H) ticker.mode.finalize_traitor(H)
for(var/mob/living/silicon/A in world) for(var/mob/living/silicon/A in player_list)
ticker.mode.traitors += A.mind ticker.mode.traitors += A.mind
A.mind.special_role = "traitor" A.mind.special_role = "traitor"
var/datum/objective/new_objective = new var/datum/objective/new_objective = new
@@ -1825,8 +1825,8 @@ var/global/BSACooldown = 0
feedback_add_details("admin_secrets_fun_used","FL") feedback_add_details("admin_secrets_fun_used","FL")
while(!usr.stat) while(!usr.stat)
//knock yourself out to stop the ghosts //knock yourself out to stop the ghosts
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client && M.stat != 2 && prob(25)) if(M.stat != 2 && prob(25))
var/area/AffectedArea = get_area(M) var/area/AffectedArea = get_area(M)
if(AffectedArea.name != "Space" && AffectedArea.name != "Engine Walls" && AffectedArea.name != "Chemical Lab Test Chamber" && AffectedArea.name != "Escape Shuttle" && AffectedArea.name != "Arrival Area" && AffectedArea.name != "Arrival Shuttle" && AffectedArea.name != "start area" && AffectedArea.name != "Engine Combustion Chamber") if(AffectedArea.name != "Space" && AffectedArea.name != "Engine Walls" && AffectedArea.name != "Chemical Lab Test Chamber" && AffectedArea.name != "Escape Shuttle" && AffectedArea.name != "Arrival Area" && AffectedArea.name != "Arrival Shuttle" && AffectedArea.name != "start area" && AffectedArea.name != "Engine Combustion Chamber")
AffectedArea.power_light = 0 AffectedArea.power_light = 0
@@ -1848,8 +1848,8 @@ var/global/BSACooldown = 0
if(prob(25) && !W.anchored) if(prob(25) && !W.anchored)
step_rand(W) step_rand(W)
sleep(rand(100,1000)) sleep(rand(100,1000))
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client && M.stat != 2) if(M.stat != 2)
M.show_message(text("\blue The chilling wind suddenly stops..."), 1) M.show_message(text("\blue The chilling wind suddenly stops..."), 1)
/* if("shockwave") /* if("shockwave")
ok = 1 ok = 1
@@ -1998,9 +1998,8 @@ var/global/BSACooldown = 0
if (src.rank in list("Badmin", "Game Admin", "Game Master")) if (src.rank in list("Badmin", "Game Admin", "Game Master"))
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RET") feedback_add_details("admin_secrets_fun_used","RET")
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in player_list)
if(H.client) H << "\red <B>You suddenly feel stupid.</B>"
H << "\red <B>You suddenly feel stupid.</B>"
H.setBrainLoss(60) H.setBrainLoss(60)
message_admins("[key_name_admin(usr)] made everybody retarded") message_admins("[key_name_admin(usr)] made everybody retarded")
else else
@@ -2037,7 +2036,7 @@ var/global/BSACooldown = 0
if (src.rank in list("Badmin","Game Admin", "Game Master")) if (src.rank in list("Badmin","Game Admin", "Game Master"))
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF") feedback_add_details("admin_secrets_fun_used","DF")
for(var/mob/living/carbon/human/B in world) for(var/mob/living/carbon/human/B in mob_list)
B.face_icon_state = "facial_wise" B.face_icon_state = "facial_wise"
B.update_hair() B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode") message_admins("[key_name_admin(usr)] activated dorf mode")
@@ -2102,7 +2101,7 @@ var/global/BSACooldown = 0
if("check_antagonist") if("check_antagonist")
check_antagonists() check_antagonists()
if("showailaws") if("showailaws")
for(var/mob/living/silicon/ai/ai in world) for(var/mob/living/silicon/ai/ai in mob_list)
usr << "[key_name(ai, usr)]'s Laws:" usr << "[key_name(ai, usr)]'s Laws:"
if (ai.laws == null) if (ai.laws == null)
usr << "[key_name(ai, usr)]'s Laws are null??" usr << "[key_name(ai, usr)]'s Laws are null??"
@@ -2117,7 +2116,7 @@ var/global/BSACooldown = 0
if("manifest") if("manifest")
var/dat = "<B>Showing Crew Manifest.</B><HR>" var/dat = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>" dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey) if(H.ckey)
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment()) dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
dat += "</table>" dat += "</table>"
@@ -2125,7 +2124,7 @@ var/global/BSACooldown = 0
if("DNA") if("DNA")
var/dat = "<B>Showing DNA from blood.</B><HR>" var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>" dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in mob_list)
if(H.dna && H.ckey) if(H.dna && H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.b_type]</td></tr>" dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.b_type]</td></tr>"
dat += "</table>" dat += "</table>"
@@ -2133,7 +2132,7 @@ var/global/BSACooldown = 0
if("fingerprints") if("fingerprints")
var/dat = "<B>Showing Fingerprints.</B><HR>" var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>" dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey) if(H.ckey)
if(H.dna && H.dna.uni_identity) if(H.dna && H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>" dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
@@ -2181,7 +2180,7 @@ var/global/BSACooldown = 0
///////////////////////////////////////////////////////////////////////////////////////////////Panels ///////////////////////////////////////////////////////////////////////////////////////////////Panels
/obj/admins/proc/show_player_panel(var/mob/M in world) /obj/admins/proc/show_player_panel(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set name = "Show Player Panel" set name = "Show Player Panel"
set desc="Edit player (respawn, ban, heal, etc)" set desc="Edit player (respawn, ban, heal, etc)"
@@ -2559,19 +2558,17 @@ var/global/BSACooldown = 0
log_admin("Voting to [vote.mode?"change mode":"restart round"] forced by admin [key_name(usr)]") log_admin("Voting to [vote.mode?"change mode":"restart round"] forced by admin [key_name(usr)]")
for(var/mob/CM in world) for(var/mob/CM in player_list)
if(CM.client) if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2)) CM.client.vote = "none"
CM.client.vote = "none" else
else CM.client.vote = "default"
CM.client.vote = "default"
for(var/mob/CM in world) for(var/mob/CM in player_list)
if(CM.client) if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2)) CM.client.vote = "none"
CM.client.vote = "none" else
else CM.client.vote = "default"
CM.client.vote = "default"
feedback_add_details("admin_verb","SV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","SV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/obj/admins/proc/votekill() /obj/admins/proc/votekill()
@@ -2588,11 +2585,10 @@ var/global/BSACooldown = 0
vote.voting = 0 vote.voting = 0
vote.nextvotetime = world.timeofday + 10*config.vote_delay vote.nextvotetime = world.timeofday + 10*config.vote_delay
for(var/mob/M in world) for(var/mob/M in player_list)
// clear vote window from all clients // clear vote window from all clients
if(M.client) M << browse(null, "window=vote")
M << browse(null, "window=vote") M.client.showvote = 0
M.client.showvote = 0
feedback_add_details("admin_verb","AV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","AV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/obj/admins/proc/voteres() /obj/admins/proc/voteres()
@@ -2841,7 +2837,7 @@ var/global/BSACooldown = 0
usr << "Prayer visibility turned off" usr << "Prayer visibility turned off"
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/obj/admins/proc/unprison(var/mob/M in world) /obj/admins/proc/unprison(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set name = "Unprison" set name = "Unprison"
if (M.z == 2) if (M.z == 2)
@@ -2954,7 +2950,7 @@ var/global/BSACooldown = 0
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/obj/admins/proc/show_traitor_panel(var/mob/M in world) /obj/admins/proc/show_traitor_panel(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set desc = "Edit mobs's memory and role" set desc = "Edit mobs's memory and role"
set name = "Show Traitor Panel" set name = "Show Traitor Panel"

View File

@@ -473,14 +473,13 @@
/client/proc/get_admin_state() /client/proc/get_admin_state()
set name = "Get Admin State" set name = "Get Admin State"
set category = "Debug" set category = "Debug"
for(var/mob/M in world) for(var/mob/M in admin_list)
if(M.client && M.client.holder) if(M.client.holder.state == 1)
if(M.client.holder.state == 1) src << "[M.key] is playing - [M.client.holder.state]"
src << "[M.key] is playing - [M.client.holder.state]" else if(M.client.holder.state == 2)
else if(M.client.holder.state == 2) src << "[M.key] is observing - [M.client.holder.state]"
src << "[M.key] is observing - [M.client.holder.state]" else
else src << "[M.key] is undefined - [M.client.holder.state]"
src << "[M.key] is undefined - [M.client.holder.state]"
feedback_add_details("admin_verb","GAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","GAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -578,7 +577,7 @@
feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
#define AUTOBATIME 10 #define AUTOBATIME 10
/client/proc/warn(var/mob/M in world) /client/proc/warn(var/mob/M in player_list)
/*set category = "Special Verbs" /*set category = "Special Verbs"
set name = "Warn" set name = "Warn"
set desc = "Warn a player"*/ //Based on the information I gathered via stat logging this verb was not used. Use the show player panel alternative. --erro set desc = "Warn a player"*/ //Based on the information I gathered via stat logging this verb was not used. Use the show player panel alternative. --erro
@@ -631,7 +630,7 @@
message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].") message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/give_spell(mob/T as mob in world) // -- Urist /client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
set category = "Fun" set category = "Fun"
set name = "Give Spell" set name = "Give Spell"
set desc = "Gives a spell to a mob." set desc = "Gives a spell to a mob."

View File

@@ -33,7 +33,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
var/list/mob/mobs = list() var/list/mob/mobs = list()
for(var/mob/M in world) for(var/mob/M in mob_list)
mobs += M mobs += M
var/list/replacement_value = list() //When a word match is found, the word matched will get replaced with an <20> (fancy multiplication symbol). var/list/replacement_value = list() //When a word match is found, the word matched will get replaced with an <20> (fancy multiplication symbol).

View File

@@ -30,7 +30,7 @@
alert("Admin jumping disabled") alert("Admin jumping disabled")
return return
/client/proc/jumptomob(var/mob/M in world) /client/proc/jumptomob(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set name = "Jump to Mob" set name = "Jump to Mob"
@@ -82,7 +82,7 @@
if(config.allow_admin_jump) if(config.allow_admin_jump)
var/list/keys = list() var/list/keys = list()
for(var/mob/M in world) for(var/mob/M in player_list)
keys += M.client keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
if(!selection) if(!selection)
@@ -95,7 +95,7 @@
else else
alert("Admin jumping disabled") alert("Admin jumping disabled")
/client/proc/Getmob(var/mob/M in world) /client/proc/Getmob(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set name = "Get Mob" set name = "Get Mob"
set desc = "Mob to teleport" set desc = "Mob to teleport"
@@ -121,7 +121,7 @@
if(config.allow_admin_jump) if(config.allow_admin_jump)
var/list/keys = list() var/list/keys = list()
for(var/mob/M in world) for(var/mob/M in player_list)
keys += M.client keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
if(!selection) if(!selection)
@@ -138,7 +138,7 @@
else else
alert("Admin jumping disabled") alert("Admin jumping disabled")
/client/proc/sendmob(var/mob/M in world, var/area/A in world) /client/proc/sendmob(var/mob/M in mob_list, var/area/A in world)
set category = "Admin" set category = "Admin"
set name = "Send Mob" set name = "Send Mob"
if(!src.holder) if(!src.holder)

View File

@@ -1,5 +1,5 @@
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm //allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
/client/proc/cmd_admin_pm_context(mob/M as mob in world) /client/proc/cmd_admin_pm_context(mob/M as mob in mob_list)
set category = null set category = null
set name = "Admin PM Mob" set name = "Admin PM Mob"
if(!holder) if(!holder)

View File

@@ -22,10 +22,9 @@
return return
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/mob/M in world) for (var/mob/M in admin_list)
if (M.client && M.client.holder) if (src.holder.rank == "Admin Observer")
if (src.holder.rank == "Admin Observer") M << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]:</EM> <span class='message'>[msg]</span></span>"
M << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]:</EM> <span class='message'>[msg]</span></span>" else
else M << "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
M << "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"

View File

@@ -22,7 +22,7 @@
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.stealth ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>" var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.stealth ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
for (var/mob/M in world) for (var/mob/M in player_list)
if (istype(M, /mob/new_player)) if (istype(M, /mob/new_player))
continue continue
if (M.stat == 2 || (M.client && M.client.holder && M.client.deadchat)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above if (M.stat == 2 || (M.client && M.client.holder && M.client.deadchat)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above

View File

@@ -157,7 +157,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
usr.show_message(t, 1) usr.show_message(t, 1)
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_robotize(var/mob/M in world) /client/proc/cmd_admin_robotize(var/mob/M in mob_list)
set category = "Fun" set category = "Fun"
set name = "Make Robot" set name = "Make Robot"
@@ -172,13 +172,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else else
alert("Invalid mob") alert("Invalid mob")
/client/proc/makepAI(var/turf/T in world) /client/proc/makepAI(var/turf/T in mob_list)
set category = "Fun" set category = "Fun"
set name = "Make pAI" set name = "Make pAI"
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI" set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
var/list/available = list() var/list/available = list()
for(var/mob/C in world) for(var/mob/C in mob_list)
if(C.key) if(C.key)
available.Add(C) available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
@@ -199,7 +199,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
paiController.pai_candidates.Remove(candidate) paiController.pai_candidates.Remove(candidate)
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_alienize(var/mob/M in world) /client/proc/cmd_admin_alienize(var/mob/M in mob_list)
set category = "Fun" set category = "Fun"
set name = "Make Alien" set name = "Make Alien"
@@ -216,7 +216,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else else
alert("Invalid mob") alert("Invalid mob")
/client/proc/cmd_admin_metroidize(var/mob/M in world) /client/proc/cmd_admin_metroidize(var/mob/M in mob_list)
set category = "Fun" set category = "Fun"
set name = "Make Metroid" set name = "Make Metroid"
@@ -356,7 +356,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0) message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0)
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_grantfullaccess(var/mob/M in world) /client/proc/cmd_admin_grantfullaccess(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set name = "Grant Full Access" set name = "Grant Full Access"
@@ -387,7 +387,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] has granted [M.key] full access.") log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins("\blue [key_name_admin(usr)] has granted [M.key] full access.", 1) message_admins("\blue [key_name_admin(usr)] has granted [M.key] full access.", 1)
/client/proc/cmd_assume_direct_control(var/mob/M in world) /client/proc/cmd_assume_direct_control(var/mob/M in mob_list)
set category = "Admin" set category = "Admin"
set name = "Assume direct control" set name = "Assume direct control"
set desc = "Direct intervention" set desc = "Direct intervention"
@@ -421,7 +421,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
feedback_add_details("admin_verb","SRM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","SRM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in world) /client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in mob_list)
set category = "Fun" set category = "Fun"
set name = "Select equipment" set name = "Select equipment"
if(!ishuman(M)) if(!ishuman(M))

View File

@@ -7,7 +7,7 @@
usr << alert("Master_controller not found.") usr << alert("Master_controller not found.")
var/mobs = 0 var/mobs = 0
for(var/mob/M in world) for(var/mob/M in mob_list)
mobs++ mobs++
var/output = {"<B>GENERAL SYSTEMS REPORT</B><HR> var/output = {"<B>GENERAL SYSTEMS REPORT</B><HR>

View File

@@ -138,7 +138,7 @@
O.vars[variable] = initial(O.vars[variable]) O.vars[variable] = initial(O.vars[variable])
if(method) if(method)
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if ( istype(M , O.type) ) if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -154,7 +154,7 @@
else else
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if (M.type == O.type) if (M.type == O.type)
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -178,7 +178,7 @@
if(method) if(method)
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if ( istype(M , O.type) ) if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -193,7 +193,7 @@
A.vars[variable] = O.vars[variable] A.vars[variable] = O.vars[variable]
else else
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if (M.type == O.type) if (M.type == O.type)
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -219,7 +219,7 @@
if(method) if(method)
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if ( istype(M , O.type) ) if ( istype(M , O.type) )
if(variable=="luminosity") if(variable=="luminosity")
M.sd_SetLuminosity(new_value) M.sd_SetLuminosity(new_value)
@@ -244,7 +244,7 @@
else else
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if (M.type == O.type) if (M.type == O.type)
if(variable=="luminosity") if(variable=="luminosity")
M.sd_SetLuminosity(new_value) M.sd_SetLuminosity(new_value)
@@ -274,7 +274,7 @@
O.vars[variable] = new_value O.vars[variable] = new_value
if(method) if(method)
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if ( istype(M , O.type) ) if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -289,7 +289,7 @@
A.vars[variable] = O.vars[variable] A.vars[variable] = O.vars[variable]
else else
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if (M.type == O.type) if (M.type == O.type)
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -310,7 +310,7 @@
if(method) if(method)
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if ( istype(M , O.type) ) if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -325,7 +325,7 @@
A.vars[variable] = O.vars[variable] A.vars[variable] = O.vars[variable]
else else
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if (M.type == O.type) if (M.type == O.type)
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -345,7 +345,7 @@
O.vars[variable] = new_value O.vars[variable] = new_value
if(method) if(method)
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if ( istype(M , O.type) ) if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]
@@ -361,7 +361,7 @@
else else
if(istype(O, /mob)) if(istype(O, /mob))
for(var/mob/M in world) for(var/mob/M in mob_list)
if (M.type == O.type) if (M.type == O.type)
M.vars[variable] = O.vars[variable] M.vars[variable] = O.vars[variable]

View File

@@ -459,6 +459,16 @@ var/list/forbidden_varedit_object_types = list(
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return if(var_new == null) return
O.sd_SetLuminosity(var_new) O.sd_SetLuminosity(var_new)
else if(variable=="stat")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return
if((O.vars[variable] == 2) && (var_new < 2))//Bringing the dead back to life
dead_mob_list -= O
living_mob_list += O
if((O.vars[variable] < 2) && (var_new == 2))//Kill he
living_mob_list -= O
dead_mob_list += O
O.vars[variable] = var_new
else else
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new==null) return if(var_new==null) return

View File

@@ -9,7 +9,7 @@
return return
feedback_add_details("admin_verb","TCBOO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","TCBOO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in player_list)
if(H.stat == 2 || !(H.client)) continue if(H.stat == 2 || !(H.client)) continue
if(is_special_character(H)) continue if(is_special_character(H)) continue

View File

@@ -14,19 +14,17 @@
if(src.holder.rank == "Game Master" || src.holder.rank == "Game Admin" || src.holder.rank == "Badmin") if(src.holder.rank == "Game Master" || src.holder.rank == "Game Admin" || src.holder.rank == "Badmin")
log_admin("[key_name(src)] played sound [S]") log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1) message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) if(M.client.midis)
if(M.client.midis) M << uploaded_sound
M << uploaded_sound
else else
if(usr.client.canplaysound) if(usr.client.canplaysound)
usr.client.canplaysound = 0 usr.client.canplaysound = 0
log_admin("[key_name(src)] played sound [S]") log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1) message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client) if(M.client.midis)
if(M.client.midis) M << uploaded_sound
M << uploaded_sound
else else
usr << "You already used up your jukebox monies this round!" usr << "You already used up your jukebox monies this round!"
del(uploaded_sound) del(uploaded_sound)

View File

@@ -44,7 +44,7 @@
usr.control_object = null usr.control_object = null
feedback_add_details("admin_verb","RO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","RO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/givetestverbs(mob/M as mob in world) /proc/givetestverbs(mob/M as mob in mob_list)
set desc = "Give this guy possess/release verbs" set desc = "Give this guy possess/release verbs"
set category = "Debug" set category = "Debug"
set name = "Give Possessing Verbs" set name = "Give Possessing Verbs"

View File

@@ -16,8 +16,8 @@
var/icon/cross = icon('icons/obj/storage.dmi',"bible") var/icon/cross = icon('icons/obj/storage.dmi',"bible")
for (var/mob/M in world) for (var/mob/M in admin_list)
if (M.client && M.client.holder && M.client.seeprayers) if (M.client.seeprayers)
M << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];adminspawncookie=\ref[src]'>SC</a>):</b> [msg]" M << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
usr << "Your prayers have been received by the gods." usr << "Your prayers have been received by the gods."
@@ -31,9 +31,8 @@
// log_admin("[key_name(Sender)] sent a message to Centcomm! The message was [msg]") // Handled somewhere else // log_admin("[key_name(Sender)] sent a message to Centcomm! The message was [msg]") // Handled somewhere else
for (var/mob/M in world) for (var/mob/M in admin_list)
if (M.client && M.client.holder) M << "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[M.client.holder];CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
M << "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[M.client.holder];CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
// //
/proc/Syndicate_announce(var/text , var/mob/Sender) /proc/Syndicate_announce(var/text , var/mob/Sender)
@@ -41,7 +40,6 @@
// log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else // log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else
for (var/mob/M in world) for (var/mob/M in admin_list)
if (M.client && M.client.holder) M << "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[M.client.holder];SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
M << "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[M.client.holder];SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
// //

View File

@@ -1,4 +1,4 @@
/client/proc/cmd_admin_drop_everything(mob/M as mob in world) /client/proc/cmd_admin_drop_everything(mob/M as mob in mob_list)
set category = null set category = null
set name = "Drop Everything" set name = "Drop Everything"
if(!holder) if(!holder)
@@ -16,7 +16,7 @@
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1) message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_prison(mob/M as mob in world) /client/proc/cmd_admin_prison(mob/M as mob in mob_list)
set category = "Admin" set category = "Admin"
set name = "Prison" set name = "Prison"
if(!holder) if(!holder)
@@ -43,7 +43,7 @@
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1) message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_subtle_message(mob/M as mob in world) /client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Subtle Message" set name = "Subtle Message"
@@ -106,7 +106,7 @@
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1) message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M as mob in world) /client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Godmode" set name = "Godmode"
if(!holder) if(!holder)
@@ -249,10 +249,9 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(G)//If G exists through a passed argument. if(G)//If G exists through a passed argument.
candidates_list += G.client candidates_list += G.client
else//Else we need to find them. else//Else we need to find them.
for(G in world) for(G in player_list)
if(G.client) if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5)
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) candidates_list += G.client//We want their client, not their ghost.
candidates_list += G.client//We want their client, not their ghost.
if(candidates_list.len)//If there are people to spawn. if(candidates_list.len)//If there are people to spawn.
if(!G)//If G was not passed through an argument. if(!G)//If G was not passed through an argument.
var/client/G_client = input("Pick the client you want to respawn as a xeno.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate. var/client/G_client = input("Pick the client you want to respawn as a xeno.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate.
@@ -290,7 +289,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return return
var/mob/dead/observer/G_found var/mob/dead/observer/G_found
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client&&ckey(G.key)==ckey(input)) if(G.client&&ckey(G.key)==ckey(input))
G_found = G G_found = G
break break
@@ -508,14 +507,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
if(!input) if(!input)
return return
for(var/mob/living/silicon/ai/M in world) for(var/mob/living/silicon/ai/M in mob_list)
if (M.stat == 2) if (M.stat == 2)
usr << "Upload failed. No signal is being detected from the AI." usr << "Upload failed. No signal is being detected from the AI."
else if (M.see_in_dark == 0) else if (M.see_in_dark == 0)
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power." usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
else else
M.add_ion_law(input) M.add_ion_law(input)
for(var/mob/living/silicon/ai/O in world) for(var/mob/living/silicon/ai/O in mob_list)
O << "\red " + input O << "\red " + input
log_admin("Admin [key_name(usr)] has added a new AI law - [input]") log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
@@ -527,7 +526,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
world << sound('ionstorm.ogg') world << sound('ionstorm.ogg')
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in world) /client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Rejuvenate" set name = "Rejuvenate"
if(!holder) if(!holder)
@@ -662,7 +661,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else else
return return
/client/proc/cmd_admin_gib(mob/M as mob in world) /client/proc/cmd_admin_gib(mob/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Gib" set name = "Gib"
@@ -761,7 +760,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
// I will both remove their SVN access and permanently ban them from my servers. // I will both remove their SVN access and permanently ban them from my servers.
return return
/client/proc/cmd_admin_check_contents(mob/living/M as mob in world) /client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Check Contents" set name = "Check Contents"
@@ -868,7 +867,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return return
/client/proc/cmd_admin_attack_log(mob/M as mob in world) /client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Attack Log" set name = "Attack Log"

View File

@@ -54,11 +54,10 @@ var/global/sent_strike_team = 0
var/mob/dead/observer/G//Basic variable to search for later. var/mob/dead/observer/G//Basic variable to search for later.
var/candidates_list[] = list()//candidates for being a commando out of all the active ghosts in world. var/candidates_list[] = list()//candidates for being a commando out of all the active ghosts in world.
var/commandos_list[] = list()//actual commando ghosts as picked by the user. var/commandos_list[] = list()//actual commando ghosts as picked by the user.
for(G in world) for(G in admin_list)
if(G.client) if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list. // if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing.
// if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing. candidates_list += G.client//Add their client to list.
candidates_list += G.client//Add their client to list.
for(var/i=commandos_possible,(i>0&&candidates_list.len),i--)//Decrease with every commando selected. for(var/i=commandos_possible,(i>0&&candidates_list.len),i--)//Decrease with every commando selected.
var/client/G_client = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate. var/client/G_client = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate.
if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise. if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise.

View File

@@ -54,11 +54,10 @@ var/global/sent_syndicate_strike_team = 0
var/mob/dead/observer/G//Basic variable to search for later. var/mob/dead/observer/G//Basic variable to search for later.
var/candidates_list[] = list()//candidates for being a commando out of all the active ghosts in world. var/candidates_list[] = list()//candidates for being a commando out of all the active ghosts in world.
var/syndicate_commandos_list[] = list()//actual commando ghosts as picked by the user. var/syndicate_commandos_list[] = list()//actual commando ghosts as picked by the user.
for(G in world) for(G in admin_list)
if(G.client) if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list. // if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing.
// if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing. candidates_list += G.client//Add their client to list.
candidates_list += G.client//Add their client to list.
for(var/i=syndicate_commandos_possible,(i>0&&candidates_list.len),i--)//Decrease with every commando selected. for(var/i=syndicate_commandos_possible,(i>0&&candidates_list.len),i--)//Decrease with every commando selected.
var/client/G_client = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate. var/client/G_client = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate.
if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise. if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise.

View File

@@ -90,12 +90,11 @@
if( connection != "seeker" ) if( connection != "seeker" )
del(src) del(src)
return return
client_list |= src
if ( (world.address == address || !address) && !host ) if ( (world.address == address || !address) && !host )
host = key host = key
world.update_status() world.update_status()
client_list[ckey] = src
..() //calls mob.Login() ..() //calls mob.Login()
@@ -104,6 +103,7 @@
holder = new /obj/admins(src) holder = new /obj/admins(src)
holder.rank = admins[ckey] holder.rank = admins[ckey]
update_admins(admins[ckey]) update_admins(admins[ckey])
make_admin_list()
admin_memo_show() admin_memo_show()
@@ -116,4 +116,5 @@
spawn(0) spawn(0)
if(holder) if(holder)
del(holder) del(holder)
client_list -= src
return ..() return ..()

View File

@@ -351,7 +351,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
var/mob/living/carbon/human/clone = null var/mob/living/carbon/human/clone = null
var/clone_weapon = null var/clone_weapon = null
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying) continue if(H.stat || H.lying) continue
// possible_clones += H // possible_clones += H
clone = H clone = H

View File

@@ -270,9 +270,9 @@
..() ..()
if(istype(AM,/mob/living/carbon/human)) if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM var/mob/living/carbon/human/H = AM
if(istype(H.l_hand,/obj/item/weapon/pickaxe)) if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
src.attackby(H.l_hand,H) src.attackby(H.l_hand,H)
else if(istype(H.r_hand,/obj/item/weapon/pickaxe)) else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
src.attackby(H.r_hand,H) src.attackby(H.r_hand,H)
return return
else if(istype(AM,/mob/living/silicon/robot)) else if(istype(AM,/mob/living/silicon/robot))

View File

@@ -6,6 +6,8 @@
verbs += /mob/dead/observer/proc/dead_tele verbs += /mob/dead/observer/proc/dead_tele
stat = DEAD stat = DEAD
dead_mob_list += src
add_to_mob_list(src)
if(body) if(body)
var/turf/T = get_turf(body) //Where is the body located? var/turf/T = get_turf(body) //Where is the body located?
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
@@ -38,7 +40,7 @@ Works together with spawning an observer, noted above.
ghost.key = key ghost.key = key
else if(transfer_mind) //Body getting destroyed but the person is not present inside. else if(transfer_mind) //Body getting destroyed but the person is not present inside.
for(var/mob/dead/observer/O in world) for(var/mob/dead/observer/O in dead_mob_list)
if(O.corpse == src && O.key) //If they have the same corpse and are keyed. if(O.corpse == src && O.key) //If they have the same corpse and are keyed.
if(mind) if(mind)
O.mind = mind //Transfer their mind if they have one. O.mind = mind //Transfer their mind if they have one.
@@ -135,6 +137,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(corpse.ajourn) if(corpse.ajourn)
corpse.ajourn=0 corpse.ajourn=0
client.mob = corpse client.mob = corpse
remove_from_mob_list(src)
dead_mob_list -= src
del(src) del(src)
/mob/dead/observer/proc/dead_tele() /mob/dead/observer/proc/dead_tele()
@@ -227,4 +231,3 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/add_memory() /mob/dead/observer/add_memory()
set hidden = 1 set hidden = 1
src << "\red You are dead! You have no mind to store memory!" src << "\red You are dead! You have no mind to store memory!"

View File

@@ -16,6 +16,7 @@
// flick("gibbed-m", animation) // flick("gibbed-m", animation)
gibs(loc, viruses, dna) gibs(loc, viruses, dna)
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
if(src) del(src) if(src) del(src)
@@ -40,6 +41,7 @@
// flick("dust-m", animation) // flick("dust-m", animation)
new /obj/effect/decal/cleanable/ash(loc) new /obj/effect/decal/cleanable/ash(loc)
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
if(src) del(src) if(src) del(src)
@@ -49,16 +51,16 @@
timeofdeath = world.time timeofdeath = world.time
var/cancel = 0 var/cancel = 0
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client && (M.stat != DEAD)) if(M.stat != DEAD)
cancel = 1 cancel = 1
break break
if(!cancel) if(!cancel)
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>" world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
spawn(300) spawn(300)
for(var/mob/M in world) for(var/mob/M in player_list)
if(M.client && (M.stat != DEAD)) if(M.stat != DEAD)
world << "Aborting world restart!" world << "Aborting world restart!"
return return
@@ -73,4 +75,6 @@
world.Reboot() world.Reboot()
return return
living_mob_list -= src
dead_mob_list += src
return ..(gibbed) return ..(gibbed)

View File

@@ -215,14 +215,13 @@
var/mob/dead/observer/G_found var/mob/dead/observer/G_found
if(!input) if(!input)
var/list/ghosts = list() var/list/ghosts = list()
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client) ghosts += G
ghosts += G
if(ghosts.len) if(ghosts.len)
G_found = pick(ghosts) G_found = pick(ghosts)
else else
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client&&ckey(G.key)==ckey(input)) if(G.client&&ckey(G.key)==ckey(input))
G_found = G G_found = G
break break

View File

@@ -13,6 +13,7 @@
flick("gibbed-a", animation) flick("gibbed-a", animation)
xgibs(loc, viruses) xgibs(loc, viruses)
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
@@ -33,6 +34,7 @@
flick("dust-a", animation) flick("dust-a", animation)
new /obj/effect/decal/remains/xeno(loc) new /obj/effect/decal/remains/xeno(loc)
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)

View File

@@ -7,6 +7,7 @@
src.real_name = src.name src.real_name = src.name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid) verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
living_mob_list += src
//Drones use the same base as generic humanoids. //Drones use the same base as generic humanoids.
//Drone verbs //Drone verbs

View File

@@ -5,6 +5,7 @@
if(name == "alien hunter") if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])") name = text("alien hunter ([rand(1, 1000)])")
real_name = name real_name = name
living_mob_list += src
/mob/living/carbon/alien/humanoid/hunter /mob/living/carbon/alien/humanoid/hunter

View File

@@ -6,6 +6,7 @@
name = text("alien sentinel ([rand(1, 1000)])") name = text("alien sentinel ([rand(1, 1000)])")
real_name = name real_name = name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin) verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
living_mob_list += src
/mob/living/carbon/alien/humanoid/sentinel /mob/living/carbon/alien/humanoid/sentinel

View File

@@ -4,7 +4,7 @@
R.my_atom = src R.my_atom = src
//there should only be one queen //there should only be one queen
for(var/mob/living/carbon/alien/humanoid/queen/Q in world) for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
if(Q == src) continue if(Q == src) continue
if(Q.stat == DEAD) continue if(Q.stat == DEAD) continue
if(Q.client) if(Q.client)
@@ -14,7 +14,7 @@
real_name = src.name real_name = src.name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin) verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
verbs -= /mob/living/carbon/alien/verb/ventcrawl verbs -= /mob/living/carbon/alien/verb/ventcrawl
living_mob_list += src
/mob/living/carbon/alien/humanoid/queen /mob/living/carbon/alien/humanoid/queen

View File

@@ -10,5 +10,6 @@
tod = worldtime2text() //weasellos time of death patch tod = worldtime2text() //weasellos time of death patch
if(mind) mind.store_memory("Time of death: [tod]", 0) if(mind) mind.store_memory("Time of death: [tod]", 0)
living_mob_list -= src
return ..(gibbed) return ..(gibbed)

View File

@@ -38,7 +38,7 @@
var/message_a = say_quote(message) var/message_a = say_quote(message)
var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>" var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/living/S in world) for (var/mob/living/S in player_list)
if(!S.stat) if(!S.stat)
if(S.alien_talk_understand) if(S.alien_talk_understand)
if(S.alien_talk_understand == alien_talk_understand) if(S.alien_talk_understand == alien_talk_understand)
@@ -72,7 +72,7 @@
rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>" rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/M in world) for (var/mob/M in player_list)
if (istype(M, /mob/new_player)) if (istype(M, /mob/new_player))
continue continue
if (M.stat > 1) if (M.stat > 1)

View File

@@ -47,11 +47,9 @@
if (message) if (message)
log_emote("[name]/[key] : [message]") log_emote("[name]/[key] : [message]")
for(var/mob/M in world) for(var/mob/M in dead_mob_list)
if (!M.client) if (!M.client)
continue //skip monkeys and leavers continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
continue
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null))) if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
M.show_message(message) M.show_message(message)

View File

@@ -474,11 +474,9 @@
//Hearing gasp and such every five seconds is not good emotes were not global for a reason. //Hearing gasp and such every five seconds is not good emotes were not global for a reason.
// Maybe some people are okay with that. // Maybe some people are okay with that.
for(var/mob/M in world) for(var/mob/M in dead_mob_list)
if (!M.client) if (!M.client)
continue //skip monkeys and leavers continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
continue
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null))) if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
M.show_message(message) M.show_message(message)

View File

@@ -191,11 +191,10 @@
if(!client) if(!client)
var/foundghost = 0 var/foundghost = 0
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in player_list)
if(G.client) if(G.corpse == src)
if(G.corpse == src) foundghost++
foundghost++ break
break
if(!foundghost) if(!foundghost)
msg += " and [t_his] soul has departed" msg += " and [t_his] soul has departed"
msg += "...</span>\n" msg += "...</span>\n"

View File

@@ -161,8 +161,8 @@
else else
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>" rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
for (var/mob/M in world) for (var/mob/M in dead_mob_list)
if (istype(M, /mob/new_player)) if (!(M.client))
continue continue
if (M.stat > 1 && !(M in heard_a)) if (M.stat > 1 && !(M in heard_a))
M.show_message(rendered, 2) M.show_message(rendered, 2)

View File

@@ -263,6 +263,9 @@
heal_overall_damage(1000, 1000) heal_overall_damage(1000, 1000)
buckled = initial(src.buckled) buckled = initial(src.buckled)
handcuffed = initial(src.handcuffed) handcuffed = initial(src.handcuffed)
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS stat = CONSCIOUS
regenerate_icons() regenerate_icons()
..() ..()

View File

@@ -245,7 +245,7 @@ var/list/department_radio_keys = list(
if("changeling") if("changeling")
if(src.changeling) if(src.changeling)
for(var/mob/aChangeling in world) for(var/mob/aChangeling in mob_list)
if(aChangeling.changeling || istype(aChangeling, /mob/dead/observer)) if(aChangeling.changeling || istype(aChangeling, /mob/dead/observer))
aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>" aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>"
return return
@@ -263,7 +263,7 @@ var/list/department_radio_keys = list(
var/list/listening var/list/listening
listening = get_mobs_in_view(message_range, src) listening = get_mobs_in_view(message_range, src)
for(var/mob/M in world) for(var/mob/M in player_list)
if (!M.client) if (!M.client)
continue //skip monkeys and leavers continue //skip monkeys and leavers
if (istype(M, /mob/new_player)) if (istype(M, /mob/new_player))

View File

@@ -4,7 +4,7 @@
var/pickedName = null var/pickedName = null
while(!pickedName) while(!pickedName)
pickedName = pick(ai_names) pickedName = pick(ai_names)
for (var/mob/living/silicon/ai/A in world) for (var/mob/living/silicon/ai/A in mob_list)
if (A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop if (A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop
possibleNames -= pickedName possibleNames -= pickedName
pickedName = null pickedName = null
@@ -59,7 +59,7 @@
spawn(0) spawn(0)
ainame(src) ainame(src)
living_mob_list += src
return return

View File

@@ -25,7 +25,7 @@
break break
callshuttle++ callshuttle++
for(var/mob/living/silicon/ai/shuttlecaller in world) for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if(shuttlecaller.z == 2) if(shuttlecaller.z == 2)
continue continue
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))

View File

@@ -14,6 +14,7 @@
// flick("gibbed-r", animation) // flick("gibbed-r", animation)
robogibs(loc, viruses) robogibs(loc, viruses)
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
if(src) del(src) if(src) del(src)
@@ -34,6 +35,7 @@
// flick("dust-r", animation) // flick("dust-r", animation)
new /obj/effect/decal/remains/robot(loc) new /obj/effect/decal/remains/robot(loc)
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
if(src) del(src) if(src) del(src)

View File

@@ -13,5 +13,6 @@
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here. //New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
//Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak //Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak
if(mind) del(mind) if(mind) del(mind)
living_mob_list -= src
ghostize(0) ghostize(0)
del(src) del(src)

View File

@@ -151,7 +151,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
for(var/datum/paiCandidate/c in paiController.pai_candidates) for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.ready) if(c.ready)
var/found = 0 var/found = 0
for(var/mob/dead/observer/o in world) for(var/mob/dead/observer/o in player_list)
if(o.key == c.key) if(o.key == c.key)
found = 1 found = 1
if(found) if(found)
@@ -192,7 +192,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
user << browse(dat, "window=findPai") user << browse(dat, "window=findPai")
proc/requestRecruits() proc/requestRecruits()
for(var/mob/dead/observer/O in world) for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "pAI")) if(jobban_isbanned(O, "pAI"))
continue continue
if(asked.Find(O.key)) if(asked.Find(O.key))

View File

@@ -609,7 +609,7 @@
// Door Jack - supporting proc // Door Jack - supporting proc
/mob/living/silicon/pai/proc/hackloop() /mob/living/silicon/pai/proc/hackloop()
var/turf/T = get_turf_or_move(src.loc) var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/silicon/ai/AI in world) for(var/mob/living/silicon/ai/AI in player_list)
if(T.loc) if(T.loc)
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>" AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
else else

View File

@@ -14,6 +14,7 @@
flick("gibbed-r", animation) flick("gibbed-r", animation)
robogibs(loc, viruses) robogibs(loc, viruses)
living_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
if(src) del(src) if(src) del(src)
@@ -35,6 +36,7 @@
new /obj/effect/decal/remains/robot(loc) new /obj/effect/decal/remains/robot(loc)
if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out. if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out.
dead_mob_list -= src
spawn(15) spawn(15)
if(animation) del(animation) if(animation) del(animation)
if(src) del(src) if(src) del(src)

View File

@@ -65,12 +65,13 @@
//Improved /N //Improved /N
/mob/living/silicon/robot/Del() /mob/living/silicon/robot/Del()
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
living_mob_list += mmi
var/turf/T = get_turf(loc)//To hopefully prevent run time errors. var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T) if(T)
mmi.loc = T mmi.loc = T
if(!key) //if we don't have an associated key, try to find the ghost of this body if(!key) //if we don't have an associated key, try to find the ghost of this body
for(var/mob/dead/observer/ghost in world) for(var/mob/dead/observer/ghost in player_list)
if(ghost.corpse == src && ghost.client) if(ghost.corpse == src && ghost.client)
ghost.client.mob = ghost.corpse ghost.client.mob = ghost.corpse

Some files were not shown because too many files have changed in this diff Show More