mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-01 04:52:16 +00:00
Merge pull request #465 from SkyMarshal/master
Fixed some runtimes, added admin verbs to try to debug the damn blood and prints.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/proc/command_alert(var/text, var/title = "")
|
||||
world << "<h1 class='alert'>[command_name()] Update</h1>"
|
||||
/proc/command_alert(var/text, var/title = "", var/maintitle = "NanoTrasen Update")
|
||||
world << "<h1 class='alert'>[maintitle]</h1>"
|
||||
|
||||
if (title && length(title) > 0)
|
||||
world << "<h2 class='alert'>[html_encode(title)]</h2>"
|
||||
|
||||
@@ -66,7 +66,9 @@
|
||||
|
||||
uni_identity = temp
|
||||
|
||||
var/mutstring = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B02D6"
|
||||
var/mutstring = ""
|
||||
for(var/i = 1, i <= 26, i++)
|
||||
mutstring += add_zero2(num2hex(rand(1,1024)),3)
|
||||
|
||||
struc_enzymes = mutstring
|
||||
|
||||
|
||||
@@ -230,12 +230,14 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob
|
||||
objective_list -= 3
|
||||
switch(pick(objective_list))
|
||||
if(1)//kill
|
||||
current_mind = pick(hostile_targets)
|
||||
while (!isnull(current_mind) && hostile_targets.len)
|
||||
current_mind = pick(hostile_targets)
|
||||
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em.
|
||||
ninja_mind.objectives += ninja_objective
|
||||
if(current_mind)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em.
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(2)//Steal
|
||||
@@ -246,21 +248,25 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob
|
||||
|
||||
objective_list -= 2
|
||||
if(3)//Protect. Keeping people alive can be pretty difficult.
|
||||
current_mind = pick(friendly_targets)
|
||||
while (!isnull(current_mind) && friendly_targets.len)
|
||||
current_mind = pick(friendly_targets)
|
||||
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
if(current_mind)
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
friendly_targets -= current_mind
|
||||
if(4)//Debrain
|
||||
current_mind = pick(hostile_targets)
|
||||
while (!isnull(current_mind) && hostile_targets.len)
|
||||
current_mind = pick(hostile_targets)
|
||||
|
||||
var/datum/objective/debrain/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
if(current_mind)
|
||||
var/datum/objective/debrain/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(5)//Download research
|
||||
|
||||
@@ -143,7 +143,7 @@ MASS SPECTROMETER
|
||||
src.add_fingerprint(user)
|
||||
if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune))
|
||||
if(!isnull(A.blood_DNA.len))
|
||||
for(var/i = 1, i < A.blood_DNA.len, i++)
|
||||
for(var/i = 1, i <= A.blood_DNA.len, i++)
|
||||
var/list/templist = A.blood_DNA[i]
|
||||
user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]"
|
||||
return
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
return
|
||||
if(istype(src.loc,/obj/item/weapon/storage)) //Taking stuff out of storage duplicates it.
|
||||
var/obj/item/weapon/storage/U = src.loc
|
||||
user.client.screen -= src
|
||||
user.client.screen -= src //Fixed!
|
||||
U.contents.Remove(src)
|
||||
if(istype(src.loc,/obj/item/clothing/suit/storage/))
|
||||
var/obj/item/clothing/suit/storage/X = src.loc
|
||||
@@ -224,6 +224,11 @@
|
||||
src.loc = P
|
||||
O.amount -= 1
|
||||
else if(istype(W,/obj/item/wardrobe))
|
||||
if(src in user)
|
||||
return
|
||||
if(!istype(src.loc,/turf))
|
||||
user << "It's got to be on the ground to do that!"
|
||||
return
|
||||
var/obj/item/wardrobe/I = W
|
||||
var/could_fill = 1
|
||||
for (var/obj/O in locate(src.x,src.y,src.z))
|
||||
@@ -241,7 +246,7 @@
|
||||
user << "\blue You pick up all the items."
|
||||
else
|
||||
user << "\blue You try to pick up all of the items, but run out of space in the bag."
|
||||
user.visible_message("\blue [user] gathers up[could_fill ? " " : " most of "]the pile of items and puts it into the [W].")
|
||||
user.visible_message("\blue [user] gathers up[could_fill ? " " : " most of "]the pile of items and puts it into the [W].")
|
||||
I.update_icon()
|
||||
|
||||
/obj/item/attack_self(mob/user as mob)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
O.place = "dnainjector"
|
||||
M.requests += O
|
||||
if (dnatype == "se")
|
||||
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
|
||||
if (isblockon(getblock(dna, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
else
|
||||
|
||||
@@ -814,3 +814,69 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
M.update_clothing()
|
||||
return
|
||||
|
||||
|
||||
/client/proc/cmd_debug_blood()
|
||||
set category = "Debug"
|
||||
set name = "Analyze all blood_DNA"
|
||||
|
||||
// to prevent REALLY stupid activations
|
||||
switch(alert("Are you sure?", ,"Yes", "No"))
|
||||
if("No")
|
||||
return
|
||||
world << "\red ALERT! \black Standby for high CPU bugtesting to determine missing blood_DNA values!"
|
||||
world << "\red THIS WILL PROBABLY LAG LIKE HELL."
|
||||
world << "Initiating in 10 BYOND seconds..."
|
||||
log_admin("[key_name(src)] has initiated a scan of all blood_DNA lists!")
|
||||
message_admins("[key_name_admin(src)] has initiated a scan of all blood_DNA lists!", 0)
|
||||
sleep(100)
|
||||
world << "\red SCAN INITIATED."
|
||||
spawn(0) //I am not stupid enough to leave that in a regular loop.
|
||||
for(var/atom/O in world)
|
||||
if(!islist(O.blood_DNA))
|
||||
var/turf/T = get_turf(O)
|
||||
if(istype(O.loc,/turf))
|
||||
src << "[O] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable!"
|
||||
else
|
||||
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable!"
|
||||
world << "\red SCAN COMPLETE."
|
||||
world << "Thank you for your patience."
|
||||
|
||||
|
||||
/client/proc/cmd_debug_prints()
|
||||
set category = "Debug"
|
||||
set name = "Analyze all fingerprints"
|
||||
|
||||
// to prevent REALLY stupid activations
|
||||
switch(alert("Are you sure?", ,"Yes", "No"))
|
||||
if("No")
|
||||
return
|
||||
world << "\red ALERT! \black Standby for high CPU bugtesting to determine incorrect fingerprint values!"
|
||||
world << "\red THIS WILL PROBABLY LAG LIKE HELL."
|
||||
world << "Initiating in 10 BYOND seconds..."
|
||||
log_admin("[key_name(src)] has initiated a scan of all fingerprints!")
|
||||
message_admins("[key_name_admin(src)] has initiated a scan of all fingerprints!", 0)
|
||||
sleep(100)
|
||||
world << "\red SCAN INITIATED."
|
||||
spawn(0) //I am not stupid enough to leave that in a regular loop.
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, /mob)) //Lets not.
|
||||
continue
|
||||
if(!islist(O.fingerprints))
|
||||
var/turf/T = get_turf(O)
|
||||
if(istype(O.loc,/turf))
|
||||
src << "[O] at [T.x],[T.y],[T.z] has a non-list fingerprints variable!"
|
||||
else
|
||||
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list fingerprints variable!"
|
||||
else
|
||||
for(var/i, i <= O.fingerprints.len, i++)
|
||||
if(length(O.fingerprints[i]) != 69)
|
||||
var/turf/T = get_turf(O)
|
||||
if(istype(O.loc,/turf))
|
||||
src << "[O] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length!"
|
||||
else
|
||||
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length!"
|
||||
break
|
||||
|
||||
world << "\red SCAN COMPLETE."
|
||||
world << "Thank you for your patience."
|
||||
@@ -538,12 +538,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
for (var/obj/machinery/computer/communications/C in machines)
|
||||
if(! (C.stat & (BROKEN|NOPOWER) ) )
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
|
||||
P.name = "paper - '[command_name()] Update.'"
|
||||
P.name = "'[command_name()] Update.'"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
C.messagetitle.Add("[command_name()] Update")
|
||||
C.messagetext.Add(P.info)
|
||||
|
||||
command_alert(input, maintitle=customname);
|
||||
switch(alert("Should this be announced to the general population?",,"Yes","No"))
|
||||
if("Yes")
|
||||
command_alert(input, maintitle=customname);
|
||||
if("No")
|
||||
world << "\red New NanoTrasen Update available at all communication consoles."
|
||||
|
||||
world << sound('commandreport.ogg')
|
||||
log_admin("[key_name(src)] has created a command report: [input]")
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
if(hallucination > 0)
|
||||
|
||||
if(hallucinations.len == 0 && hallucination >= 20 && health > 0)
|
||||
if(prob(5))
|
||||
if(prob(2)) //Waaay to often.
|
||||
fake_attack(src)
|
||||
//for(var/atom/a in hallucinations)
|
||||
// a.hallucinate(src)
|
||||
@@ -174,11 +174,11 @@
|
||||
|
||||
|
||||
if(mutations & mSmallsize)
|
||||
if(!(flags & TABLEPASS))
|
||||
flags |= TABLEPASS
|
||||
if(!(flags & PASSTABLE))
|
||||
flags |= PASSTABLE
|
||||
else
|
||||
if(flags & TABLEPASS)
|
||||
flags &= ~TABLEPASS
|
||||
if(flags & PASSTABLE)
|
||||
flags &= ~PASSTABLE
|
||||
|
||||
if (mutations & mHallucination)
|
||||
hallucination = 100
|
||||
@@ -249,7 +249,7 @@
|
||||
pixel_x = old_x
|
||||
pixel_y = old_y
|
||||
if (disabilities & 16)
|
||||
if (prob(10))
|
||||
if (prob(20))//Instant Chad Ore!
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
if (brainloss >= 60 && stat != 2)
|
||||
|
||||
@@ -170,7 +170,13 @@ datum/preferences
|
||||
dat += "<hr><b>Eyes</b><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;eyes=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]\"><table style='display:inline;' bgcolor=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]\"><tr><td>__</td></tr></table></font>"
|
||||
|
||||
dat += "<hr><b>Disabilities: </b><a href=\"byond://?src=\ref[user];preferences=1;disabilities=1\">[disabilities]</a><br>"
|
||||
dat += "<hr><b>Disabilities: </b><br>"
|
||||
dat += "Need Glasses? <a href=\"byond://?src=\ref[user];preferences=1;disabilities=1\">[disabilities & (1<<1) ? "Yes" : "No"]</a><br>"
|
||||
dat += "Seizures? <a href=\"byond://?src=\ref[user];preferences=1;disabilities=2\">[disabilities & (1<<2) ? "Yes" : "No"]</a><br>"
|
||||
dat += "Coughing? <a href=\"byond://?src=\ref[user];preferences=1;disabilities=3\">[disabilities & (1<<3) ? "Yes" : "No"]</a><br>"
|
||||
dat += "Tourettes/Twitching? <a href=\"byond://?src=\ref[user];preferences=1;disabilities=4\">[disabilities & (1<<4) ? "Yes" : "No"]</a><br>"
|
||||
dat += "Nervousness? <a href=\"byond://?src=\ref[user];preferences=1;disabilities=5\">[disabilities & (1<<5) ? "Yes" : "No"]</a><br>"
|
||||
dat += "Trenna's Disorder? (Deafness) <a href=\"byond://?src=\ref[user];preferences=1;disabilities=6\">[disabilities & (1<<6) ? "Yes" : "No"]</a><br>"
|
||||
|
||||
dat += "<hr><b>Flavor Text</b><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;flavor_text=1'>Change</a><br>"
|
||||
@@ -688,23 +694,7 @@ datum/preferences
|
||||
midis = 1
|
||||
disabilities = 0
|
||||
if(link_tags["disabilities"])
|
||||
var/temp = input(usr,"Disability number","Disabilities",disabilities) as num
|
||||
disabilities = min(max(temp,0),63)
|
||||
usr << "You have chosen..."
|
||||
if(disabilities == 0)
|
||||
usr << "No disabilities"
|
||||
if(disabilities & 1)
|
||||
usr << "Nearsightedness"
|
||||
if(disabilities & 2)
|
||||
usr << "Headaches"
|
||||
if(disabilities & 4)
|
||||
usr << "Coughing"
|
||||
if(disabilities & 8)
|
||||
usr << "Twitchiness/Tourettes (You must hate yourself)"
|
||||
if(disabilities & 16)
|
||||
usr << "Nervousness"
|
||||
if(disabilities & 32)
|
||||
usr << "Trenna's Disorder (Deafness)"
|
||||
disabilities ^= (1<<text2num(link_tags["disabilities"])) //MAGIC
|
||||
|
||||
ShowChoices(user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user