mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-27 02:22:26 +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:
@@ -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)
|
||||
|
||||
@@ -65,12 +65,13 @@
|
||||
//Improved /N
|
||||
/mob/living/silicon/robot/Del()
|
||||
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
living_mob_list += mmi
|
||||
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
|
||||
if(T)
|
||||
mmi.loc = T
|
||||
|
||||
if(!key) //if we don't have an associated key, try to find the ghost of this body
|
||||
for(var/mob/dead/observer/ghost in world)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(ghost.corpse == src && ghost.client)
|
||||
ghost.client.mob = ghost.corpse
|
||||
|
||||
|
||||
@@ -83,22 +83,21 @@
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
|
||||
for (var/mob/living/S in world)
|
||||
if(!S.stat)
|
||||
if(S.robot_talk_understand && (S.robot_talk_understand == robot_talk_understand)) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
if(S.robot_talk_understand && (S.robot_talk_understand == robot_talk_understand)) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
|
||||
else if (S.binarycheck())
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
else if (S.binarycheck())
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S.show_message(renderedAI, 2)
|
||||
else
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
var/list/listening = hearers(1, src)
|
||||
listening -= src
|
||||
@@ -125,8 +124,5 @@
|
||||
|
||||
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat > 1)
|
||||
M.show_message(rendered, 2)
|
||||
for (var/mob/M in dead_mob_list)
|
||||
M.show_message(rendered, 2)
|
||||
@@ -1,6 +1,7 @@
|
||||
//Look Sir, free crabs!
|
||||
/mob/living/simple_animal/crab
|
||||
name = "crab"
|
||||
real_name = "crab"
|
||||
desc = "Free crabs!"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "crab"
|
||||
@@ -17,6 +18,8 @@
|
||||
response_harm = "stomps the"
|
||||
stop_automated_movement = 1
|
||||
friendly = "pinches"
|
||||
var/obj/item/inventory_head
|
||||
var/obj/item/inventory_mask
|
||||
|
||||
/mob/living/simple_animal/crab/Life()
|
||||
..()
|
||||
@@ -27,21 +30,27 @@
|
||||
if(turns_since_move >= turns_per_move)
|
||||
Move(get_step(src,pick(4,8)))
|
||||
turns_since_move = 0
|
||||
regenerate_icons()
|
||||
|
||||
//COFFEE! SQUEEEEEEEEE!
|
||||
/mob/living/simple_animal/crab/Coffee
|
||||
name = "Coffee"
|
||||
real_name = "Coffee"
|
||||
desc = "It's Coffee, the other pet!"
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "stomps"
|
||||
|
||||
//LOOK AT THIS - ..()??
|
||||
/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/wirecutters))
|
||||
user << "\red \b This kills the crab."
|
||||
health -= 20
|
||||
Die()
|
||||
if(prob(50))
|
||||
user << "\red \b This kills the crab."
|
||||
health -= 20
|
||||
Die()
|
||||
else
|
||||
GetMad()
|
||||
get
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
if(stat != DEAD)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
@@ -66,4 +75,205 @@
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
/mob/living/simple_animal/crab/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
name = real_name
|
||||
desc = initial(desc)
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks")
|
||||
emote_see = list("clacks")
|
||||
desc = "Free crabs!"
|
||||
src.sd_SetLuminosity(0)
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
if("mask")
|
||||
if(inventory_mask)
|
||||
inventory_mask.loc = src.loc
|
||||
inventory_mask = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
usr << "\red You have nothing in your hand to put on its [add_to]."
|
||||
return
|
||||
switch(add_to)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
usr << "\red It's is already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
//Many hats added, Some will probably be removed, just want to see which ones are popular.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/head/helmet,
|
||||
/obj/item/clothing/glasses/sunglasses,
|
||||
/obj/item/clothing/head/caphat,
|
||||
/obj/item/clothing/head/collectable/captain,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/head/collectable/kitty,
|
||||
/obj/item/clothing/head/rabbitears,
|
||||
/obj/item/clothing/head/collectable/rabbitears,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/head/collectable/beret,
|
||||
/obj/item/clothing/head/det_hat,
|
||||
/obj/item/clothing/head/nursehat,
|
||||
/obj/item/clothing/head/pirate,
|
||||
/obj/item/clothing/head/collectable/pirate,
|
||||
/obj/item/clothing/head/chefhat,
|
||||
/obj/item/clothing/head/collectable/chef,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/wizard/fake,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/collectable/wizard,
|
||||
/obj/item/clothing/head/hardhat,
|
||||
/obj/item/clothing/head/collectable/hardhat,
|
||||
/obj/item/clothing/head/hardhat/white,
|
||||
/obj/item/weapon/bedsheet,
|
||||
/obj/item/clothing/head/soft
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red It doesn't seem too keen on wearing that item."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_head = item_to_add
|
||||
regenerate_icons()
|
||||
|
||||
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
|
||||
|
||||
|
||||
switch(inventory_head && inventory_head.type)
|
||||
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
|
||||
name = "Captain [real_name]"
|
||||
desc = "Probably better than the last captain."
|
||||
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
|
||||
name = "Runtime"
|
||||
emote_see = list("coughs up a furball", "stretches")
|
||||
emote_hear = list("purrs")
|
||||
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
|
||||
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
|
||||
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
|
||||
name = "Hoppy"
|
||||
emote_see = list("twitches its nose", "hops around a bit")
|
||||
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
|
||||
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
|
||||
name = "Yann"
|
||||
desc = "Mon dieu! C'est un chien!"
|
||||
speak = list("le woof!", "le bark!", "JAPPE!!")
|
||||
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of /him")
|
||||
if(/obj/item/clothing/head/det_hat)
|
||||
name = "Detective [real_name]"
|
||||
desc = "[name] sees through your lies..."
|
||||
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
|
||||
if(/obj/item/clothing/head/nursehat)
|
||||
name = "Nurse [real_name]"
|
||||
desc = "[name] needs 100cc of beef jerky...STAT!"
|
||||
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
|
||||
name = "'[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]'"
|
||||
desc = "Yaarghh!! Thar' be a scurvy dog!"
|
||||
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
|
||||
emote_hear = list("growls ferociously", "snarls")
|
||||
speak = list("Arrrrgh!!","Grrrrrr!")
|
||||
if(/obj/item/clothing/head/collectable/police)
|
||||
name = "Officer [real_name]"
|
||||
emote_see = list("drools","looks for donuts")
|
||||
desc = "Stop right there criminal scum!"
|
||||
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
|
||||
name = "Grandwizard [real_name]"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
|
||||
if(/obj/item/weapon/bedsheet)
|
||||
name = "\improper Ghost"
|
||||
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
|
||||
emote_see = list("stumbles around", "shivers")
|
||||
emote_hear = list("howls","groans")
|
||||
desc = "Spooky!"
|
||||
if(/obj/item/clothing/head/soft)
|
||||
name = "Corgi Tech [real_name]"
|
||||
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")
|
||||
desc = "The reason your yellow gloves have chew-marks."
|
||||
|
||||
if("mask")
|
||||
if(inventory_mask)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/suit/armor/vest,
|
||||
/obj/item/device/radio
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red This object won't fit."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_mask = item_to_add
|
||||
regenerate_icons()
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/crab/GetMad()
|
||||
name = "MEGAMADCRAB"
|
||||
real_name = "MEGAMADCRAB"
|
||||
desc = "OH NO YOU DUN IT NOW."
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "madcrab"
|
||||
icon_living = "madcrab"
|
||||
icon_dead = "madcrab_dead"
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks with fury", "clicks angrily")
|
||||
emote_see = list("clacks")
|
||||
speak_chance = 1
|
||||
turns_per_move = 15//Gotta go fast
|
||||
maxHealth = 100//So they don't die as quickly
|
||||
health = 100
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 10//Kill them. Kill them all
|
||||
if(inventory_head)//Drops inventory so it doesn't have to be dealt with
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
if(inventory_mask)
|
||||
inventory_mask.loc = src.loc
|
||||
inventory_mask = null*/
|
||||
@@ -16,7 +16,7 @@
|
||||
var/meat_type
|
||||
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.
|
||||
var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it.
|
||||
|
||||
|
||||
//Interaction
|
||||
var/response_help = "You try to help"
|
||||
var/response_disarm = "You try to disarm"
|
||||
@@ -67,6 +67,8 @@
|
||||
if(stat == DEAD)
|
||||
if(health > 0)
|
||||
icon_state = icon_living
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
density = 1
|
||||
return
|
||||
@@ -348,6 +350,8 @@
|
||||
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||
|
||||
/mob/living/simple_animal/proc/Die()
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
icon_state = icon_dead
|
||||
stat = DEAD
|
||||
density = 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
computer_id = client.computer_id
|
||||
log_access("Login: [key_name(src)] from [lastKnownIP ? lastKnownIP : "localhost"]-[computer_id] || BYOND v[client.byond_version]")
|
||||
if(config.log_access)
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if(M == src) continue
|
||||
if( M.key && (M.key != key) )
|
||||
var/matches
|
||||
@@ -23,6 +23,9 @@
|
||||
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).")
|
||||
|
||||
/mob/Login()
|
||||
player_list |= list(src)
|
||||
if(client.holder)
|
||||
admin_list |= list(src)
|
||||
update_Login_details()
|
||||
world.update_status()
|
||||
client.images = null //remove the images such as AIs being unable to see runes
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/Logout()
|
||||
player_list -= src
|
||||
admin_list -= src
|
||||
log_access("Logout: [key_name(src)]")
|
||||
if (admins[src.ckey])
|
||||
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
/mob/Del()//This makes sure that mobs with clients/keys are not just deleted from the game.
|
||||
ghostize(1)
|
||||
remove_from_mob_list(src)
|
||||
living_mob_list -= src
|
||||
dead_mob_list -= src
|
||||
..()
|
||||
|
||||
/mob/New()
|
||||
add_to_mob_list(src)
|
||||
living_mob_list += src//No way this can possibly fail
|
||||
..()
|
||||
|
||||
/mob/proc/Cell()
|
||||
@@ -87,7 +95,7 @@
|
||||
|
||||
|
||||
/mob/proc/findname(msg)
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.real_name == text("[]", msg))
|
||||
return M
|
||||
return 0
|
||||
|
||||
@@ -249,7 +249,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
|
||||
/proc/findname(msg)
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.real_name == text("[msg]"))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
lastarea = starting_loc
|
||||
|
||||
sight |= SEE_TURFS
|
||||
player_list |= src
|
||||
if(src.client.holder)
|
||||
admin_list |= src
|
||||
|
||||
var/list/watch_locations = list()
|
||||
for(var/obj/effect/landmark/landmark in world)
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
|
||||
totalPlayers = 0
|
||||
totalPlayersReady = 0
|
||||
for(var/mob/new_player/player in world)
|
||||
for(var/mob/new_player/player in player_list)
|
||||
stat("[player.key]", (player.ready)?("(Playing)"):(null))
|
||||
totalPlayers++
|
||||
if(player.ready)totalPlayersReady++
|
||||
@@ -272,9 +272,8 @@
|
||||
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
|
||||
if (ticker.current_state == GAME_STATE_PLAYING)
|
||||
var/ailist[] = list()
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
if (!A.stat)
|
||||
ailist += A
|
||||
for (var/mob/living/silicon/ai/A in living_mob_list)
|
||||
ailist += A
|
||||
if (ailist.len)
|
||||
var/mob/living/silicon/ai/announcer = pick(ailist)
|
||||
if(character.mind)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
message = src.say_quote(message)
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</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
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
|
||||
if(level==1) hide(T.intact)
|
||||
cable_list += src
|
||||
|
||||
|
||||
/obj/structure/cable/Del() // called when a cable is deleted
|
||||
@@ -87,6 +88,7 @@
|
||||
if(netnum && powernets && (powernets.len >= netnum) && (netnum >= 1) ) // make sure cable & powernet data is valid
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
PN.cut_cable(src) // updated the powernets
|
||||
cable_list -= src
|
||||
// else
|
||||
// if(Debug) diary << "Defered cable deletion at [x],[y]: #[netnum]"
|
||||
..() // then go ahead and delete the cable
|
||||
|
||||
@@ -76,14 +76,14 @@
|
||||
var/netcount = 0
|
||||
powernets = list()
|
||||
|
||||
for(var/obj/structure/cable/PC in world)
|
||||
for(var/obj/structure/cable/PC in cable_list)
|
||||
PC.netnum = 0
|
||||
for(var/obj/machinery/power/M in machines)
|
||||
if(M.netnum >=0)
|
||||
M.netnum = 0
|
||||
|
||||
|
||||
for(var/obj/structure/cable/PC in world)
|
||||
for(var/obj/structure/cable/PC in cable_list)
|
||||
if(!PC.netnum)
|
||||
PC.netnum = ++netcount
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
PN.number = L
|
||||
|
||||
|
||||
for(var/obj/structure/cable/C in world)
|
||||
for(var/obj/structure/cable/C in cable_list)
|
||||
var/datum/powernet/PN = powernets[C.netnum]
|
||||
PN.cables += C
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ var/global/list/uneatable = list(
|
||||
acquire(pick(cultists))
|
||||
return
|
||||
//If there was living cultists, it picks one to follow.
|
||||
for(var/mob/living/carbon/human/food in world)
|
||||
for(var/mob/living/carbon/human/food in living_mob_list)
|
||||
if(food.stat)
|
||||
continue
|
||||
cultists += food
|
||||
@@ -504,7 +504,7 @@ var/global/list/uneatable = list(
|
||||
acquire(pick(cultists))
|
||||
return
|
||||
//no living cultists, pick a living human instead.
|
||||
for(var/mob/dead/observer/ghost in world)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(!ghost.client)
|
||||
continue
|
||||
cultists += ghost
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
if(src.trackrate) nexttime = world.timeofday + 3600/abs(trackrate)
|
||||
track = text2num(href_list["track"])
|
||||
if(track == 2)
|
||||
var/obj/machinery/power/tracker/T = locate() in world
|
||||
var/obj/machinery/power/tracker/T = locate() in powernet.nodes
|
||||
if(T)
|
||||
cdir = T.sun_angle
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/projectile/change/proc/wabbajack (mob/M as mob in world)
|
||||
/obj/item/projectile/change/proc/wabbajack (mob/M as mob in living_mob_list)
|
||||
if(istype(M, /mob/living) && M.stat != 2)
|
||||
for(var/obj/item/W in M)
|
||||
if (istype(M, /mob/living/silicon/robot)||istype(W, /obj/item/weapon/implant))
|
||||
|
||||
Reference in New Issue
Block a user