Fix for fingerprints. (They work right, now!)

Fixed the runtime related to brainmobs (sanity check)
do_after now works right.
Added the Decapitate objective, that is admin only ATM, which requires you remove their head and take it on the escape shuttle.
Fixes for a lot of surgery related bugs
Added a prompt to AI players when they are greeted, warning them not to stalk the traitor and so on.  Cacophony and Spaceman approved of it.
Sanity check for limb removal and blood stuff.
Added in sprites for a Syndicate statis/sleeper for a secret thing I have planned!
This commit is contained in:
SkyMarshal
2012-01-31 21:23:37 -07:00
parent 6e3aef823a
commit e7a7b8017d
12 changed files with 116 additions and 50 deletions
+17 -17
View File
@@ -192,11 +192,11 @@ obj/machinery/computer/forensic_scanning
for(var/i = 1, i < (files.len + 1), i++) //Lets see if we can find the owner of the prints
var/list/perp_list = files[i]
var/list/perp_prints = params2list(perp_list[1])
var/perp = perp_prints[1]
var/perp = perp_prints[num2text(1)]
var/found2 = 0
for(var/m = 1, m < (A.fingerprints.len + 1), m++) //Compare database prints with prints on object.
var/list/test_prints_list = params2list(A.fingerprints[m])
var/checker = test_prints_list[1]
var/checker = test_prints_list[num2text(1)]
if(checker == perp) //Found 'em! Merge!
found_prints[m] = 1
for(var/n = 2, n < (perp_list.len + 1), n++) //Lets see if it is already in the database
@@ -209,13 +209,13 @@ obj/machinery/computer/forensic_scanning
if(A.fingerprints)
for(var/j = 1, j < (A.fingerprints.len + 1), j++) //Fingerprints~~~
var/list/print_test1 = params2list(A.fingerprints[j])
var/test_print1 = print_test1[1]
var/test_print1 = print_test1[num2text(1)]
var/found = 0
for(var/k = 1, k <= (prints.len + 1), k++) //Lets see if the print is already in there
var/list/print_test2 = params2list(prints[k])
var/test_print2 = print_test2[1]
var/test_print2 = print_test2[num2text(1)]
if(test_print2 == test_print1) //It is! Merge!
prints[k] = test_print2 + "&" + stringmerge(print_test2[2],print_test1[2])
prints[k] = "1=" + test_print2 + "&2=" + stringmerge(print_test2[num2text(2)],print_test1[num2text(2)])
found = 1
break //We found it, we're done here.
if(!found) //It isn't! Add!
@@ -278,20 +278,20 @@ obj/machinery/computer/forensic_scanning
for(var/k = 1, k < (files.len + 1), k++)
var/list/perp_list = files[k]
var/list/perp_prints = params2list(perp_list[1])
var/perp = perp_prints[1]
var/perp = perp_prints[num2text(1)]
var/list/found_prints = list()
for(var/i = 2, i < (perp_list.len + 1), i++)
var/list/test_list = perp_list[i]
var/list/test_prints = test_list[2]
for(var/j = 1, j < (test_prints.len + 1), j++)
var/list/test_list_2 = params2list(test_prints[j])
var/test_prints_2 = test_list_2[1]
var/test_prints_2 = test_list_2[num2text(1)]
if(test_prints_2 == perp)
found_prints += test_list_2[2]
found_prints += test_list_2[num2text(2)]
break
for(var/prints in found_prints)
perp_prints[2] = stringmerge(perp_prints[2],prints)
perp_list[1] = perp + "&" + perp_prints[2]
perp_prints[num2text(2)] = stringmerge(perp_prints[num2text(2)],prints)
perp_list[1] = "1=" + perp + "&2=" + perp_prints[num2text(2)]
files[k] = perp_list
return
@@ -300,13 +300,13 @@ obj/machinery/computer/forensic_scanning
if(card.fingerprints)
for(var/k = 1, k < (card.fingerprints.len + 1), k++)
var/list/test_prints = params2list(card.fingerprints[k])
var/print = test_prints[1]
var/print = test_prints[num2text(1)]
for(var/i = 1, i < (files.len + 1), i++)
var/list/test_list = files[i]
var/list/perp_prints = params2list(test_list[1])
var/perp = perp_prints[1]
var/perp = perp_prints[num2text(1)]
if(perp == print)
test_list[1] = print + "&" + print
test_list[1] = "1=" + print + "&2=" + print
files[i] = test_list
break
del(card)
@@ -396,8 +396,8 @@ obj/machinery/computer/forensic_scanning
var/list/dossier = files[identifier]
var/list/prints = params2list(dossier[1])
var/print_string = "Fingerprints: Print not complete!<br>"
if(stringpercent(prints[2]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: (80% or higher completion reached)<br>" + prints[2] + "<br>"
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: (80% or higher completion reached)<br>" + prints[num2text(2)] + "<br>"
temp += print_string
for(var/i = 2, i < (dossier.len + 1), i++)
var/list/outputs = dossier[i]
@@ -436,8 +436,8 @@ obj/machinery/computer/forensic_scanning
var/list/dossier = files[text2num(href_list["identifier"])]
var/list/prints = params2list(dossier[1])
var/print_string = "Fingerprints: Print not complete!<br>"
if(stringpercent(prints[2]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: " + prints[2] + "<BR>"
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: " + prints[num2text(2)] + "<BR>"
P.info += print_string
for(var/i = 2, i < (dossier.len + 1), i++)
var/list/outputs = dossier[i]
+3 -3
View File
@@ -309,13 +309,13 @@ datum/mind
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate","decapitate", "debrain", "protect", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
switch (new_obj_type)
if ("assassinate","protect","debrain")
if ("assassinate","protect","debrain","decapitate")
//To determine what to name the objective in explanation text.
var/objective_type_capital = uppertext(copytext(new_obj_type, 1,2))//Capitalize first letter.
var/objective_type_text = copytext(new_obj_type, 2)//Leave the rest of the text.
@@ -327,7 +327,7 @@ datum/mind
possible_targets += possible_target.current
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/decapitate)
if (objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
+1 -1
View File
@@ -1254,7 +1254,7 @@ proc/listclearnulls(list/list)
return 0
/proc/do_after(mob/M as mob, time as num)
var/turf/T = M.loc
var/turf/T = get_turf(M)
var/holding = M.equipped()
sleep(time)
if(M)
+3 -3
View File
@@ -102,12 +102,12 @@
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
var/list/L = params2list(src.fingerprints[i])
if(L.len > 1)
if(L[1] == md5(H.dna.uni_identity))
if(L[num2text(1)] == md5(H.dna.uni_identity))
new_prints = i
prints = L[2]
prints = L[num2text(2)]
break
else
src.fingerprints[i] = "1=" + L[1] + "&2=" + stars(L[2], rand(80,90))
src.fingerprints[i] = "1=" + L[num2text(1)] + "&2=" + stars(L[num2text(2)], rand(80,90))
else
var/turf/T = get_turf(src)
for (var/mob/N in world)
+33
View File
@@ -29,6 +29,39 @@ datum/objective
datum/objective/decapitate
find_target()
..()
if(target && target.current)
explanation_text = "[target.current.real_name], the [target.assigned_role], has defied us for the last time. Make an example of him, and bring us his severed head."
else
explanation_text = "Free Objective"
return target
find_target_by_role(role, role_type=0)
..(role, role_type)
if(target && target.current)
explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role], has defied us for the last time. Make an example of him, and bring us his severed head."
else
explanation_text = "Free Objective"
return target
check_completion()
if(target && target.current)
if(!owner.current||owner.current.stat==2)//If you're otherwise dead.
return 0
var/list/all_items = owner.current.get_contents()
for(var/obj/item/weapon/organ/head/mmi in all_items)
if(mmi.brainmob&&mmi.brainmob.mind==target)
return 1
return 0
else
return 1
datum/objective/assassinate
find_target()
..()
+35 -14
View File
@@ -171,20 +171,20 @@
if((!( istype(G, /obj/item/weapon/grab)) || !( ismob(G.affecting))))
return
if(src.occupant)
user << "\blue <B>The sleeper is already occupied!</B>"
user << "\blue <B>The [src.name] is already occupied!</B>"
return
for(var/mob/living/carbon/metroid/M in range(1,G.affecting))
if(M.Victim == G.affecting)
usr << "[G.affecting.name] will not fit into the sleeper because they have a Metroid latched onto their head."
usr << "[G.affecting.name] will not fit into the [src.name] because they have a Metroid latched onto their head."
return
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
V.show_message("[user] starts putting [G.affecting.name] into the [src.name].", 3)
if(do_after(user, 20))
if(src.occupant)
user << "\blue <B>The sleeper is already occupied!</B>"
user << "\blue <B>The [src.name] is already occupied!</B>"
return
if(!G || !G.affecting) return
var/mob/M = G.affecting
@@ -259,7 +259,7 @@
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant = null
if(orient == "RIGHT")
if(orient == "RIGHT" && !istype(src,/obj/machinery/sleeper/syndicate))
icon_state = "sleeper_0-r"
return
@@ -345,9 +345,12 @@
set src in oview(1)
if(usr.stat != 0)
return
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
src.icon_state = "sleeper_0"
if(!istype(src,/obj/machinery/sleeper/syndicate))
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
src.icon_state = "sleeper_0"
else
src.icon_state = "syndi_0"
src.go_out()
add_fingerprint(usr)
return
@@ -361,7 +364,7 @@
if(usr.stat != 0)
return
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
usr << "\blue <B>The [src.name] is already occupied!</B>"
return
for(var/mob/living/carbon/metroid/M in range(1,usr))
@@ -369,22 +372,40 @@
usr << "You're too busy getting your life sucked out of you."
return
for(var/mob/V in viewers(usr))
V.show_message("[usr] starts climbing into the sleeper.", 3)
V.show_message("[usr] starts climbing into the [src.name].", 3)
if(do_after(usr, 20))
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
usr << "\blue <B>The [src.name] is already occupied!</B>"
return
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
if(!istype(src,/obj/machinery/sleeper/syndicate))
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
else
src.icon_state = "syndi_1"
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
return
return
/obj/machinery/sleeper/syndicate
name = "Illegal Stasis Pod"
icon = 'Cryogenic2.dmi'
icon_state = "syndi_0"
density = 1
anchored = 1
process()
if(src.occupant)
src.occupant.sleeping = 5
return
+3 -3
View File
@@ -207,13 +207,13 @@ MASS SPECTROMETER
if(A.fingerprints)
for(var/j = 1, j < (A.fingerprints.len + 1), j++) //Fingerprints~~~
var/list/print_test1 = params2list(A.fingerprints[j])
var/test_print1 = print_test1[1]
var/test_print1 = print_test1[num2text(1)]
var/found = 0
for(var/k = 1, k < (prints.len + 1), k++) //Lets see if the print is already in there
var/list/print_test2 = params2list(prints[k])
var/test_print2 = print_test2[1]
var/test_print2 = print_test2[num2text(1)]
if(test_print2 == test_print1) //It is! Merge!
prints[k] = test_print2 + "&" + stringmerge(print_test2[2],print_test1[2])
prints[k] = test_print2 + "&" + stringmerge(print_test2[num2text(2)],print_test1[num2text(2)])
found = 1
break //We found it, we're done here.
if(!found) //It isn't! Add!
@@ -533,8 +533,9 @@ CIRCULAR SAW
else
// bone surgery doable?
if(!try_bone_surgery(M, user))
return ..()
try_bone_surgery(M, user)
// if(!try_bone_surgery(M, user))
// return ..()
/obj/item/weapon/cautery/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
if(!istype(H))
@@ -646,7 +647,7 @@ CIRCULAR SAW
M << "\red [user] begins to seperate your appendix with [src]!"
user << "\red You seperate [M]'s appendix with [src]!"
M:appendix_op_stage = 4.0
return
return
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/metroid))
@@ -929,7 +930,7 @@ CIRCULAR SAW
return
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1)
if(!do_after(rand(50,70)))
if(!do_after(user,rand(50,70)))
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [user] tried to cut [H]'s [S.display_name] off with [src], but failed."), 1)
return
@@ -1013,14 +1014,14 @@ CIRCULAR SAW
..()
return
else if(user.zone_sel.selecting != "chest" && user.zone_sel.selecting != "groin" && istype(M, /mob/living/carbon/human))
else if(user.zone_sel.selecting != "chest" && istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
return
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1)
if(!do_after(rand(20,80)))
if(!do_after(user, rand(20,80)))
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [user] tried to cut [H]'s [S.display_name] off with [src], but failed."), 1)
return
@@ -280,6 +280,8 @@
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
if (!src.hud_used)
src.hud_used = new/obj/hud(src)
client.screen -= hud_used.blurry
client.screen -= hud_used.druggy
client.screen -= hud_used.vimpaired
+5 -1
View File
@@ -54,7 +54,11 @@
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
src << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font</b>"
src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
src << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
job = "AI"
spawn(0)
+7 -2
View File
@@ -92,8 +92,13 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
if(!istype(H))
return
if(H.dna)
blood_DNA.len++
blood_DNA[blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type)
if(blood_DNA)
blood_DNA.len++
blood_DNA[blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type)
else
var/templist[1]
templist[1] = list(H.dna.unique_enzymes, H.dna.b_type)
blood_DNA = templist
var/icon/I = new /icon(icon, icon_state)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 66 KiB