mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
-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:
@@ -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 category = "Special Verbs"
|
||||
if(M.client)
|
||||
@@ -165,7 +165,7 @@
|
||||
if("number")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
|
||||
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")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
|
||||
if("turf-reference")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
spawn()
|
||||
if(!nosleep)
|
||||
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"))
|
||||
var/datum/data/record/G = new()
|
||||
var/datum/data/record/M = new()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(!holder) return
|
||||
if(holder == affected_mob)
|
||||
stage_act()
|
||||
|
||||
|
||||
if(affected_mob.stat == DEAD)
|
||||
if(prob(50))
|
||||
if(--longevity<=0)
|
||||
@@ -70,7 +70,7 @@
|
||||
if(prob(40))
|
||||
if(gibbed != 0) return 0
|
||||
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.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
|
||||
@@ -101,8 +101,8 @@ var/global/datum/tension/tension_master
|
||||
if(forcenexttick)
|
||||
forcenexttick = 0
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder)
|
||||
for (var/mob/M in admin_list)
|
||||
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>"
|
||||
|
||||
spawn(600)
|
||||
@@ -201,7 +201,7 @@ var/global/datum/tension/tension_master
|
||||
|
||||
proc/get_num_players()
|
||||
var/peeps = 0
|
||||
for (var/mob/M in world)
|
||||
for (var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue
|
||||
peeps += 1
|
||||
@@ -296,7 +296,7 @@ var/global/datum/tension/tension_master
|
||||
var/mob/living/silicon/malfAI = 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)
|
||||
AIs += ai
|
||||
|
||||
@@ -336,7 +336,7 @@ var/global/datum/tension/tension_master
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
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
|
||||
|
||||
@@ -373,7 +373,7 @@ var/global/datum/tension/tension_master
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
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
|
||||
|
||||
@@ -409,7 +409,7 @@ var/global/datum/tension/tension_master
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
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
|
||||
|
||||
@@ -440,7 +440,7 @@ var/global/datum/tension/tension_master
|
||||
var/mob/dead/observer/theghost = null
|
||||
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"))
|
||||
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"))
|
||||
@@ -482,7 +482,7 @@ var/global/datum/tension/tension_master
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
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
|
||||
|
||||
@@ -523,7 +523,7 @@ var/global/datum/tension/tension_master
|
||||
var/mob/dead/observer/theghost = null
|
||||
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"))
|
||||
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"))
|
||||
@@ -570,7 +570,7 @@ var/global/datum/tension/tension_master
|
||||
if(closet_spawn)
|
||||
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")
|
||||
new /obj/structure/closet/syndicate/personal(A.loc)
|
||||
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.
|
||||
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
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"))
|
||||
if("Yes")
|
||||
@@ -653,7 +653,7 @@ var/global/datum/tension/tension_master
|
||||
if(candidates.len)
|
||||
var/numagents = 6
|
||||
//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)
|
||||
break
|
||||
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.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")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
|
||||
// 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.
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
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"))
|
||||
if("Yes")
|
||||
@@ -727,7 +727,7 @@ var/global/datum/tension/tension_master
|
||||
var/numagents = 3
|
||||
|
||||
//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)
|
||||
break
|
||||
if (L.name == "Borg-Deathsquad")
|
||||
|
||||
@@ -287,10 +287,9 @@ datum/shuttle_controller
|
||||
settimeleft(SHUTTLETRANSITTIME)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.close()
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
// Some aesthetic turbulance shaking
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
@@ -307,10 +306,9 @@ datum/shuttle_controller
|
||||
start_location = locate(/area/shuttle/escape_pod1/station)
|
||||
end_location = locate(/area/shuttle/escape_pod1/transit)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.close()
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
@@ -326,10 +324,9 @@ datum/shuttle_controller
|
||||
start_location = locate(/area/shuttle/escape_pod2/station)
|
||||
end_location = locate(/area/shuttle/escape_pod2/transit)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.close()
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
@@ -345,10 +342,9 @@ datum/shuttle_controller
|
||||
start_location = locate(/area/shuttle/escape_pod3/station)
|
||||
end_location = locate(/area/shuttle/escape_pod3/transit)
|
||||
start_location.move_contents_to(end_location, null, NORTH)
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.close()
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
@@ -364,10 +360,9 @@ datum/shuttle_controller
|
||||
start_location = locate(/area/shuttle/escape_pod5/station)
|
||||
end_location = locate(/area/shuttle/escape_pod5/transit)
|
||||
start_location.move_contents_to(end_location, null, EAST)
|
||||
for(var/obj/machinery/door/D in world)
|
||||
if( get_area(D) == end_location )
|
||||
spawn(0)
|
||||
D.close()
|
||||
for(var/obj/machinery/door/D in end_location)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
for(var/mob/M in end_location)
|
||||
if(M.client)
|
||||
|
||||
@@ -131,4 +131,9 @@
|
||||
/obj/effect/landmark/costume/sexymime/New()
|
||||
new /obj/item/clothing/mask/gas/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
|
||||
@@ -173,11 +173,11 @@
|
||||
|
||||
|
||||
// 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(isInSight(source,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(isInSight(source,C))
|
||||
hear += C
|
||||
|
||||
122
code/defines/procs/global_lists.dm
Normal file
122
code/defines/procs/global_lists.dm
Normal 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,",")
|
||||
@@ -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
|
||||
M << "That name is reserved."
|
||||
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)
|
||||
M << "There's already an AI with that name."
|
||||
return
|
||||
@@ -843,7 +843,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(badname)
|
||||
M << "That name is reserved."
|
||||
return clname(M)
|
||||
for (var/mob/A in world)
|
||||
for (var/mob/A in player_list)
|
||||
if(A.real_name == newname)
|
||||
M << "That name is reserved."
|
||||
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/borgs = 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
|
||||
if (A.stat == 2)
|
||||
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/ais = 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
|
||||
if (A.stat == 2)
|
||||
continue
|
||||
@@ -934,34 +934,34 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
/proc/sortmobs()
|
||||
|
||||
var/list/mob_list = list()
|
||||
for(var/mob/living/silicon/ai/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/silicon/pai/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/silicon/robot/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/carbon/human/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/carbon/brain/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/carbon/alien/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/dead/observer/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/new_player/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/carbon/monkey/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/carbon/metroid/M in world)
|
||||
mob_list.Add(M)
|
||||
for(var/mob/living/simple_animal/M in world)
|
||||
mob_list.Add(M)
|
||||
var/list/moblist = list()
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/silicon/pai/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/silicon/robot/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/human/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/brain/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/alien/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/dead/observer/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/new_player/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/monkey/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/metroid/M in mob_list)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/simple_animal/M in mob_list)
|
||||
moblist.Add(M)
|
||||
// for(var/mob/living/silicon/hivebot/M in world)
|
||||
// mob_list.Add(M)
|
||||
// for(var/mob/living/silicon/hive_mainframe/M in world)
|
||||
// mob_list.Add(M)
|
||||
return mob_list
|
||||
return moblist
|
||||
|
||||
/proc/convert2energy(var/M)
|
||||
var/E = M*(SPEED_OF_LIGHT_SQ)
|
||||
|
||||
@@ -2,7 +2,7 @@ proc/sql_poll_players()
|
||||
if(!sqllogging)
|
||||
return
|
||||
var/playercount = 0
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
var/DBConnection/dbcon = new()
|
||||
@@ -22,8 +22,8 @@ proc/sql_poll_admins()
|
||||
if(!sqllogging)
|
||||
return
|
||||
var/admincount = 0
|
||||
for (var/mob/M in world)
|
||||
if(M && M.client && M.client.holder)
|
||||
for (var/mob/M in admin_list)
|
||||
if(M && M.client)
|
||||
admincount += 1
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
|
||||
@@ -46,14 +46,14 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
// This function counts a passed job.
|
||||
proc/countJob(rank)
|
||||
var/jobCount = 0
|
||||
for(var/mob/H in world)
|
||||
for(var/mob/H in player_list)
|
||||
if(H.mind && H.mind.assigned_role == rank)
|
||||
jobCount++
|
||||
return jobCount
|
||||
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
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))
|
||||
subject.attack_ai(M)
|
||||
|
||||
|
||||
@@ -53,14 +53,14 @@
|
||||
|
||||
/obj/machinery/camera/motion/proc/cancelAlarm()
|
||||
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)
|
||||
detectTime = 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/camera/motion/proc/triggerAlarm()
|
||||
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)
|
||||
detectTime = -1
|
||||
return 1
|
||||
@@ -82,5 +82,5 @@
|
||||
detectTime = world.time - 301
|
||||
triggerAlarm()
|
||||
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)
|
||||
|
||||
@@ -84,12 +84,12 @@
|
||||
var/list/cameras = list()
|
||||
for (var/obj/machinery/camera/C in src)
|
||||
cameras += C
|
||||
for (var/mob/living/silicon/aiPlayer in world)
|
||||
for (var/mob/living/silicon/aiPlayer in player_list)
|
||||
if (state == 1)
|
||||
aiPlayer.cancelAlarm("Power", src, source)
|
||||
else
|
||||
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)
|
||||
a.cancelAlarm("Power", src, source)
|
||||
else
|
||||
@@ -108,12 +108,12 @@
|
||||
//src.updateicon()
|
||||
for(var/obj/machinery/camera/C in RA)
|
||||
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)
|
||||
for(var/obj/machinery/computer/station_alert/a in world)
|
||||
a.triggerAlarm("Atmosphere", src, cameras, src)
|
||||
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)
|
||||
for(var/obj/machinery/computer/station_alert/a in world)
|
||||
a.cancelAlarm("Atmosphere", src, src)
|
||||
@@ -138,7 +138,7 @@
|
||||
var/list/cameras = list()
|
||||
for (var/obj/machinery/camera/C in src)
|
||||
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)
|
||||
for (var/obj/machinery/computer/station_alert/a in world)
|
||||
a.triggerAlarm("Fire", src, cameras, src)
|
||||
@@ -156,9 +156,9 @@
|
||||
else if(D.density)
|
||||
spawn(0)
|
||||
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)
|
||||
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)
|
||||
return
|
||||
|
||||
|
||||
@@ -705,7 +705,7 @@
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
@@ -94,7 +94,7 @@ var/list/blob_nodes = list()
|
||||
switch(stage)
|
||||
if (0)
|
||||
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)
|
||||
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."
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
var/numAlive = 0
|
||||
var/numSpace = 0
|
||||
var/numOffStation = 0
|
||||
for (var/mob/living/silicon/ai/aiPlayer in world)
|
||||
for(var/mob/M in world)
|
||||
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
|
||||
for(var/mob/living/carbon/human/M in mob_list)
|
||||
if ((M != aiPlayer && M.client))
|
||||
if (M.stat == 2)
|
||||
numDead += 1
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
intercepttext += "Nuclear Authentication Code: [nukecode] <BR>"
|
||||
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)
|
||||
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)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
proc/create_fragments(var/wave_size = 1)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client && G.client.be_alien)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client.be_alien)
|
||||
if(G.corpse)
|
||||
if(G.corpse.stat==2)
|
||||
candidates.Add(G)
|
||||
|
||||
@@ -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")
|
||||
|
||||
for(var/mob/living/carbon/aChangeling in world)
|
||||
for(var/mob/living/carbon/aChangeling in player_list)
|
||||
if(aChangeling.changeling)
|
||||
possibleIDs -= aChangeling.changeling.changelingID
|
||||
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
spawn(10)
|
||||
var/list/candidates = list()
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
candidates += G
|
||||
|
||||
for(var/mob/dead/observer/G in candidates)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
var/list/possible_targets = get_unconvertables()
|
||||
|
||||
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))
|
||||
possible_targets += player.mind
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
/datum/game_mode/cult/proc/get_unconvertables()
|
||||
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))
|
||||
ucs += player.mind
|
||||
return ucs
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
A.power_change()
|
||||
|
||||
/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
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
@@ -204,7 +204,7 @@
|
||||
// virus_type = /datum/disease/t_virus
|
||||
if("pierrot's 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
|
||||
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
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client)
|
||||
if(G.client.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
@@ -282,7 +282,7 @@
|
||||
|
||||
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))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if (prob(5))
|
||||
@@ -294,7 +294,7 @@
|
||||
else
|
||||
randmutg(H)
|
||||
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)
|
||||
sleep(100)
|
||||
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
|
||||
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)
|
||||
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")
|
||||
@@ -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/crew
|
||||
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
|
||||
crew = pick(pos_crew)
|
||||
switch(rand(1,14))
|
||||
|
||||
@@ -1064,7 +1064,7 @@ ________________________________________________________________________________
|
||||
U << "\blue Hacking \the [A]..."
|
||||
spawn(0)
|
||||
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>."
|
||||
if(A:files&&A:files.known_tech.len)
|
||||
for(var/datum/tech/current_data in S.stored_research)
|
||||
@@ -1239,7 +1239,7 @@ ________________________________________________________________________________
|
||||
voice = "[pick(wizard_first)] [pick(wizard_second)]"
|
||||
if(91 to 100)//Small chance of an existing crew name.
|
||||
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
|
||||
names.Add(M.real_name)
|
||||
voice = !names.len ? "Cuban Pete" : pick(names)
|
||||
|
||||
@@ -139,10 +139,9 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
|
||||
var/mob/dead/observer/G
|
||||
var/list/candidates = list()
|
||||
for(G in world)
|
||||
if(G.client)//Now everyone can ninja!
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
candidates.Add(G)
|
||||
for(G in player_list)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
candidates.Add(G)
|
||||
|
||||
//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 ))
|
||||
@@ -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.
|
||||
|
||||
//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))
|
||||
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//=======//
|
||||
|
||||
/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 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
|
||||
|
||||
var/mob/dead/observer/G
|
||||
for(var/mob/dead/observer/G_find in world)
|
||||
if(G_find.client&&ckey(G_find.key)==ckey(input))
|
||||
for(var/mob/dead/observer/G_find in player_list)
|
||||
if(ckey(G_find.key)==ckey(input))
|
||||
G = G_find
|
||||
break
|
||||
|
||||
|
||||
@@ -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.
|
||||
/datum/game_mode/proc/can_start()
|
||||
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))
|
||||
playerC++
|
||||
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)
|
||||
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
clients++
|
||||
if(ishuman(M))
|
||||
@@ -249,7 +249,7 @@ Whitespace:Seperator;
|
||||
|
||||
|
||||
// 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)
|
||||
players += player
|
||||
|
||||
@@ -331,7 +331,7 @@ Whitespace:Seperator;
|
||||
|
||||
/datum/game_mode/proc/num_players()
|
||||
. = 0
|
||||
for(var/mob/new_player/P in world)
|
||||
for(var/mob/new_player/P in player_list)
|
||||
if(P.client && P.ready)
|
||||
. ++
|
||||
|
||||
@@ -341,7 +341,7 @@ Whitespace:Seperator;
|
||||
///////////////////////////////////
|
||||
/datum/game_mode/proc/get_living_heads()
|
||||
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))
|
||||
heads += player.mind
|
||||
return heads
|
||||
@@ -352,7 +352,7 @@ Whitespace:Seperator;
|
||||
////////////////////////////
|
||||
/datum/game_mode/proc/get_all_heads()
|
||||
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))
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
@@ -75,7 +75,6 @@ var/global/datum/controller/gameticker/ticker
|
||||
src.mode = new mtype
|
||||
else
|
||||
src.mode = config.pick_mode(master_mode)
|
||||
|
||||
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."
|
||||
del(mode)
|
||||
@@ -160,12 +159,12 @@ var/global/datum/controller/gameticker/ticker
|
||||
var/obj/structure/stool/bed/temp_buckle = new(src)
|
||||
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
|
||||
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
|
||||
if(M.client)
|
||||
M.client.screen += cinematic //show every client the cinematic
|
||||
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
|
||||
if(M.client)
|
||||
M.client.screen += cinematic
|
||||
@@ -243,7 +242,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
|
||||
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.mind && player.mind.assigned_role=="AI")
|
||||
player.close_spawn_windows()
|
||||
@@ -254,14 +253,14 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
|
||||
proc/collect_minds()
|
||||
for(var/mob/living/player in world)
|
||||
for(var/mob/living/player in player_list)
|
||||
if(player.mind)
|
||||
ticker.minds += player.mind
|
||||
|
||||
|
||||
proc/equip_characters()
|
||||
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.mind.assigned_role == "Captain")
|
||||
captainless=0
|
||||
@@ -315,7 +314,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
/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)
|
||||
world << "<b>[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the game were:</b>"
|
||||
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]), "]"
|
||||
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.stat != 2)
|
||||
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
|
||||
var/list/total_antagonists = list()
|
||||
//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...
|
||||
var/temprole = M.mind.special_role
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
/datum/intercept_text/proc/pick_mob()
|
||||
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.assigned_role=="MODE") continue
|
||||
dudes += man
|
||||
|
||||
@@ -36,7 +36,7 @@ rcd light flash thingy on matter drain
|
||||
/client/proc/fireproof_core()
|
||||
set category = "Malfunction"
|
||||
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
|
||||
usr.verbs -= /client/proc/fireproof_core
|
||||
usr << "\red Core fireproofed."
|
||||
@@ -49,7 +49,7 @@ rcd light flash thingy on matter drain
|
||||
set category = "Malfunction"
|
||||
set name = "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.shot_delay = 20
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
/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")
|
||||
malf_ai+=player.mind
|
||||
if(malf_ai.len)
|
||||
@@ -178,9 +178,8 @@
|
||||
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
|
||||
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
|
||||
ticker.mode:explosion_in_progress = 1
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
M << 'Alarm.ogg'
|
||||
for(var/mob/M in player_list)
|
||||
M << 'Alarm.ogg'
|
||||
world << "Self-destructing in 10"
|
||||
for (var/i=9 to 1 step -1)
|
||||
sleep(10)
|
||||
|
||||
@@ -41,16 +41,15 @@
|
||||
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 )
|
||||
|
||||
for(var/mob/living/player in world)
|
||||
if (player.client)
|
||||
if (player.stat != 2)
|
||||
var/turf/location = get_turf(player.loc)
|
||||
if (location in escape_zone)
|
||||
survivors[player.real_name] = "shuttle"
|
||||
else if (location.loc.type in pod_zone)
|
||||
survivors[player.real_name] = "pod"
|
||||
else
|
||||
survivors[player.real_name] = "alive"
|
||||
for(var/mob/living/player in player_list)
|
||||
if (player.stat != 2)
|
||||
var/turf/location = get_turf(player.loc)
|
||||
if (location in escape_zone)
|
||||
survivors[player.real_name] = "shuttle"
|
||||
else if (location.loc.type in pod_zone)
|
||||
survivors[player.real_name] = "pod"
|
||||
else
|
||||
survivors[player.real_name] = "alive"
|
||||
|
||||
feedback_set_details("round_end_result","end - evacuation")
|
||||
feedback_set("round_end_result",survivors.len)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "")
|
||||
if(!DNAstring)
|
||||
return
|
||||
for(var/mob/living/carbon/M in world)
|
||||
for(var/mob/living/carbon/M in mob_list)
|
||||
if(!M.dna)
|
||||
continue
|
||||
if(M.dna.unique_enzymes == DNAstring)
|
||||
|
||||
@@ -171,7 +171,7 @@ datum/objective/hijack
|
||||
return 0
|
||||
var/area/shuttle = locate(/area/shuttle/escape/centcom)
|
||||
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.mind && (player.mind != owner))
|
||||
if (!player.stat) //they're not dead or in crit
|
||||
@@ -194,7 +194,7 @@ datum/objective/block
|
||||
return 0
|
||||
var/area/shuttle = locate(/area/shuttle/escape/centcom)
|
||||
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.mind)
|
||||
if (player.stat != 2)
|
||||
@@ -215,7 +215,7 @@ datum/objective/silence
|
||||
var/area/pod3 = locate(/area/shuttle/escape_pod3/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)
|
||||
continue
|
||||
if (player.mind)
|
||||
@@ -457,11 +457,11 @@ datum/objective/absorb
|
||||
if (ticker)
|
||||
var/n_p = 1 //autowin
|
||||
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)
|
||||
n_p ++
|
||||
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)
|
||||
n_p ++
|
||||
target_amount = min(target_amount, n_p)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/list/datum/mind/possible_headrevs = get_players_for_role(BE_REV)
|
||||
|
||||
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)
|
||||
head_check = 1
|
||||
break
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
world << "<B>Build your own station with the sandbox-panel command!</B>"
|
||||
|
||||
/datum/game_mode/sandbox/pre_setup()
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
M.CanBuild()
|
||||
for(var/mob/M in player_list)
|
||||
M.CanBuild()
|
||||
return 1
|
||||
|
||||
/datum/game_mode/sandbox/check_finished()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
set desc = "Summon Guns"
|
||||
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(is_special_character(H)) continue
|
||||
if(prob(25))
|
||||
|
||||
@@ -104,7 +104,7 @@ var/global/datum/controller/occupations/job_master
|
||||
break
|
||||
|
||||
proc/ResetOccupations()
|
||||
for(var/mob/new_player/player in world)
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if((player) && (player.mind))
|
||||
player.mind.assigned_role = null
|
||||
player.mind.special_role = null
|
||||
@@ -172,7 +172,7 @@ var/global/datum/controller/occupations/job_master
|
||||
A.spawn_positions = 3
|
||||
|
||||
//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))
|
||||
unassigned += player
|
||||
|
||||
@@ -415,7 +415,7 @@ var/global/datum/controller/occupations/job_master
|
||||
var/level3 = 0 //low
|
||||
var/level4 = 0 //never
|
||||
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)))
|
||||
continue //This player is not ready
|
||||
if(jobban_isbanned(player, job.title))
|
||||
|
||||
@@ -55,7 +55,7 @@ var/global/list/obj/machinery/camera/Cameras = list()
|
||||
var/list/namecounts = list()
|
||||
var/list/humans = 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.
|
||||
var/human = 0
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
@@ -242,11 +242,11 @@ var/global/list/obj/machinery/camera/Cameras = list()
|
||||
spawn(900)
|
||||
network = initial(network)
|
||||
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)
|
||||
O.cancel_camera()
|
||||
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))
|
||||
var/obj/machinery/computer/security/S = O.machine
|
||||
if (S.current == src)
|
||||
@@ -307,12 +307,12 @@ var/global/list/obj/machinery/camera/Cameras = list()
|
||||
itemname = P.name
|
||||
info = P.notehtml
|
||||
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(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 ..."
|
||||
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))
|
||||
var/obj/machinery/computer/security/S = O.machine
|
||||
if (S.current == src)
|
||||
@@ -388,11 +388,11 @@ var/global/list/obj/machinery/camera/Cameras = list()
|
||||
// now disconnect anyone using the camera
|
||||
//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?
|
||||
for(var/mob/living/silicon/ai/O in world)
|
||||
for(var/mob/living/silicon/ai/O in player_list)
|
||||
if (O.current == src)
|
||||
O.cancel_camera()
|
||||
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))
|
||||
var/obj/machinery/computer/security/S = O.machine
|
||||
if (S.current == src)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return
|
||||
|
||||
var/mob/selected = null
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
//Dead people only thanks!
|
||||
if ((M.stat != 2) || (!M.client))
|
||||
continue
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
|
||||
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))
|
||||
return ..()
|
||||
|
||||
@@ -541,7 +541,7 @@
|
||||
if((istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) && commboard != src)
|
||||
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))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
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>"
|
||||
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 (R.connected_ai != user)
|
||||
continue
|
||||
@@ -224,7 +224,7 @@
|
||||
sleep(10)
|
||||
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)
|
||||
R.self_destruct()
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Possible to do for anyone motivated enough:
|
||||
last_request = world.time
|
||||
user << "<span class='notice'>You request an AI's presence.</span>"
|
||||
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
|
||||
AI << "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=\ref[src]'>\the [area]</a>.</span>"
|
||||
else
|
||||
|
||||
@@ -98,9 +98,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
..()
|
||||
var/image/blood = image(loc = src)
|
||||
blood.override = 1
|
||||
for(var/mob/living/silicon/ai/AI in world)
|
||||
if(AI.client)
|
||||
AI.client.images += blood
|
||||
for(var/mob/living/silicon/ai/AI in player_list)
|
||||
AI.client.images += blood
|
||||
|
||||
examine()
|
||||
set src in view(2)
|
||||
|
||||
@@ -224,4 +224,40 @@ datum/controller/game_controller
|
||||
process()
|
||||
|
||||
|
||||
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>"
|
||||
@@ -766,7 +766,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
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.
|
||||
if(ai.aiPDA != P && ai.aiPDA != src)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
|
||||
/obj/effect/manifest/proc/manifest()
|
||||
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())
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
|
||||
P.info = dat
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
if (M.brainmob && M.brainmob.mind)
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
else
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.corpse == M.brainmob && G.client && G.corpse.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.corpse == M.brainmob && G.corpse.mind)
|
||||
G.corpse.mind.transfer_to(O)
|
||||
del(G)
|
||||
break
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
|
||||
if(!R.key)
|
||||
for(var/mob/dead/observer/ghost in world)
|
||||
if(ghost.corpse == R && ghost.client)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(ghost.corpse == R)
|
||||
ghost.client.mob = ghost.corpse
|
||||
|
||||
if(R.health < 0)
|
||||
|
||||
@@ -46,7 +46,7 @@ AI MODULES
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
comp.current << "These are your laws now:"
|
||||
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))
|
||||
R << "Your AI has set your 'laws waiting' flag."
|
||||
usr << "Upload complete. The AI's laws have been modified."
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
features += "AI allowed"
|
||||
|
||||
var/n = 0
|
||||
for (var/mob/M in world)
|
||||
for (var/mob/M in player_list)
|
||||
if (M.client)
|
||||
n++
|
||||
|
||||
|
||||
@@ -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.
|
||||
//Check for mobs
|
||||
for(var/mob/living/M in world)
|
||||
for(var/mob/living/M in mob_list)
|
||||
var/area/A = get_area(M)
|
||||
if(!A || !A.type) continue
|
||||
if(A.type == /area/supply/station)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
else if(T == "players")
|
||||
var/n = 0
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
n++
|
||||
return n
|
||||
@@ -27,7 +27,7 @@
|
||||
var/n = 0
|
||||
var/admins = 0
|
||||
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
|
||||
if(M.client)
|
||||
if(M.client.holder)
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
if(M.client)
|
||||
M << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
proc/get_all_clients()
|
||||
var/list/client/clients = list()
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue
|
||||
for (var/mob/M in player_list)
|
||||
|
||||
clients += M.client
|
||||
|
||||
@@ -12,12 +10,7 @@ proc/get_all_clients()
|
||||
proc/get_all_admin_clients()
|
||||
var/list/client/clients = list()
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue
|
||||
|
||||
if (!M.client.holder)
|
||||
continue
|
||||
for (var/mob/M in admin_list)
|
||||
|
||||
clients += M.client
|
||||
|
||||
@@ -32,14 +25,11 @@ proc/get_all_admin_clients()
|
||||
|
||||
var/list/peeps = list()
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue
|
||||
|
||||
if (M.client.stealth && !usr.client.holder)
|
||||
peeps += "\t[M.client.fakekey]"
|
||||
for (var/client/C in client_list)
|
||||
if (C.stealth && !usr.client.holder)
|
||||
peeps += "\t[C.fakekey]"
|
||||
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)
|
||||
|
||||
@@ -54,9 +44,9 @@ proc/get_all_admin_clients()
|
||||
|
||||
usr << "<b>Current Admins:</b>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
if(M && M.client && M.client.holder)
|
||||
if(usr.client.holder)
|
||||
for (var/mob/M in admin_list)
|
||||
if(M && M.client)
|
||||
if(usr.client)
|
||||
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.
|
||||
afk = 1
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/datum/vote/proc/getvotes()
|
||||
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
|
||||
L[M.client.vote] += 1
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
voting = 0
|
||||
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)
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
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( config.vote_no_default || (config.vote_no_dead && CM.stat == 2) )
|
||||
CM.client.vote = "none"
|
||||
|
||||
@@ -11,10 +11,6 @@ var/global/list/processing_objects = list()
|
||||
var/global/list/active_diseases = list()
|
||||
//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/list/global_map = null
|
||||
|
||||
@@ -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_ip = src.owner:address
|
||||
|
||||
var/list/client/clients = get_all_clients()
|
||||
// var/list/client/clients = get_all_clients()
|
||||
var/who
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in client_list)
|
||||
if(!who)
|
||||
who = "[C]"
|
||||
else
|
||||
|
||||
@@ -6,8 +6,8 @@ var/global/BSACooldown = 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>"
|
||||
log_adminwarn(rendered)
|
||||
for (var/mob/M in world)
|
||||
if (M && M.client && M.client.holder)
|
||||
for (var/mob/M in admin_list)
|
||||
if (M)
|
||||
var/msg = rendered
|
||||
if (admin_ref)
|
||||
msg = dd_replaceText(msg, "%admin_ref%", "\ref[M]")
|
||||
@@ -1630,14 +1630,14 @@ var/global/BSACooldown = 0
|
||||
if("monkey")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
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)
|
||||
H.monkeyize()
|
||||
ok = 1
|
||||
if("corgi")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
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)
|
||||
H.corgize()
|
||||
ok = 1
|
||||
@@ -1688,7 +1688,7 @@ var/global/BSACooldown = 0
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","PW")
|
||||
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/security = 0
|
||||
if(loc.z > 1 || prisonwarped.Find(H))
|
||||
@@ -1731,7 +1731,7 @@ var/global/BSACooldown = 0
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
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(is_special_character(H)) continue
|
||||
//traitorize(H, objective, 0)
|
||||
@@ -1744,7 +1744,7 @@ var/global/BSACooldown = 0
|
||||
ticker.mode.greet_traitor(H)
|
||||
//ticker.mode.forge_traitor_objectives(H.mind)
|
||||
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
|
||||
A.mind.special_role = "traitor"
|
||||
var/datum/objective/new_objective = new
|
||||
@@ -1825,8 +1825,8 @@ var/global/BSACooldown = 0
|
||||
feedback_add_details("admin_secrets_fun_used","FL")
|
||||
while(!usr.stat)
|
||||
//knock yourself out to stop the ghosts
|
||||
for(var/mob/M in world)
|
||||
if(M.client && M.stat != 2 && prob(25))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat != 2 && prob(25))
|
||||
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")
|
||||
AffectedArea.power_light = 0
|
||||
@@ -1848,8 +1848,8 @@ var/global/BSACooldown = 0
|
||||
if(prob(25) && !W.anchored)
|
||||
step_rand(W)
|
||||
sleep(rand(100,1000))
|
||||
for(var/mob/M in world)
|
||||
if(M.client && M.stat != 2)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat != 2)
|
||||
M.show_message(text("\blue The chilling wind suddenly stops..."), 1)
|
||||
/* if("shockwave")
|
||||
ok = 1
|
||||
@@ -1998,9 +1998,8 @@ var/global/BSACooldown = 0
|
||||
if (src.rank in list("Badmin", "Game Admin", "Game Master"))
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","RET")
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.client)
|
||||
H << "\red <B>You suddenly feel stupid.</B>"
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
H << "\red <B>You suddenly feel stupid.</B>"
|
||||
H.setBrainLoss(60)
|
||||
message_admins("[key_name_admin(usr)] made everybody retarded")
|
||||
else
|
||||
@@ -2037,7 +2036,7 @@ var/global/BSACooldown = 0
|
||||
if (src.rank in list("Badmin","Game Admin", "Game Master"))
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
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.update_hair()
|
||||
message_admins("[key_name_admin(usr)] activated dorf mode")
|
||||
@@ -2102,7 +2101,7 @@ var/global/BSACooldown = 0
|
||||
if("check_antagonist")
|
||||
check_antagonists()
|
||||
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:"
|
||||
if (ai.laws == null)
|
||||
usr << "[key_name(ai, usr)]'s Laws are null??"
|
||||
@@ -2117,7 +2116,7 @@ var/global/BSACooldown = 0
|
||||
if("manifest")
|
||||
var/dat = "<B>Showing Crew Manifest.</B><HR>"
|
||||
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)
|
||||
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
|
||||
dat += "</table>"
|
||||
@@ -2125,7 +2124,7 @@ var/global/BSACooldown = 0
|
||||
if("DNA")
|
||||
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>"
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(H.dna && H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.b_type]</td></tr>"
|
||||
dat += "</table>"
|
||||
@@ -2133,7 +2132,7 @@ var/global/BSACooldown = 0
|
||||
if("fingerprints")
|
||||
var/dat = "<B>Showing Fingerprints.</B><HR>"
|
||||
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.dna && H.dna.uni_identity)
|
||||
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
|
||||
@@ -2181,7 +2180,7 @@ var/global/BSACooldown = 0
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////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 name = "Show Player Panel"
|
||||
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)]")
|
||||
|
||||
for(var/mob/CM in world)
|
||||
if(CM.client)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
for(var/mob/CM in player_list)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
|
||||
for(var/mob/CM in world)
|
||||
if(CM.client)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
CM.client.vote = "default"
|
||||
for(var/mob/CM in player_list)
|
||||
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2))
|
||||
CM.client.vote = "none"
|
||||
else
|
||||
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!
|
||||
|
||||
/obj/admins/proc/votekill()
|
||||
@@ -2588,11 +2585,10 @@ var/global/BSACooldown = 0
|
||||
vote.voting = 0
|
||||
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
|
||||
if(M.client)
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
M << browse(null, "window=vote")
|
||||
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!
|
||||
|
||||
/obj/admins/proc/voteres()
|
||||
@@ -2841,7 +2837,7 @@ var/global/BSACooldown = 0
|
||||
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!
|
||||
|
||||
/obj/admins/proc/unprison(var/mob/M in world)
|
||||
/obj/admins/proc/unprison(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Unprison"
|
||||
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!
|
||||
|
||||
|
||||
/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 desc = "Edit mobs's memory and role"
|
||||
set name = "Show Traitor Panel"
|
||||
|
||||
@@ -473,14 +473,13 @@
|
||||
/client/proc/get_admin_state()
|
||||
set name = "Get Admin State"
|
||||
set category = "Debug"
|
||||
for(var/mob/M in world)
|
||||
if(M.client && M.client.holder)
|
||||
if(M.client.holder.state == 1)
|
||||
src << "[M.key] is playing - [M.client.holder.state]"
|
||||
else if(M.client.holder.state == 2)
|
||||
src << "[M.key] is observing - [M.client.holder.state]"
|
||||
else
|
||||
src << "[M.key] is undefined - [M.client.holder.state]"
|
||||
for(var/mob/M in admin_list)
|
||||
if(M.client.holder.state == 1)
|
||||
src << "[M.key] is playing - [M.client.holder.state]"
|
||||
else if(M.client.holder.state == 2)
|
||||
src << "[M.key] is observing - [M.client.holder.state]"
|
||||
else
|
||||
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!
|
||||
|
||||
|
||||
@@ -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!
|
||||
|
||||
#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 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
|
||||
@@ -631,7 +630,7 @@
|
||||
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!
|
||||
|
||||
/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 name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
|
||||
@@ -33,7 +33,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
|
||||
var/list/mob/mobs = list()
|
||||
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
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).
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
alert("Admin jumping disabled")
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(var/mob/M in world)
|
||||
/client/proc/jumptomob(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
|
||||
if(!selection)
|
||||
@@ -95,7 +95,7 @@
|
||||
else
|
||||
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 name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
|
||||
if(!selection)
|
||||
@@ -138,7 +138,7 @@
|
||||
else
|
||||
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 name = "Send Mob"
|
||||
if(!src.holder)
|
||||
|
||||
@@ -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
|
||||
/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 name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
return
|
||||
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)
|
||||
if (M.client && M.client.holder)
|
||||
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>"
|
||||
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>"
|
||||
for (var/mob/M in admin_list)
|
||||
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>"
|
||||
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>"
|
||||
|
||||
|
||||
@@ -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>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
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 name = "Make Robot"
|
||||
|
||||
@@ -172,13 +172,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/makepAI(var/turf/T in world)
|
||||
/client/proc/makepAI(var/turf/T in mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make pAI"
|
||||
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
||||
|
||||
var/list/available = list()
|
||||
for(var/mob/C in world)
|
||||
for(var/mob/C in mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
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)
|
||||
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 name = "Make Alien"
|
||||
|
||||
@@ -216,7 +216,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
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 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)
|
||||
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 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.")
|
||||
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 name = "Assume direct control"
|
||||
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!
|
||||
|
||||
|
||||
/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 name = "Select equipment"
|
||||
if(!ishuman(M))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
usr << alert("Master_controller not found.")
|
||||
|
||||
var/mobs = 0
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
mobs++
|
||||
|
||||
var/output = {"<B>GENERAL SYSTEMS REPORT</B><HR>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
O.vars[variable] = initial(O.vars[variable])
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
if(variable=="luminosity")
|
||||
M.sd_SetLuminosity(new_value)
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
M.sd_SetLuminosity(new_value)
|
||||
@@ -274,7 +274,7 @@
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
|
||||
@@ -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
|
||||
if(var_new == null) return
|
||||
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
|
||||
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
|
||||
if(var_new==null) return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
return
|
||||
|
||||
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(is_special_character(H)) continue
|
||||
|
||||
|
||||
@@ -14,19 +14,17 @@
|
||||
if(src.holder.rank == "Game Master" || src.holder.rank == "Game Admin" || src.holder.rank == "Badmin")
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
else
|
||||
if(usr.client.canplaysound)
|
||||
usr.client.canplaysound = 0
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
else
|
||||
usr << "You already used up your jukebox monies this round!"
|
||||
del(uploaded_sound)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
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!
|
||||
|
||||
/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 category = "Debug"
|
||||
set name = "Give Possessing Verbs"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
var/icon/cross = icon('icons/obj/storage.dmi',"bible")
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder && M.client.seeprayers)
|
||||
for (var/mob/M in admin_list)
|
||||
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]"
|
||||
|
||||
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
|
||||
|
||||
for (var/mob/M in world)
|
||||
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]"
|
||||
for (var/mob/M in admin_list)
|
||||
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)
|
||||
|
||||
@@ -41,7 +40,6 @@
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/mob/M in world)
|
||||
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]"
|
||||
for (var/mob/M in admin_list)
|
||||
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]"
|
||||
//
|
||||
|
||||
@@ -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 name = "Drop Everything"
|
||||
if(!holder)
|
||||
@@ -16,7 +16,7 @@
|
||||
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!
|
||||
|
||||
/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 name = "Prison"
|
||||
if(!holder)
|
||||
@@ -43,7 +43,7 @@
|
||||
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!
|
||||
|
||||
/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 name = "Subtle Message"
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
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!
|
||||
|
||||
/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 name = "Godmode"
|
||||
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.
|
||||
candidates_list += G.client
|
||||
else//Else we need to find them.
|
||||
for(G in world)
|
||||
if(G.client)
|
||||
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5)
|
||||
candidates_list += G.client//We want their client, not their ghost.
|
||||
for(G in player_list)
|
||||
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5)
|
||||
candidates_list += G.client//We want their client, not their ghost.
|
||||
if(candidates_list.len)//If there are people to spawn.
|
||||
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.
|
||||
@@ -290,7 +289,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
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))
|
||||
G_found = G
|
||||
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
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in world)
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
if (M.stat == 2)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
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."
|
||||
else
|
||||
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
|
||||
|
||||
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')
|
||||
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 name = "Rejuvenate"
|
||||
if(!holder)
|
||||
@@ -662,7 +661,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
else
|
||||
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 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.
|
||||
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 name = "Check Contents"
|
||||
|
||||
@@ -868,7 +867,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
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 name = "Attack Log"
|
||||
|
||||
|
||||
@@ -54,11 +54,10 @@ var/global/sent_strike_team = 0
|
||||
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/commandos_list[] = list()//actual commando ghosts as picked by the user.
|
||||
for(G in world)
|
||||
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.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.
|
||||
for(G in admin_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.
|
||||
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.
|
||||
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.
|
||||
|
||||
@@ -54,11 +54,10 @@ var/global/sent_syndicate_strike_team = 0
|
||||
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/syndicate_commandos_list[] = list()//actual commando ghosts as picked by the user.
|
||||
for(G in world)
|
||||
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.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.
|
||||
for(G in admin_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.
|
||||
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.
|
||||
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.
|
||||
|
||||
@@ -90,12 +90,11 @@
|
||||
if( connection != "seeker" )
|
||||
del(src)
|
||||
return
|
||||
|
||||
client_list |= src
|
||||
if ( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
world.update_status()
|
||||
|
||||
client_list[ckey] = src
|
||||
|
||||
..() //calls mob.Login()
|
||||
|
||||
@@ -104,6 +103,7 @@
|
||||
holder = new /obj/admins(src)
|
||||
holder.rank = admins[ckey]
|
||||
update_admins(admins[ckey])
|
||||
make_admin_list()
|
||||
admin_memo_show()
|
||||
|
||||
|
||||
@@ -116,4 +116,5 @@
|
||||
spawn(0)
|
||||
if(holder)
|
||||
del(holder)
|
||||
client_list -= src
|
||||
return ..()
|
||||
|
||||
@@ -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/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
|
||||
// possible_clones += H
|
||||
clone = H
|
||||
|
||||
@@ -270,9 +270,9 @@
|
||||
..()
|
||||
if(istype(AM,/mob/living/carbon/human))
|
||||
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)
|
||||
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)
|
||||
return
|
||||
else if(istype(AM,/mob/living/silicon/robot))
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
stat = DEAD
|
||||
|
||||
dead_mob_list += src
|
||||
add_to_mob_list(src)
|
||||
if(body)
|
||||
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
|
||||
@@ -38,7 +40,7 @@ Works together with spawning an observer, noted above.
|
||||
ghost.key = key
|
||||
|
||||
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(mind)
|
||||
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)
|
||||
corpse.ajourn=0
|
||||
client.mob = corpse
|
||||
remove_from_mob_list(src)
|
||||
dead_mob_list -= src
|
||||
del(src)
|
||||
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
@@ -226,5 +230,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/add_memory()
|
||||
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!"
|
||||
@@ -16,6 +16,7 @@
|
||||
// flick("gibbed-m", animation)
|
||||
gibs(loc, viruses, dna)
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -40,6 +41,7 @@
|
||||
// flick("dust-m", animation)
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -49,16 +51,16 @@
|
||||
timeofdeath = world.time
|
||||
|
||||
var/cancel = 0
|
||||
for(var/mob/M in world)
|
||||
if(M.client && (M.stat != DEAD))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat != DEAD)
|
||||
cancel = 1
|
||||
break
|
||||
if(!cancel)
|
||||
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
|
||||
|
||||
spawn(300)
|
||||
for(var/mob/M in world)
|
||||
if(M.client && (M.stat != DEAD))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat != DEAD)
|
||||
world << "Aborting world restart!"
|
||||
return
|
||||
|
||||
@@ -73,4 +75,6 @@
|
||||
world.Reboot()
|
||||
return
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -215,14 +215,13 @@
|
||||
var/mob/dead/observer/G_found
|
||||
if(!input)
|
||||
var/list/ghosts = list()
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
ghosts += G
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
ghosts += G
|
||||
if(ghosts.len)
|
||||
G_found = pick(ghosts)
|
||||
|
||||
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))
|
||||
G_found = G
|
||||
break
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
flick("gibbed-a", animation)
|
||||
xgibs(loc, viruses)
|
||||
dead_mob_list -= src
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
@@ -33,6 +34,7 @@
|
||||
|
||||
flick("dust-a", animation)
|
||||
new /obj/effect/decal/remains/xeno(loc)
|
||||
dead_mob_list -= src
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
src.real_name = src.name
|
||||
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
|
||||
living_mob_list += src
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
living_mob_list += src
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name = text("alien sentinel ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
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
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
R.my_atom = src
|
||||
|
||||
//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.stat == DEAD) continue
|
||||
if(Q.client)
|
||||
@@ -14,7 +14,7 @@
|
||||
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 -= /mob/living/carbon/alien/verb/ventcrawl
|
||||
|
||||
living_mob_list += src
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
living_mob_list -= src
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
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>"
|
||||
for (var/mob/living/S in world)
|
||||
for (var/mob/living/S in player_list)
|
||||
if(!S.stat)
|
||||
if(S.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>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat > 1)
|
||||
|
||||
@@ -47,11 +47,9 @@
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if (!M.client)
|
||||
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)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
@@ -474,11 +474,9 @@
|
||||
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if (!M.client)
|
||||
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)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
@@ -191,11 +191,10 @@
|
||||
|
||||
if(!client)
|
||||
var/foundghost = 0
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
if(G.corpse == src)
|
||||
foundghost++
|
||||
break
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.corpse == src)
|
||||
foundghost++
|
||||
break
|
||||
if(!foundghost)
|
||||
msg += " and [t_his] soul has departed"
|
||||
msg += "...</span>\n"
|
||||
|
||||
@@ -161,8 +161,8 @@
|
||||
else
|
||||
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)
|
||||
if (istype(M, /mob/new_player))
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if (!(M.client))
|
||||
continue
|
||||
if (M.stat > 1 && !(M in heard_a))
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
@@ -263,6 +263,9 @@
|
||||
heal_overall_damage(1000, 1000)
|
||||
buckled = initial(src.buckled)
|
||||
handcuffed = initial(src.handcuffed)
|
||||
if(stat == 2)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
regenerate_icons()
|
||||
..()
|
||||
|
||||
@@ -245,7 +245,7 @@ var/list/department_radio_keys = list(
|
||||
|
||||
if("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))
|
||||
aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>"
|
||||
return
|
||||
@@ -263,7 +263,7 @@ var/list/department_radio_keys = list(
|
||||
var/list/listening
|
||||
|
||||
listening = get_mobs_in_view(message_range, src)
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/pickedName = null
|
||||
while(!pickedName)
|
||||
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
|
||||
possibleNames -= pickedName
|
||||
pickedName = null
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
spawn(0)
|
||||
ainame(src)
|
||||
|
||||
living_mob_list += src
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in world)
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in player_list)
|
||||
if(shuttlecaller.z == 2)
|
||||
continue
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// flick("gibbed-r", animation)
|
||||
robogibs(loc, viruses)
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -34,6 +35,7 @@
|
||||
// flick("dust-r", animation)
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
|
||||
@@ -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.
|
||||
//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)
|
||||
living_mob_list -= src
|
||||
ghostize(0)
|
||||
del(src)
|
||||
@@ -151,7 +151,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
for(var/datum/paiCandidate/c in paiController.pai_candidates)
|
||||
if(c.ready)
|
||||
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)
|
||||
found = 1
|
||||
if(found)
|
||||
@@ -192,7 +192,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
user << browse(dat, "window=findPai")
|
||||
|
||||
proc/requestRecruits()
|
||||
for(var/mob/dead/observer/O in world)
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(jobban_isbanned(O, "pAI"))
|
||||
continue
|
||||
if(asked.Find(O.key))
|
||||
|
||||
@@ -609,7 +609,7 @@
|
||||
// Door Jack - supporting proc
|
||||
/mob/living/silicon/pai/proc/hackloop()
|
||||
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)
|
||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
|
||||
else
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
flick("gibbed-r", animation)
|
||||
robogibs(loc, viruses)
|
||||
|
||||
living_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -35,6 +36,7 @@
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out.
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user