Merge branch 'master' of github.com:Baystation12/Baystation12

Conflicts:
	config/config.txt
This commit is contained in:
Miniature
2012-05-12 00:52:42 +09:30
389 changed files with 23433 additions and 22088 deletions

View File

@@ -47,22 +47,7 @@ atom/proc/add_fibers(mob/living/carbon/human/M)
suit_fibers += "Material from a pair of [M.gloves.name]."
if(!suit_fibers.len) del suit_fibers
atom/proc/get_duplicate(var/atom/location)
var/atom/movable/temp_atom = new /atom/movable(location)
temp_atom.name = src.name
temp_atom.desc = src.desc
temp_atom.icon = src.icon
temp_atom.icon_state = src.icon_state
temp_atom.fingerprints = src.fingerprints
temp_atom.blood_DNA = src.blood_DNA
temp_atom.suit_fibers = src.suit_fibers
if(src.original_atom)
temp_atom.original_atom = src.original_atom
else
temp_atom.original_atom = list(src)
return temp_atom
#define FINGERPRINT_COMPLETE 6 //This is the output of the stringpercent(print) proc, and means about 80% of
var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(print) proc, and means about 80% of
//the print must be there for it to be complete. (Prints are 32 digits)
obj/machinery/computer/forensic_scanning
@@ -204,96 +189,90 @@ obj/machinery/computer/forensic_scanning
if("database")
canclear = 1
if(href_list["delete_record"])
delete_dossier(text2num(href_list["delete_record"]))
delete_dossier(href_list["delete_record"])
if(href_list["delete_aux"])
delete_record(text2num(href_list["delete_aux"]))
delete_record(href_list["delete_aux"])
if((!misc || !misc.len) && (!files || !files.len))
temp = "Database is empty."
for(var/atom/A in contents)
if(A == scanning)
continue
del(A)
else
if(files && files.len)
temp = "<b>Criminal Evidence Database</b><br><br>"
temp += "Consolidated data points:<br>"
for(var/i = 1, i <= files.len, i++)
temp += "<a href='?src=\ref[src];operation=record;identifier=[i]'>{Dossier [i]}</a><br>"
var/i = 1
for(var/print in files)
temp += "<a href='?src=\ref[src];operation=record;identifier=[print]'>{Dossier [i]}</a><br>"
i++
temp += "<br><a href='?src=\ref[src];operation=card'>{Insert Finger Print Card (To complete a Dossier)}</a><br><br><br>"
else
temp = ""
if(misc && misc.len)
if(href_list["delete"])
delete_record(text2num(href_list["delete"]))
temp += "<b>Auxiliary Evidence Database</b><br><br>"
temp += "This is where anything without fingerprints goes.<br><br>"
for(var/i = 1, i <= misc.len, i++)
var/list/temp_list = misc[i]
var/item_name = get_name(temp_list[1])
temp += "<a href='?src=\ref[src];operation=auxiliary;identifier=[i]'>{[item_name]}</a><br>"
for(var/atom in misc)
var/list/data_entry = misc[atom]
temp += "<a href='?src=\ref[src];operation=auxiliary;identifier=[atom]'>{[data_entry[3]]}</a><br>"
if("record")
canclear = 0
if(files)
temp = "<b>Criminal Evidence Database</b><br><br>"
temp += "Consolidated data points: Dossier [href_list["identifier"]]<br>"
var/identifier = text2num(href_list["identifier"])
var/list/dossier = files[identifier]
var/list/prints = params2list(dossier[1])
temp += "Consolidated data points: Dossier [files.Find(href_list["identifier"])]<br>"
var/list/dossier = files[href_list["identifier"]]
var/print_string = "Fingerprints: Print not complete!<br>"
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: (80% or higher completion reached)<br>" + prints[num2text(2)] + "<br>"
if(stringpercent(dossier[1]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: (80% or higher completion reached)<br>[dossier[1]]<br>"
temp += print_string
for(var/i = 2, i <= dossier.len, i++)
for(var/object in dossier)
if(object == dossier[1])
continue
temp += "<hr>"
var/list/outputs = dossier[i]
var/item_name = get_name(outputs[1])
var/list/prints_len = outputs[2]
temp += "<big><b>Object:</b> [item_name]</big><br>"
var/list/outputs = dossier[object]
var/list/prints_len = outputs[1]
temp += "<big><b>Object:</b> [outputs[4]]</big><br>"
temp += "&nbsp<b>Fingerprints:</b><br>"
temp += "&nbsp;&nbsp;&nbsp;&nbsp;[prints_len.len] Unique fingerprints found.<br>"
var/list/fibers = outputs[3]
var/list/fibers = outputs[2]
if(fibers && fibers.len)
temp += "&nbsp<b>Fibers:</b><br>"
for(var/j = 1, j <= fibers.len, j++)
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]<br>"
var/list/blood = outputs[4]
var/list/blood = outputs[3]
if(blood && blood.len)
temp += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_record=[href_list["identifier"]]'>{Delete this Dossier}</a>"
temp += "<br><a href='?src=\ref[src];operation=databaseprint;identifier=[href_list["identifier"]]'>{Print}</a>"
else
temp = "ERROR. Database not found!<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_record=[href_list["identifier"]]'>{Delete this Dossier}</a>"
temp += "<br><a href='?src=\ref[src];operation=databaseprint;identifier=[href_list["identifier"]]'>{Print}</a>"
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
if("databaseprint")
if(files)
var/obj/item/weapon/paper/P = new(loc)
P.name = "Database File (Dossier [href_list["identifier"]])"
P.name = "Database File (Dossier [files.Find(href_list["identifier"])])"
P.overlays += "paper_words"
P.info = "<b>Criminal Evidence Database</b><br><br>"
P.info += "Consolidated data points: Dossier [href_list["identifier"]]<br>"
var/list/dossier = files[text2num(href_list["identifier"])]
var/list/prints = params2list(dossier[1])
var/list/dossier = files[href_list["identifier"]]
var/print_string = "Fingerprints: Print not complete!<br>"
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: " + prints[num2text(2)] + "<BR>"
if(stringpercent(dossier[1]) <= FINGERPRINT_COMPLETE)
print_string = "Fingerprints: (80% or higher completion reached)<br>[dossier[1]]<br>"
P.info += print_string
for(var/i = 2, i <= dossier.len, i++)
for(var/object in dossier)
if(object == dossier[1])
continue
P.info += "<hr>"
var/list/outputs = dossier[i]
var/item_name = get_name(outputs[1])
var/list/prints_len = outputs[2]
P.info += "<big><b>Object:</b> [item_name]</big><br>"
var/list/outputs = dossier[object]
var/list/prints_len = outputs[1]
P.info += "<big><b>Object:</b> [outputs[4]]</big><br>"
P.info += "&nbsp<b>Fingerprints:</b><br>"
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;[prints_len.len] Unique fingerprints found.<br>"
var/list/fibers = outputs[3]
var/list/fibers = outputs[2]
if(fibers && fibers.len)
P.info += "&nbsp<b>Fibers:</b><br>"
for(var/j = 1, j <= fibers.len, j++)
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]<br>"
var/list/blood = outputs[4]
var/list/blood = outputs[3]
if(blood && blood.len)
P.info += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
@@ -305,42 +284,38 @@ obj/machinery/computer/forensic_scanning
canclear = 0
if(misc)
temp = "<b>Auxiliary Evidence Database</b><br><br>"
var/identifier = text2num(href_list["identifier"])
var/list/outputs = misc[identifier]
var/item_name = get_name(outputs[1])
temp += "<big><b>Consolidated data points:</b> [item_name]</big><br>"
var/list/fibers = outputs[2]
var/list/outputs = misc[href_list["identifier"]]
temp += "<big><b>Consolidated data points:</b> [outputs[3]]</big><br>"
var/list/fibers = outputs[1]
if(fibers && fibers.len)
temp += "&nbsp<b>Fibers:</b><br>"
for(var/j = 1, j <= fibers.len, j++)
temp += "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]"
var/list/blood = outputs[3]
var/list/blood = outputs[2]
if(blood && blood.len)
temp += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_aux=[href_list["identifier"]]'>{Delete This Record}</a>"
temp += "<br><a href='?src=\ref[src];operation=auxiliaryprint;identifier=[href_list["identifier"]]'>{Print}</a>"
else
temp = "ERROR. Database not found!<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_aux=[href_list["identifier"]]'>{Delete This Record}</a>"
temp += "<br><a href='?src=\ref[src];operation=auxiliaryprint;identifier=[href_list["identifier"]]'>{Print}</a>"
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
if("auxiliaryprint")
if(misc)
var/obj/item/weapon/paper/P = new(loc)
var/identifier = text2num(href_list["identifier"])
var/list/outputs = misc[identifier]
var/item_name = get_name(outputs[1])
P.name = "Auxiliary Database File ([item_name])"
var/list/outputs = misc[href_list["identifier"]]
P.name = "Auxiliary Database File ([outputs[3]])"
P.overlays += "paper_words"
P.info = "<b>Auxiliary Evidence Database</b><br><br>"
P.info += "<big><b>Consolidated data points:</b> [item_name]</big><br>"
var/list/fibers = outputs[2]
P.info += "<big><b>Consolidated data points:</b> [outputs[3]]</big><br>"
var/list/fibers = outputs[1]
if(fibers && fibers.len)
P.info += "&nbsp<b>Fibers:</b><br>"
for(var/j = 1, j <= fibers.len, j++)
P.info += "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]"
var/list/blood = outputs[3]
var/list/blood = outputs[2]
if(blood && blood.len)
P.info += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
@@ -383,9 +358,8 @@ obj/machinery/computer/forensic_scanning
scan_data = "<u>[scanning]</u><br><br>"
if (scanning.blood_DNA)
scan_data += "Blood Found:<br>"
for(var/i = 1, i <= scanning.blood_DNA.len, i++)
var/list/templist = scanning.blood_DNA[i]
scan_data += "Blood type: [templist[2]]\nDNA: [templist[1]]<br><br>"
for(var/blood in scanning.blood_DNA)
scan_data += "Blood type: [scanning.blood_DNA[blood]]\nDNA: [blood]<br><br>"
else
scan_data += "No Blood Found<br><br>"
if(!scanning.fingerprints)
@@ -448,221 +422,138 @@ obj/machinery/computer/forensic_scanning
temp = "Data Transfer Failed: No Object."
updateUsrDialog()
verb/reset()
set name = "Reset Database"
set category = "Object"
set src in oview(1)
temp = ""
add_fingerprint(usr)
files = list()
misc = list()
for(var/atom/A in contents)
if(A == scanning)
continue
del(A)
return
ex_act()
return
proc/add_data_scanner(var/obj/item/device/detective_scanner/W)
if(W.stored)
for(var/i = 1, i <= W.stored.len, i++)
var/list/data = W.stored[i]
add_data(data[1],1,data[2],data[3],data[4])
for(var/atom in W.stored)
var/list/data = W.stored[atom]
add_data_master(atom,data[1],data[2],data[3],data[4])
W.stored = list()
for(var/atom/A in W.contents)
del(A)
return
proc/add_data(var/atom/scanned_atom)
return add_data_master("\ref [scanned_atom]", scanned_atom.fingerprints,\
scanned_atom.suit_fibers, scanned_atom.blood_DNA, scanned_atom.name)
proc/add_data(var/atom/A, var/override = 0, var/tempfingerprints, var/tempsuit_fibers,var/tempblood_DNA)
/********************************
*****DO NOT DIRECTLY CALL ME*****
********************************/
proc/add_data_master(var/atom_reference, var/list/atom_fingerprints, var/list/atom_suit_fibers, var/list/atom_blood_DNA, var/atom_name)
//What follows is massive. It cross references all stored data in the scanner with the other stored data,
//and what is already in the computer. Not sure how bad the lag may/may not be.
var
backup_prints
backup_fibers
backup_DNA
if(override)
backup_prints = A.fingerprints
A.fingerprints = tempfingerprints
backup_fibers = A.suit_fibers
A.suit_fibers = tempsuit_fibers
backup_DNA = A.blood_DNA
A.blood_DNA = tempblood_DNA
if(!A.fingerprints) //No prints
var/merged = 0
if(!atom_fingerprints) //No prints
if(!misc)
misc = list()
if(misc)
for(var/i = 1, i <= misc.len, i++) //Lets see if we can find it.
var/list/templist = misc[i]
var/atom/check = templist[1]
var/atom_checker_scan = (A.original_atom ? check.original_atom[1] == A.original_atom[1] : 0)
if(check.original_atom[1] == A || atom_checker_scan) //There it is!
merged = 1
var/list/fibers = templist[2]
if(!fibers)
fibers = list()
if(A.suit_fibers)
for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add!
fibers += A.suit_fibers[j]
var/list/blood = templist[3]
if(!blood)
blood = list()
if(A.blood_DNA)
for(var/j = 1, j <= A.blood_DNA.len, j++) //Blood~~~
if(!blood.Find(A.blood_DNA[j])) //It isn't! Add!
blood += A.blood_DNA[j]
var/list/sum_list[3] //Pack it back up!
sum_list[1] = check
sum_list[2] = fibers
sum_list[3] = blood
misc[i] = sum_list //Store it!
break //We found it, we're done here.
if(!merged) //Nope! Guess we have to add it!
var/list/templist[3]
templist[1] = A.get_duplicate(src)
templist[2] = A.suit_fibers
templist[3] = A.blood_DNA
misc.len++
misc[misc.len] = templist //Store it!
return !merged
else //Has prints.
var/list/found_prints[A.fingerprints.len]
for(var/i = 1, i <= found_prints.len, i++)
found_prints[i] = 0
if(!files)
files = list()
for(var/i = 1, i <= files.len, 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[num2text(1)]
var/found2 = 0
for(var/m = 1, m <= A.fingerprints.len, m++) //Compare database prints with prints on object.
var/list/test_prints_list = params2list(A.fingerprints[m])
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, n++) //Lets see if it is already in the database
var/list/target = perp_list[n]
var/atom/atom_checker = target[1]
var/atom_checker_scan = (A.original_atom ? atom_checker.original_atom[1] == A.original_atom[1] : 0)
if(atom_checker.original_atom[1] == A || atom_checker_scan) //Found the original object!
found2 = 1
var/list/prints = target[2]
if(!prints)
prints = list()
if(A.fingerprints)
for(var/j = 1, j <= A.fingerprints.len, j++) //Fingerprints~~~
var/list/print_test1 = params2list(A.fingerprints[j])
var/test_print1 = print_test1[num2text(1)]
var/found = 0
for(var/k = 1, k <= prints.len, k++) //Lets see if the print is already in there
var/list/print_test2 = params2list(prints[k])
var/test_print2 = print_test2[num2text(1)]
if(test_print2 == test_print1) //It is! Merge!
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!
prints += A.fingerprints[j]
var/list/fibers = target[3]
if(!fibers)
fibers = list()
if(A.suit_fibers)
for(var/j = 1, j < A.suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add!
fibers += A.suit_fibers[j]
var/list/blood = target[4]
if(!blood)
blood = list()
if(A.blood_DNA)
for(var/j = 1, j < A.blood_DNA.len, j++) //Blood~~~
if(!blood.Find(A.blood_DNA[j])) //It isn't! Add!
blood += A.blood_DNA[j]
var/list/sum_list[4] //Pack it back up!
sum_list[1] = atom_checker
sum_list[2] = prints
sum_list[3] = fibers
sum_list[4] = blood
perp_list[n] = sum_list //Store it!
files[i] = perp_list
break //We found it, we're done here.
if(!found2) //Add a new datapoint to this perp!
var/list/sum_list[4]
sum_list[1] = A.get_duplicate(src)
sum_list[2] = A.fingerprints
sum_list[3] = A.suit_fibers
sum_list[4] = A.blood_DNA
perp_list.len++
perp_list[perp_list.len] = sum_list
files[i] = perp_list
for(var/m = 1, m <= found_prints.len, m++) //Uh Oh! A print wasn't used! New datapoint!
if(found_prints[m] == 0)
var/list/newperp[2]
var/list/sum_list[4]
sum_list[1] = A.get_duplicate(src)
sum_list[2] = A.fingerprints
sum_list[3] = A.suit_fibers
sum_list[4] = A.blood_DNA
newperp[2] = sum_list
newperp[1] = A.fingerprints[m]
if(!files)
files = newperp
else
files.len++
files[files.len] = newperp
update_fingerprints() //Lets update the calculated sum of the stored prints.
if(override)
A.fingerprints = backup_prints
A.suit_fibers = backup_fibers
A.blood_DNA = backup_DNA
return
var/list/data_entry = misc[atom_reference]
if(data_entry)
var/list/fibers = data_entry[1]
if(!fibers)
fibers = list()
if(atom_suit_fibers)
for(var/j = 1, j <= atom_suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add!
fibers += atom_suit_fibers[j]
var/list/blood = data_entry[2]
if(!blood)
blood = list()
if(atom_blood_DNA)
for(var/main_blood in atom_blood_DNA)
if(!blood[main_blood])
blood[main_blood] = atom_blood_DNA[blood]
return 1
var/list/templist[2]
templist[1] = atom_suit_fibers
templist[2] = atom_blood_DNA
templist[3] = atom_name
misc[atom_reference] = templist //Store it!
return 0
//Has prints.
if(!files)
files = list()
for(var/main_print in atom_fingerprints)
var/list/data_entry = files[main_print]
if(data_entry)//The print is already in here!
var/list/internal_atom = data_entry[atom_reference] //Lets see if we can find the current object
if(internal_atom)
//We must be on a roll! Just update what needs to be updated.
var/list/internal_prints = internal_atom[1]
for(var/print in atom_fingerprints) //Sorry for the double loop! D:
var/associated_print = internal_prints[print]
var/reference_print = atom_fingerprints[print]
if(associated_print && associated_print != reference_print) //It does not match
internal_prints[print] = stringmerge(associated_print, reference_print)
else if(!associated_print)
internal_prints[print] = reference_print
//If the main print was updated, lets update the master as well.
if(print == main_print && (!associated_print || (associated_print && associated_print != reference_print)))
update_fingerprints(main_print, internal_prints[print])
//Fibers.
var/list/fibers = internal_atom[2]
if(!fibers)
fibers = list()
if(atom_suit_fibers)
for(var/j = 1, j < atom_suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add!
fibers += atom_suit_fibers[j]
//Blood.
var/list/blood = internal_atom[3]
if(!blood)
blood = list()
if(atom_blood_DNA)
for(var/main_blood in atom_blood_DNA)
if(!blood[main_blood])
blood[main_blood] = atom_blood_DNA[blood]
continue
//It's not in there! We gotta add it.
update_fingerprints(main_print, atom_fingerprints[main_print])
var/list/data_point[4]
data_point[1] = atom_fingerprints
data_point[2] = atom_suit_fibers
data_point[3] = atom_blood_DNA
data_point[4] = atom_name
data_entry[atom_reference] = data_point
continue
//No print at all! New data entry, go!
var/list/data_point[4]
data_point[1] = atom_fingerprints
data_point[2] = atom_suit_fibers
data_point[3] = atom_blood_DNA
data_point[4] = atom_name
var/list/new_file[1]
new_file[1] = atom_fingerprints[main_print]
new_file[atom_reference] = data_point
files[main_print] = new_file
return 1
/********************************
***END DO NOT DIRECTLY CALL ME***
********************************/
proc/update_fingerprints() //I am tired, but this updates the master print from evidence, which is used to determine completion of a print.
for(var/k = 1, k <= files.len, k++)
var/list/perp_list = files[k]
var/list/perp_prints = params2list(perp_list[1])
var/perp = perp_prints[num2text(1)]
var/list/found_prints = list()
for(var/i = 2, i <= perp_list.len, i++)
var/list/test_list = perp_list[i]
var/list/test_prints = test_list[2]
for(var/j = 1, j <= test_prints.len, j++)
var/list/test_list_2 = params2list(test_prints[j])
var/test_prints_2 = test_list_2[num2text(1)]
if(test_prints_2 == perp)
found_prints += test_list_2[num2text(2)]
break
for(var/prints in found_prints)
perp_prints[num2text(2)] = stringmerge(perp_prints[num2text(2)],prints)
perp_list[1] = "1=" + perp + "&2=" + perp_prints[num2text(2)]
files[k] = perp_list
proc/update_fingerprints(var/ref_print, var/new_print)
var/list/master = files[ref_print]
if(master)
master[1] = stringmerge(master[1],new_print)
else
CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal")
return
proc/process_card() //Same as above, but for fingerprint cards
if(card.fingerprints && !(card.amount > 1) && islist(card.fingerprints) && files && files.len)
usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints."
var/found = 0
for(var/k = 1, k <= card.fingerprints.len, k++)
var/list/test_prints = params2list(card.fingerprints[k])
var/print = test_prints[num2text(1)]
for(var/i = 1, i <= files.len, i++)
var/list/test_list = files[i]
var/list/perp_prints = params2list(test_list[1])
var/perp = perp_prints[num2text(1)]
if(perp == print)
test_list[1] = "1=" + print + "&2=" + print
files[i] = test_list
found = 1
break
for(var/master_print in card.fingerprints)
var/list/data_entry = files[master_print]
if(data_entry)
found = 1
data_entry[1] = master_print
if(found)
usr << "The machinery finds can completes a match."
usr << "The machinery finds it can complete a match."
else
usr << "No match found."
del(card)
@@ -674,24 +565,14 @@ obj/machinery/computer/forensic_scanning
return
return
proc/delete_record(var/location) //Deletes an entry in the misc database at the given location
proc/delete_record(var/atom_ref) //Deletes an entry in the misc database at the given location
if(misc && misc.len)
for(var/i = location, i < misc.len, i++)
misc[i] = misc[i+i]
misc.len--
misc.Remove(atom_ref)
return
proc/get_name(var/atom/A) //HurrDurr
return A.name
proc/delete_dossier(var/location) //Deletes a Dossier at a given location.
proc/delete_dossier(var/print) //Deletes a Dossier at a given location.
if(files && files.len)
if(files.len > location)
for(var/i = location, i < files.len, i++)
files[i] = files[i + 1]
if(files.len >= location)
files[files.len] = list()
files.len--
files.Remove(print)
return
detective
@@ -784,17 +665,17 @@ turf/Entered(mob/living/carbon/human/M)
turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info,bloodcolor)
for(var/obj/effect/decal/cleanable/blood/tracks/T in src)
if(T.dir == d && findtext(T.icon, bloodcolor))
if(T.dir == d && findtext(T.icon_state, bloodcolor))
if((leaving && T.icon_state == "steps2") || (!leaving && T.icon_state == "steps1"))
T.desc = "These bloody footprints appear to have been made by [info]."
if(T.blood_DNA)
T.blood_DNA.len++
if(!T.blood_DNA)
T.blood_DNA = list()
if(istype(M,/mob/living/carbon/human))
T.blood_DNA[T.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
T.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
else if(istype(M,/mob/living/carbon/alien))
T.blood_DNA[T.blood_DNA.len] = list("UNKNOWN DNA","X*")
T.blood_DNA["UNKNOWN DNA"] = "X*"
else if(istype(M,/mob/living/carbon/monkey))
T.blood_DNA[T.blood_DNA.len] = list("Non-human DNA","A+")
T.blood_DNA["Non-human DNA"] = "A+"
return
var/obj/effect/decal/cleanable/blood/tracks/this = new(src)
this.icon = 'footprints.dmi'
@@ -819,14 +700,13 @@ turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info,bloodco
else if(bloodcolor == "xeno")
this.desc = "These acidic bloody footprints appear to have been made by [info]."
else if(bloodcolor == "oil")
this.name = "oil"
this.desc = "These oil footprints appear to have been made by [info]."
if(istype(M,/mob/living/carbon/human))
if(this.blood_DNA.len)
this.blood_DNA.len++
this.blood_DNA[this.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
else
this.blood_DNA = list(list(M.dna.unique_enzymes,M.dna.b_type))
if(!this.blood_DNA)
this.blood_DNA = list()
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
proc/get_tracks(mob/M)
if(istype(M,/mob/living))

View File

@@ -65,6 +65,76 @@ var/global/BSACooldown = 0
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if(href_list["simplemake"])
if(!href_list["mob"])
usr << "Invalid mob"
return
var/mob/M = locate(href_list["mob"])
if(!M || !ismob(M))
usr << "Cannot find mob"
return
var/delmob = 0
var/option = alert("Delete old mob?","Message","Yes","No","Cancel")
if(option == "Cancel")
return
if(option == "Yes")
delmob = 1
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
message_admins("\blue [key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]", 1)
switch(href_list["simplemake"])
if("observer")
M.change_mob_type( /mob/dead/observer , null, null, delmob)
if("drone")
M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob)
if("hunter")
M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob)
if("queen")
M.change_mob_type( /mob/living/carbon/alien/humanoid/queen , null, null, delmob)
if("sentinel")
M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob)
if("larva")
M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob)
if("human")
M.change_mob_type( /mob/living/carbon/human , null, null, delmob)
if("metroid")
M.change_mob_type( /mob/living/carbon/metroid , null, null, delmob)
if("adultmetroid")
M.change_mob_type( /mob/living/carbon/metroid/adult , null, null, delmob)
if("monkey")
M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob)
if("robot")
M.change_mob_type( /mob/living/silicon/robot , null, null, delmob)
if("cat")
M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob)
if("runtime")
M.change_mob_type( /mob/living/simple_animal/cat/Runtime , null, null, delmob)
if("corgi")
M.change_mob_type( /mob/living/simple_animal/corgi , null, null, delmob)
if("ian")
M.change_mob_type( /mob/living/simple_animal/corgi/Ian , null, null, delmob)
if("crab")
M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob)
if("coffee")
M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob)
if("parrot")
M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob)
if("drprofessor")
M.change_mob_type( /mob/living/simple_animal/parrot/DrProfessor , null, null, delmob)
if("constructarmoured")
M.change_mob_type( /mob/living/simple_animal/constructarmoured , null, null, delmob)
if("constructbuilder")
M.change_mob_type( /mob/living/simple_animal/constructbuilder , null, null, delmob)
if("constructwraith")
M.change_mob_type( /mob/living/simple_animal/constructwraith , null, null, delmob)
if("shade")
M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob)
if(href_list["view_player_info"])
show_player_info(href_list["view_player_info"])
@@ -179,10 +249,10 @@ var/global/BSACooldown = 0
if(!reason)
return
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins)]")
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]")
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins)]")
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins)]", 1)
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]")
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]", 1)
Banlist.cd = "/base/[banfolder]"
Banlist["reason"] << reason
Banlist["temp"] << temp
@@ -522,8 +592,8 @@ var/global/BSACooldown = 0
for(var/job in notbannedlist)
ban_unban_log_save("[key_name(usr)] jobbanned [key_name(M)] from [job]. reason: [reason]")
log_admin("[key_name(usr)] banned [key_name(M)] from [job]")
feedback_inc("ban_job",1)
feedback_add_details("ban_job","- [job]")
//feedback_inc("ban_job",1)
//feedback_add_details("ban_job","- [job]")
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
if(!msg) msg = job
else msg += ", [job]"
@@ -547,8 +617,8 @@ var/global/BSACooldown = 0
if("Yes")
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
feedback_inc("ban_job_unban",1)
feedback_add_details("ban_job_unban","- [job]")
//feedback_inc("ban_job_unban",1)
//feedback_add_details("ban_job_unban","- [job]")
jobban_unban(M, job)
if(!msg) msg = job
else msg += ", [job]"
@@ -885,6 +955,11 @@ var/global/BSACooldown = 0
if (href_list["sendtoprison"])
if ((src.rank in list( "Moderator", "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Send to admin prison for the round?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["sendtoprison"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
@@ -954,6 +1029,11 @@ var/global/BSACooldown = 0
if (href_list["tdome1"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdome1"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
@@ -980,6 +1060,11 @@ var/global/BSACooldown = 0
if (href_list["tdome2"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdome2"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
@@ -1006,6 +1091,11 @@ var/global/BSACooldown = 0
if (href_list["tdomeadmin"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdomeadmin"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
@@ -1049,6 +1139,16 @@ var/global/BSACooldown = 0
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
// if (href_list["adminauth"])
// if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
// var/mob/M = locate(href_list["adminauth"])
// if (ismob(M) && !M.client.authenticated && !M.client.authenticating)
// M.client.verbs -= /client/proc/authorize
// M.client.authenticated = text("admin/[]", usr.client.authenticated)
// log_admin("[key_name(usr)] authorized [key_name(M)]")
// message_admins("\blue [key_name_admin(usr)] authorized [key_name_admin(M)]", 1)
// M.client << text("You have been authorized by []", usr.key)
if (href_list["revive"])
if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/mob/living/M = locate(href_list["revive"])
@@ -1227,9 +1327,15 @@ var/global/BSACooldown = 0
sleep(2)
cl.jumptomob(M)
if (href_list["traitor_panel_pp"])
var/mob/M = locate(href_list["traitor_panel_pp"])
if(isnull(M))
usr << "Mob doesn't seem to exist."
return
if(!ismob(M))
usr << "This doen't seem to be a mob."
return
show_traitor_panel(M)
if (href_list["BlueSpaceArtillery"])
var/mob/M = locate(href_list["BlueSpaceArtillery"])
@@ -1324,6 +1430,11 @@ var/global/BSACooldown = 0
if (href_list["getmob"])
if(rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master"))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
else
@@ -1605,8 +1716,8 @@ var/global/BSACooldown = 0
ok = 1*/
if("toxic")
/*
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","T")
//feedback_inc("admin_secrets_fun_used",1)
//feedback_add_details("admin_secrets_fun_used","T")
for(var/obj/machinery/atmoalter/siphs/fullairsiphon/O in world)
O.t_status = 3
for(var/obj/machinery/atmoalter/siphs/scrubbers/O in world)
@@ -1904,30 +2015,16 @@ var/global/BSACooldown = 0
world << sound('granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
spawn(rand(100, 600))
del(bh)
if("timeanomalies")
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('spanomalies.ogg')
var/list/turfs = list( )
var/turf/picked
for(var/turf/T in world)
if(T.z == 1 && istype(T,/turf/simulated/floor) && !istype(T,/turf/space))
turfs += T
for(var/turf/T in world)
set background = 1
if(prob(20) && T.z == 1 && istype(T,/turf/simulated/floor))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/effect/portal/P = new /obj/effect/portal( T )
P.target = picked
P.creator = null
P.icon = 'objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","STA")
//moved to its own dm so I could split it up and prevent the spawns copying variables over and over
//can be found in code\game\game_modes\events\wormholes.dm
wormhole_event()
if("goblob")
//feedback_inc("admin_secrets_fun_used",1)
//feedback_add_details("admin_secrets_fun_used","BL")
@@ -2103,121 +2200,7 @@ var/global/BSACooldown = 0
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
if("check_antagonist")
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[(((world.time / 600 % 60)/10) > 1 ? world.time / 600 % 60 : add_zero(world.time / 600 % 60, 2))]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online)
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
else
var/timeleft = emergency_shuttle.timeleft()
switch(emergency_shuttle.location)
if(0)
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
if(1)
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
if(ticker.mode.syndicates.len)
dat += "<br><table cellspacing=5><tr><td><B>Syndicates</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.syndicates)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
else
dat += "<tr><td><i>Nuclear Operative not found!</i></td></tr>"
dat += "</table><br><table><tr><td><B>Nuclear Disk(s)</B></td></tr>"
for(var/obj/item/weapon/disk/nuclear/N in world)
dat += "<tr><td>[N.name], "
var/atom/disk_loc = N.loc
while(!istype(disk_loc, /turf))
if(istype(disk_loc, /mob))
var/mob/M = disk_loc
dat += "carried by <a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a> "
if(istype(disk_loc, /obj))
var/obj/O = disk_loc
dat += "in \a [O.name] "
disk_loc = disk_loc.loc
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
dat += "</table>"
if(ticker.mode.head_revolutionaries.len || ticker.mode.revolutionaries.len)
dat += "<br><table cellspacing=5><tr><td><B>Revolutionaries</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.head_revolutionaries)
var/mob/M = N.current
if(!M)
dat += "<tr><td><i>Head Revolutionary not found!</i></td></tr>"
else
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Leader)</b>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
for(var/datum/mind/N in ticker.mode.revolutionaries)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
dat += "</table><table cellspacing=5><tr><td><B>Target(s)</B></td><td></td><td><B>Location</B></td></tr>"
for(var/datum/mind/N in ticker.mode.get_living_heads())
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
var/turf/mob_loc = get_turf_loc(M)
dat += "<td>[mob_loc.loc]</td></tr>"
else
dat += "<tr><td><i>Head not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.changelings.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Changelings</B></td><td></td><td></td></tr>"
for(var/datum/mind/changeling in ticker.mode.changelings)
var/mob/M = changeling.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
dat += "<td><A HREF='?src=\ref[src];traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Changeling not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.wizards.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Wizards</B></td><td></td><td></td></tr>"
for(var/datum/mind/wizard in ticker.mode.wizards)
var/mob/M = wizard.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
dat += "<td><A HREF='?src=\ref[src];traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Wizard not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.cult.len)
dat += "<br><table cellspacing=5><tr><td><B>Cultists</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.cult)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.traitors.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Traitors</B></td><td></td><td></td></tr>"
for(var/datum/mind/traitor in ticker.mode.traitors)
var/mob/M = traitor.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
dat += "<td><A HREF='?src=\ref[src];traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Traitor not found!</i></td></tr>"
dat += "</table>"
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=400x500")
else
alert("The game hasn't started yet!")
check_antagonists()
if("showailaws")
for(var/mob/living/silicon/ai/ai in world)
usr << "[key_name(ai, usr)]'s Laws:"
@@ -2343,6 +2326,7 @@ var/global/BSACooldown = 0
set category = "Admin"
set name = "Show Player Panel"
set desc="Edit player (respawn, ban, heal, etc)"
if(!M)
usr << "You seem to be selecting a mob that doesn't exist anymore."
return
@@ -2351,56 +2335,123 @@ var/global/BSACooldown = 0
if (!istype(src,/obj/admins))
usr << "Error: you are not an admin!"
return
var/dat = "<html><head><title>Options for [M.key]</title></head>"
var/foo = " "
if (ismob(M) && M.client)
foo += text("<A HREF='?src=\ref[src];prom_demot=\ref[M.client]'>Promote/Demote</A> | ")
var/body = "<html><head><title>Options for [M.key]</title></head>"
body += "<body>Options panel for <b>[M]</b>"
if(M.client)
body += " played by <b>[M.client]</b> "
if(M.client.holder)
body += "\[<A href='?src=\ref[src];prom_demot=\ref[M.client]'>[M.client.holder.rank]</A>\]"
else
body += "\[<A href='?src=\ref[src];prom_demot=\ref[M.client]'>Player</A>\]"
if(istype(M, /mob/new_player))
body += " <B>Hasn't Entered Game</B> "
else
body += " \[<A href='?src=\ref[src];revive=\ref[M]'>Heal</A>\] "
body += "<br><br>\[ "
body += "<a href='?src=\ref[src];adminplayervars=\ref[M]'>VV</a> - "
body += "<a href='?src=\ref[src];traitor_panel_pp=\ref[M]'>TP</a> - "
body += "<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> - "
body += "<a href='?src=\ref[src];adminplayersubtlemessage=\ref[M]'>SM</a> - "
body += "<a href='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</a>\] </b><br>"
body += "<b>Mob type</b> = [M.type]<br><br>"
body += "<A href='?src=\ref[src];boot2=\ref[M]'>Kick</A> | "
body += "<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> | "
body += "<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> "
if(M.client)
body += "| <A HREF='?src=\ref[src];sendtoprison=\ref[M]'>Prison</A> | "
body += "<b>Mute:</b> "
if(M.client.muted_complete)
body += "<b>Completely Muted:</b> (<A href='?src=\ref[src];mute_complete=\ref[M]'>Allow adminhelp</A>)"
else
if(M.client.muted)
body += "<b>Soft Mute:</b> (<A href='?src=\ref[src];mute2=\ref[M]'>Unmute</A>) (<A href='?src=\ref[src];mute_complete=\ref[M]'>Mute adminhelps</A>)"
else
body += "Voiced: (<A href='?src=\ref[src];mute2=\ref[M]'>Mute</A>)"
body += "<br><br>"
body += "<A href='?src=\ref[src];jumpto=\ref[M]'><b>Jump to</b></A> | "
body += "<A href='?src=\ref[src];getmob=\ref[M]'>Get</A>"
body += "<br><br>"
body += "<A href='?src=\ref[src];traitor=\ref[M]'>Traitor panel</A> | "
body += "<A href='?src=\ref[src];narrateto=\ref[M]'>Narrate to</A> | "
body += "<A href='?src=\ref[src];subtlemessage=\ref[M]'>Subtle message</A>"
if (M.client)
if(!istype(M, /mob/new_player))
if(!ismonkey(M))
foo += text("<A HREF='?src=\ref[src];monkeyone=\ref[M]'>Monkeyize</A> | ")
body += "<br><br>"
body += "<b>Transformation:</b>"
body += "<br>"
//Monkey
if(ismonkey(M))
body += "<B>Monkeyized</B> | "
else
foo += text("<B>Monkeyized</B> | ")
if(!iscorgi(M))
foo += text("<A HREF='?src=\ref[src];corgione=\ref[M]'>Corgize</A> | ")
body += "<A href='?src=\ref[src];monkeyone=\ref[M]'>Monkeyize</A> | "
//Corgi
if(iscorgi(M))
body += "<B>Corgized</B> | "
else
foo += text("<B>Corgized</B> | ")
body += "<A href='?src=\ref[src];corgione=\ref[M]'>Corgize</A> | "
//AI / Cyborg
if(isAI(M))
foo += text("<B>Is an AI</B> | ")
body += "<B>Is an AI</B> "
else if(ishuman(M))
foo += text("<A HREF='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | ")
foo += text("<A HREF='?src=\ref[src];makeaisilent=\ref[M]'>Make AI Silently</A> | ")
foo += text("<A HREF='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> | ")
foo += text("<A HREF='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | ")
foo += text("<A HREF='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> | ")
foo += text("<A HREF='?src=\ref[src];tdome1=\ref[M]'>Thunderdome 1</A> | ")
foo += text("<A HREF='?src=\ref[src];tdome2=\ref[M]'>Thunderdome 2</A> | ")
foo += text("<A HREF='?src=\ref[src];tdomeadmin=\ref[M]'>Thunderdome Admin</A> | ")
foo += text("<A HREF='?src=\ref[src];tdomeobserve=\ref[M]'>Thunderdome Observer</A> | ")
foo += text("<A HREF='?src=\ref[src];sendtoprison=\ref[M]'>Prison</A> | ")
// foo += text("<A HREF='?src=\ref[src];sendtomaze=\ref[M]'>Maze</A> | ")
foo += text("<A HREF='?src=\ref[src];revive=\ref[M]'>Heal/Revive</A> | ")
else
foo += text("<B>Hasn't Entered Game</B> | ")
foo += text("<A href='?src=\ref[src];forcespeech=\ref[M]'>Forcesay</A> | ")
if(M.client)
foo += text("<A href='?src=\ref[src];mute2=\ref[M]'>Mute: [(M.client.muted ? "Muted" : "Voiced")]</A> | ")
foo += text("<A href='?src=\ref[src];mute_complete=\ref[M]'>Complete mute: [(M.client.muted ? "Completely Muted" : "Voiced")]</A> | ")
else
foo += "Mute unavailable - no client"
foo += text("<A href='?src=\ref[src];boot2=\ref[M]'>Boot</A>")
foo += text("<br>")
foo += text("<A href='?src=\ref[src];jumpto=\ref[M]'>Jump to</A> | ")
foo += text("<A href='?src=\ref[src];getmob=\ref[M]'>Get</A> | ")
foo += text("<A href='?src=\ref[src];sendmob=\ref[M]'>Send</A>")
foo += text("<br>")
foo += text("<A href='?src=\ref[src];traitor=\ref[M]'>Edit mind</A> | ")
foo += text("<A href='?src=\ref[src];narrateto=\ref[M]'>Narrate to</A> | ")
foo += text("<A href='?src=\ref[src];subtlemessage=\ref[M]'>Subtle message</A>")
foo += text("<br>")
foo += text("<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> | ")
foo += text("<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A>")
dat += text("<body>[foo]</body></html>")
usr << browse(dat, "window=adminplayeropts;size=480x150")
body += "<A href='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | "
body += "<A href='?src=\ref[src];makeaisilent=\ref[M]'>Make AI Silently</A> | "
body += "<A href='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> | "
body += "<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | "
body += "<A href='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> "
body += "<br><br>"
body += "<b>Rudimentary transformation:</b><font size=2><br>These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.</font><br>"
body += "<A href='?src=\ref[src];simplemake=observer;mob=\ref[M]'>Observer</A> | "
body += "\[ Alien: <A href='?src=\ref[src];simplemake=drone;mob=\ref[M]'>Drone</A>, "
body += "<A href='?src=\ref[src];simplemake=hunter;mob=\ref[M]'>Hunter</A>, "
body += "<A href='?src=\ref[src];simplemake=queen;mob=\ref[M]'>Queen</A>, "
body += "<A href='?src=\ref[src];simplemake=sentinel;mob=\ref[M]'>Sentinel</A>, "
body += "<A href='?src=\ref[src];simplemake=larva;mob=\ref[M]'>Larva</A> \] "
body += "<A href='?src=\ref[src];simplemake=human;mob=\ref[M]'>Human</A> "
body += "\[ Metroid: <A href='?src=\ref[src];simplemake=metroid;mob=\ref[M]'>Baby</A>, "
body += "<A href='?src=\ref[src];simplemake=adultmetroid;mob=\ref[M]'>Adult</A> \] "
body += "<A href='?src=\ref[src];simplemake=monkey;mob=\ref[M]'>Monkey</A> | "
body += "<A href='?src=\ref[src];simplemake=robot;mob=\ref[M]'>Cyborg</A> | "
body += "<A href='?src=\ref[src];simplemake=cat;mob=\ref[M]'>Cat</A> | "
body += "<A href='?src=\ref[src];simplemake=runtime;mob=\ref[M]'>Runtime</A> | "
body += "<A href='?src=\ref[src];simplemake=corgi;mob=\ref[M]'>Corgi</A> | "
body += "<A href='?src=\ref[src];simplemake=ian;mob=\ref[M]'>Ian</A> | "
body += "<A href='?src=\ref[src];simplemake=crab;mob=\ref[M]'>Crab</A> | "
body += "<A href='?src=\ref[src];simplemake=coffee;mob=\ref[M]'>Coffee</A> | "
//body += "<A href='?src=\ref[src];simplemake=parrot;mob=\ref[M]'>Parrot</A> | "
//body += "<A href='?src=\ref[src];simplemake=drprofessor;mob=\ref[M]'>DrProfessor</A> | "
body += "\[ Construct: <A href='?src=\ref[src];simplemake=constructarmoured;mob=\ref[M]'>Armoured</A> , "
body += "<A href='?src=\ref[src];simplemake=constructbuilder;mob=\ref[M]'>Builder</A> , "
body += "<A href='?src=\ref[src];simplemake=constructwraith;mob=\ref[M]'>Wraith</A> \] "
body += "<A href='?src=\ref[src];simplemake=shade;mob=\ref[M]'>Shade</A>"
body += "<br>"
if (M.client)
body += "<br><br>"
body += "<b>Other actions:</b>"
body += "<br>"
body += "<A href='?src=\ref[src];forcespeech=\ref[M]'>Forcesay</A> | "
body += "<A href='?src=\ref[src];tdome1=\ref[M]'>Thunderdome 1</A> | "
body += "<A href='?src=\ref[src];tdome2=\ref[M]'>Thunderdome 2</A> | "
body += "<A href='?src=\ref[src];tdomeadmin=\ref[M]'>Thunderdome Admin</A> | "
body += "<A href='?src=\ref[src];tdomeobserve=\ref[M]'>Thunderdome Observer</A> | "
body += "<br>"
body += "</body></html>"
usr << browse(body, "window=adminplayeropts;size=550x515")
//feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -3195,47 +3246,6 @@ var/global/BSACooldown = 0
*/
/obj/admins/proc/view_txt_log()
set category = "Admin"
set desc="Shows todays server log in new window"
set name="Show Server Log"
var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")].log"
var/output = {"<html>
<head>
<title>[time2text(world.realtime,"Day, MMM DD, YYYY")] - Log</title>
</head>
<body>
<pre>
[file2text(path)]
</pre>
</body>
</html>"}
usr << browse(output,"window=server_logfile")
onclose(usr,"server_logfile")
//feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/obj/admins/proc/view_atk_log()
set category = "Admin"
set desc="Shows todays server attack log in new window"
set name="Show Server Attack Log"
var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")] Attack.log"
var/output = {"<html>
<head>
<title>[time2text(world.realtime,"Day, MMM DD, YYYY")] - Attack Log</title>
</head>
<body>
<pre>
[file2text(path)]
</pre>
</body>
</html>"}
usr << browse(output,"window=server_logfile")
onclose(usr,"server_logfile")
// feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/*/client/proc/unjobban_panel()
set name = "Unjobban Panel"
set category = "Admin"

View File

@@ -64,7 +64,7 @@
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/cmd_admin_drop_everything
//verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
if ("Admin Candidate")
@@ -127,11 +127,11 @@
verbs += /obj/admins/proc/votekill
verbs += /obj/admins/proc/show_player_panel
verbs += /client/proc/deadchat //toggles deadchat
verbs += /client/proc/cmd_admin_mute
//verbs += /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/warn
//verbs += /client/proc/warn - was never used
verbs += /client/proc/dsay
verbs += /client/proc/admin_play
verbs += /client/proc/admin_observe
@@ -140,7 +140,7 @@
verbs += /client/proc/player_panel_new
verbs += /client/proc/unban_panel
verbs += /client/proc/jobbans
verbs += /client/proc/playernotes
verbs += /client/proc/voting
verbs += /client/proc/hide_verbs
verbs += /client/proc/general_report
@@ -148,6 +148,7 @@
verbs += /client/proc/deadmin_self
//verbs += /client/proc/cmd_admin_prison --Merged with player panel
//verbs += /obj/admins/proc/unprison --Merged with player panel
verbs += /client/proc/playernotes
verbs += /obj/admins/proc/show_skills
else return
@@ -169,6 +170,7 @@
if (holder.level >= 2)
verbs += /client/proc/cmd_admin_add_random_ai_law
verbs += /client/proc/secrets
verbs += /client/proc/check_antagonists
verbs += /client/proc/play_sound
verbs += /client/proc/stealth
verbs += /client/proc/deadmin_self
@@ -183,7 +185,8 @@
verbs += /obj/admins/proc/view_atk_log
verbs += /obj/admins/proc/toggleaban //abandon mob
verbs += /obj/admins/proc/show_traitor_panel
verbs += /client/proc/cmd_admin_remove_plasma
verbs += /client/proc/getserverlog //fetch an old serverlog to look at
//verbs += /client/proc/cmd_admin_remove_plasma --This proc is outdated, does not do anything
verbs += /client/proc/admin_call_shuttle
verbs += /client/proc/admin_cancel_shuttle
verbs += /client/proc/cmd_admin_dress
@@ -195,6 +198,7 @@
verbs += /client/proc/toggleadminhelpsound
verbs += /proc/possess
verbs += /proc/release
verbs += /client/proc/make_tajaran
verbs += /client/proc/admin_deny_shuttle
verbs += /client/proc/cmd_admin_christmas
verbs += /client/proc/editappear
@@ -227,7 +231,7 @@
//verbs += /proc/togglebuildmode --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/debug_master_controller
else return
//Game Admin
@@ -239,13 +243,11 @@
verbs += /client/proc/cmd_admin_world_narrate
verbs += /client/proc/cmd_debug_del_all
verbs += /client/proc/cmd_debug_tog_aliens
verbs += /client/proc/ticklag
verbs += /client/proc/mapload
// verbs += /client/proc/mapload
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/cmd_admin_grantfullaccess
verbs += /client/proc/kill_airgroup
verbs += /client/proc/cmd_admin_drop_everything
//verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
verbs += /client/proc/send_space_ninja
@@ -273,7 +275,6 @@
verbs += /client/proc/delbook
verbs += /client/proc/Force_Event_admin
verbs += /client/proc/radioalert
verbs += /client/proc/make_tajaran
verbs += /client/proc/CarbonCopy
verbs += /client/proc/jump_to_dead_group
else return
@@ -285,11 +286,13 @@
verbs += /client/proc/get_admin_state
verbs += /client/proc/reload_admins
verbs += /client/proc/cmd_debug_make_powernets
verbs += /client/proc/enable_debug_verbs
verbs += /client/proc/everyone_random
verbs += /client/proc/only_one
verbs += /client/proc/deadmin_self
verbs += /client/proc/getruntimelog //used by coders to retrieve runtime logs
verbs += /client/proc/enable_mapping_debug
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs += /client/proc/cinematic //used by coders to retrieve runtime logs
verbs += /client/proc/enable_debug_verbs
verbs += /client/proc/kill_air
verbs += /client/proc/callprocgen
verbs += /client/proc/callprocobj
@@ -344,12 +347,10 @@
verbs -= /client/proc/Cell
verbs -= /client/proc/cmd_debug_del_all
verbs -= /client/proc/cmd_debug_tog_aliens
verbs -= /client/proc/ticklag
verbs -= /client/proc/mapload
// verbs -= /client/proc/mapload
verbs -= /client/proc/check_words
verbs -= /client/proc/drop_bomb
verbs -= /client/proc/cmd_admin_grantfullaccess
verbs -= /client/proc/cmd_admin_drop_everything
//verbs -= /client/proc/cmd_admin_drop_everything --merged with view variables
verbs -= /client/proc/make_sound
verbs -= /client/proc/only_one
verbs -= /client/proc/send_space_ninja
@@ -369,7 +370,7 @@
verbs -= /client/proc/cmd_admin_rejuvenate
verbs -= /client/proc/cmd_admin_delete
verbs -= /client/proc/toggleadminhelpsound
verbs -= /client/proc/cmd_admin_remove_plasma
//verbs -= /client/proc/cmd_admin_remove_plasma --This proc is outdated, does not do anything
verbs -= /client/proc/admin_call_shuttle
verbs -= /client/proc/admin_cancel_shuttle
verbs -= /client/proc/cmd_admin_dress
@@ -377,17 +378,18 @@
verbs -= /client/proc/spawn_xeno
verbs -= /client/proc/cmd_admin_add_random_ai_law
verbs -= /client/proc/secrets
verbs -= /client/proc/check_antagonists
verbs -= /client/proc/play_sound
verbs -= /client/proc/stealth
verbs -= /client/proc/cmd_admin_check_contents
verbs -= /client/proc/cmd_admin_create_centcom_report
verbs -= /client/proc/deadchat //toggles deadchat
verbs -= /client/proc/cmd_admin_mute
//verbs -= /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro
verbs -= /client/proc/cmd_admin_pm_context
verbs -= /client/proc/cmd_admin_pm_panel
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_subtle_message
verbs -= /client/proc/warn
//verbs -= /client/proc/warn
verbs -= /client/proc/dsay
verbs -= /client/proc/admin_play
verbs -= /client/proc/admin_observe
@@ -403,6 +405,7 @@
verbs -= /client/proc/cmd_admin_gib_self
verbs -= /client/proc/restartcontroller
verbs -= /client/proc/play_local_sound
verbs -= /client/proc/enable_debug_verbs
verbs -= /client/proc/toggleprayers
verbs -= /client/proc/Blobize
verbs -= /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
@@ -416,6 +419,9 @@
verbs -= /client/proc/deadmin_self
verbs -= /client/proc/jumptocoord
verbs -= /client/proc/everyone_random
verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs -= /client/proc/getserverlog
verbs -= /client/proc/cinematic //show a cinematic sequence
verbs -= /client/proc/cmd_admin_change_custom_event
verbs -= /client/proc/admin_invis
verbs -= /client/proc/callprocgen
@@ -425,9 +431,7 @@
verbs -= /client/proc/Force_Event_admin
verbs -= /client/proc/radioalert
verbs -= /client/proc/rnd_check_designs
verbs -= /client/proc/make_tajaran
verbs -= /client/proc/CarbonCopy
verbs -= /client/proc/getruntimelog //used by coders to retrieve runtime logs
verbs -= /proc/possess
verbs -= /proc/release
//verbs -= /client/proc/give_spell --Merged with view variables
@@ -445,13 +449,15 @@
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
verbs -= /client/proc/kill_airgroup
verbs -= /client/proc/debug_master_controller
verbs -= /client/proc/make_tajaran
verbs -= /client/proc/admin_deny_shuttle
verbs -= /client/proc/cmd_admin_christmas
verbs -= /client/proc/editappear
verbs -= /client/proc/jump_to_dead_group
verbs -= /client/proc/playernotes
verbs -= /obj/admins/proc/show_skills
verbs -= /client/proc/enable_mapping_debug
verbs -= /client/proc/enable_debug_verbs
return
@@ -524,6 +530,14 @@
// feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/check_antagonists()
set name = "Check Antagonists"
set category = "Admin"
if(holder)
holder.check_antagonists()
//feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/jobbans()
set name = "Unjobban Panel"
set category = "Admin"
@@ -622,7 +636,7 @@
log_admin("[ckey] warned [M.ckey], resulting in a [AUTOBANTIME] minute autoban.")
ban_unban_log_save("[ckey] warned [M.ckey], resulting in a [AUTOBANTIME] minute autoban.")
message_admins("\blue [ckey] warned [M.ckey], resulting in a [AUTOBANTIME] minute autoban.")
feedback_inc("ban_warn",1)
//feedback_inc("ban_warn",1)
del(M.client)
// feedback_add_details("admin_verb","WARN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -662,6 +676,8 @@
if(!S) return
T.spell_list += new S
// feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Special Verbs"
@@ -673,7 +689,9 @@
return
for (var/mob/V in hearers(O))
V.show_message(message, 2)
// feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound")
message_admins("\blue [key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound", 1)
// feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/togglebuildmodeself()
@@ -716,6 +734,8 @@
kill_air = 1
usr << "<b>Disabled air processing.</b>"
// feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
/client/proc/show_verbs()
set name = "Toggle admin verb visibility"

View File

@@ -15,7 +15,7 @@
var/quick_create_object_html = null
var/pathtext = null
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/machinery")
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/item/weapon","/obj/machinery")
var path = text2path(pathtext)

File diff suppressed because it is too large Load Diff

View File

@@ -1,797 +0,0 @@
//GUYS REMEMBER TO ADD A += to UPDATE_ADMINS
//AND A -= TO CLEAR_ADMIN_VERBS
//Some verbs that are still in the code but not used atm
// Debug
// verbs += /client/proc/radio_report //for radio debugging dont think its been used in a very long time
// verbs += /client/proc/fix_next_move //has not been an issue in a very very long time
// Mapping helpers added via enable_debug_verbs verb
// verbs += /client/proc/do_not_use_these
// verbs += /client/proc/camera_view
// verbs += /client/proc/sec_camera_report
// verbs += /client/proc/intercom_view
// verbs += /client/proc/air_status //Air things
// verbs += /client/proc/Cell //More air things
/client/proc/update_admins(var/rank)
if(!holder)
holder = new /obj/admins(src)
holder.rank = rank
if(!holder.state)
var/state = alert("Which state do you want the admin to begin in?", "Admin-state", "Play", "Observe", "Neither")
if(state == "Play")
holder.state = 1
admin_play()
return
else if(state == "Observe")
holder.state = 2
admin_observe()
return
else
del(holder)
return
switch (rank)
if ("Game Master")
holder.level = 6
if ("Senior Game Admin")
holder.level = 5
if ("Game Admin")
holder.level = 4
if ("Secondary Game Admin")
holder.level = 3
if ("Trial Admin")
holder.level = 2
if(holder.state == 2) // if observing
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/toggle_view_range
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/cmd_admin_drop_everything
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
if ("Temporary Admin")
holder.level = 1
if(holder.state == 2) // if observing
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/toggle_view_range
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/cmd_admin_drop_everything
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
if ("Moderator")
holder.level = 0
if ("Admin Observer")
holder.level = -1
if ("Banned")
holder.level = -2
del(src)
return
else
del(holder)
return
if (holder) //THE BELOW handles granting powers. The above is for special cases only!
holder.owner = src
//Admin Observer
if (holder.level >= -1)
verbs += /client/proc/cmd_admin_say
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadmin_self
else return
//Moderator
if (holder.level >= 0)
verbs += /obj/admins/proc/announce
verbs += /obj/admins/proc/startnow
verbs += /obj/admins/proc/toggleAI //Toggle the AI
verbs += /obj/admins/proc/toggleenter //Toggle enterting
verbs += /obj/admins/proc/toggleguests //Toggle guests entering
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc
verbs += /obj/admins/proc/voteres //toggle votes
verbs += /obj/admins/proc/vmode
verbs += /obj/admins/proc/votekill
verbs += /obj/admins/proc/show_player_panel
verbs += /client/proc/deadchat //toggles deadchat
verbs += /client/proc/cmd_admin_mute
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/warn
verbs += /client/proc/dsay
verbs += /client/proc/admin_play
verbs += /client/proc/admin_observe
verbs += /client/proc/game_panel
verbs += /client/proc/player_panel
verbs += /client/proc/player_panel_new
verbs += /client/proc/unban_panel
verbs += /client/proc/jobbans
verbs += /client/proc/unjobban_panel
verbs += /client/proc/voting
verbs += /client/proc/hide_verbs
verbs += /client/proc/general_report
verbs += /client/proc/air_report
verbs += /client/proc/deadmin_self
//verbs += /client/proc/cmd_admin_prison --Merged with player panel
//verbs += /obj/admins/proc/unprison --Merged with player panel
else return
//Temporary Admin
if (holder.level >= 1)
deadchat = 1
seeprayers = 1
verbs += /obj/admins/proc/toggleaban //abandon mob
verbs += /obj/admins/proc/show_traitor_panel
verbs += /client/proc/cmd_admin_remove_plasma
verbs += /client/proc/admin_call_shuttle
verbs += /client/proc/admin_cancel_shuttle
verbs += /client/proc/cmd_admin_dress
verbs += /client/proc/respawn_character
verbs += /client/proc/spawn_xeno
verbs += /client/proc/toggleprayers
verbs += /client/proc/deadmin_self
verbs += /client/proc/tension_report
verbs += /client/proc/toggleadminhelpsound
verbs += /client/proc/cmd_admin_add_random_ai_law
verbs += /client/proc/secrets
verbs += /client/proc/play_sound
verbs += /client/proc/stealth
verbs += /obj/admins/proc/delay //game start delay
verbs += /obj/admins/proc/immreboot //immediate reboot
verbs += /obj/admins/proc/restart //restart
verbs += /client/proc/cmd_admin_check_contents
verbs += /client/proc/cmd_admin_create_centcom_report
verbs += /client/proc/toggle_hear_deadcast
verbs += /client/proc/toggle_hear_radio
verbs += /proc/possess
verbs += /proc/release
verbs += /client/proc/deadmin_self
else return
/* //Trial Admin
if (holder.level >= 2)
else return
*/
//Secondary Game Admin
if (holder.level >= 3)
verbs += /obj/admins/proc/view_txt_log
verbs += /obj/admins/proc/view_atk_log
verbs += /obj/admins/proc/spawn_atom
verbs += /client/proc/cmd_admin_list_open_jobs
verbs += /client/proc/cmd_admin_direct_narrate
verbs += /client/proc/kill_air
verbs += /client/proc/cmd_admin_world_narrate
verbs += /client/proc/cmd_debug_del_all
verbs += /client/proc/cmd_debug_tog_aliens
verbs += /client/proc/mapload
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/cmd_admin_grantfullaccess
verbs += /client/proc/cmd_admin_drop_everything
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
verbs += /client/proc/send_space_ninja
verbs += /client/proc/restartcontroller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/Blobize //I need to remember to move/remove this later
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the new clickproc is being tested)
verbs += /client/proc/toggle_gravity_on
verbs += /client/proc/toggle_gravity_off
verbs += /client/proc/toggle_random_events
verbs += /obj/admins/proc/adrev //toggle admin revives
verbs += /obj/admins/proc/adspawn //toggle admin item spawning
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/Debug2 //debug toggle switch
verbs += /client/proc/toggle_view_range
verbs += /client/proc/Getmob
verbs += /client/proc/Getkey
verbs += /client/proc/sendmob
verbs += /client/proc/Jump
verbs += /client/proc/jumptokey
verbs += /client/proc/jumptomob
verbs += /client/proc/jumptoturf
verbs += /client/proc/cmd_admin_delete
verbs += /client/proc/cmd_admin_add_freeform_ai_law
verbs += /client/proc/cmd_admin_add_random_ai_law
verbs += /client/proc/cmd_admin_rejuvenate
verbs += /client/proc/hide_most_verbs
verbs += /client/proc/jumptocoord
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/deadmin_self
//verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs += /client/proc/cmd_admin_explosion --Merged with view variables
//verbs += /client/proc/cmd_admin_emp --Merged with view variables
//verbs += /client/proc/give_spell --Merged with view variables
//verbs += /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs += /client/proc/cmd_switch_radio --removed as tcommsat is staying
else return
//Game Admin
if (holder.level >= 4)
verbs += /client/proc/ticklag
else return
//Senior Game admin
if (holder.level >= 5)
verbs += /client/proc/colorooc
verbs += /client/proc/strike_team
verbs += /client/proc/everyone_random
verbs += /client/proc/only_one
verbs += /obj/admins/proc/toggle_aliens //toggle aliens
verbs += /obj/admins/proc/toggle_space_ninja //toggle ninjas
verbs += /client/proc/deadmin_self
else return
//Game Master
if (holder.level >= 6)
verbs += /obj/admins/proc/adjump
verbs += /client/proc/callproc
verbs += /client/proc/triple_ai
verbs += /client/proc/get_admin_state
verbs += /client/proc/reload_admins
verbs += /client/proc/cmd_debug_make_powernets
verbs += /client/proc/object_talk
verbs += /client/proc/enable_debug_verbs
verbs += /client/proc/deadmin_self
else return
return
/client/proc/clear_admin_verbs()
deadchat = 0
verbs -= /obj/admins/proc/vmode
verbs -= /obj/admins/proc/votekill
verbs -= /obj/admins/proc/announce
verbs -= /obj/admins/proc/startnow
verbs -= /obj/admins/proc/toggleAI //Toggle the AI
verbs -= /obj/admins/proc/toggleenter //Toggle enterting
verbs -= /obj/admins/proc/toggleguests //Toggle guests entering
verbs -= /obj/admins/proc/toggleooc //toggle ooc
verbs -= /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc
verbs -= /obj/admins/proc/voteres //toggle votes
verbs -= /obj/admins/proc/delay //game start delay
verbs -= /obj/admins/proc/immreboot //immediate reboot
verbs -= /obj/admins/proc/restart //restart
verbs -= /obj/admins/proc/show_traitor_panel
verbs -= /obj/admins/proc/show_player_panel
verbs -= /obj/admins/proc/toggle_aliens //toggle aliens
verbs -= /obj/admins/proc/toggle_space_ninja //toggle ninjas
verbs -= /obj/admins/proc/adjump
verbs -= /obj/admins/proc/view_txt_log
verbs -= /obj/admins/proc/view_atk_log
verbs -= /obj/admins/proc/spawn_atom
verbs -= /obj/admins/proc/adrev //toggle admin revives
verbs -= /obj/admins/proc/adspawn //toggle admin item spawning
verbs -= /obj/admins/proc/toggleaban //abandon mob
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/hide_most_verbs
verbs -= /client/proc/show_verbs
verbs -= /client/proc/colorooc
verbs -= /client/proc/triple_ai
verbs -= /client/proc/get_admin_state
verbs -= /client/proc/reload_admins
verbs -= /client/proc/kill_air
verbs -= /client/proc/cmd_debug_make_powernets
verbs -= /client/proc/object_talk
verbs -= /client/proc/strike_team
verbs -= /client/proc/cmd_admin_list_open_jobs
verbs -= /client/proc/cmd_admin_direct_narrate
verbs -= /client/proc/cmd_admin_world_narrate
verbs -= /client/proc/callproc
verbs -= /client/proc/Cell
verbs -= /client/proc/cmd_debug_del_all
verbs -= /client/proc/cmd_debug_tog_aliens
verbs -= /client/proc/ticklag
verbs -= /client/proc/mapload
verbs -= /client/proc/check_words
verbs -= /client/proc/drop_bomb
verbs -= /client/proc/cmd_admin_grantfullaccess
verbs -= /client/proc/cmd_admin_drop_everything
verbs -= /client/proc/make_sound
verbs -= /client/proc/only_one
verbs -= /client/proc/send_space_ninja
verbs -= /client/proc/debug_variables
verbs -= /client/proc/cmd_modify_ticker_variables
verbs -= /client/proc/Debug2 //debug toggle switch
verbs -= /client/proc/toggle_view_range
verbs -= /client/proc/Getmob
verbs -= /client/proc/Getkey
verbs -= /client/proc/sendmob
verbs -= /client/proc/Jump
verbs -= /client/proc/jumptokey
verbs -= /client/proc/jumptomob
verbs -= /client/proc/jumptoturf
verbs -= /client/proc/cmd_admin_add_freeform_ai_law
verbs -= /client/proc/cmd_admin_add_random_ai_law
verbs -= /client/proc/cmd_admin_rejuvenate
verbs -= /client/proc/cmd_admin_delete
verbs -= /client/proc/toggleadminhelpsound
verbs -= /client/proc/cmd_admin_remove_plasma
verbs -= /client/proc/admin_call_shuttle
verbs -= /client/proc/admin_cancel_shuttle
verbs -= /client/proc/cmd_admin_dress
verbs -= /client/proc/respawn_character
verbs -= /client/proc/spawn_xeno
verbs -= /client/proc/cmd_admin_add_random_ai_law
verbs -= /client/proc/secrets
verbs -= /client/proc/play_sound
verbs -= /client/proc/stealth
verbs -= /client/proc/cmd_admin_check_contents
verbs -= /client/proc/cmd_admin_create_centcom_report
verbs -= /client/proc/deadchat //toggles deadchat
verbs -= /client/proc/cmd_admin_mute
verbs -= /client/proc/cmd_admin_pm_context
verbs -= /client/proc/cmd_admin_pm_panel
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_subtle_message
verbs -= /client/proc/warn
verbs -= /client/proc/dsay
verbs -= /client/proc/admin_play
verbs -= /client/proc/admin_observe
verbs -= /client/proc/game_panel
verbs -= /client/proc/player_panel
verbs -= /client/proc/unban_panel
verbs -= /client/proc/jobbans
verbs -= /client/proc/unjobban_panel
verbs -= /client/proc/voting
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/general_report
verbs -= /client/proc/air_report
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_gib_self
verbs -= /client/proc/restartcontroller
verbs -= /client/proc/play_local_sound
verbs -= /client/proc/enable_debug_verbs
verbs -= /client/proc/toggleprayers
verbs -= /client/proc/Blobize
verbs -= /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
verbs -= /client/proc/toggle_hear_deadcast
verbs -= /client/proc/toggle_hear_radio
verbs -= /client/proc/tension_report
verbs -= /client/proc/player_panel_new
verbs -= /client/proc/toggle_gravity_on
verbs -= /client/proc/toggle_gravity_off
verbs -= /client/proc/toggle_random_events
verbs -= /client/proc/deadmin_self
verbs -= /client/proc/jumptocoord
verbs -= /client/proc/everyone_random
verbs -= /proc/possess
verbs -= /proc/release
//verbs -= /client/proc/give_spell --Merged with view variables
//verbs -= /client/proc/cmd_admin_ninjafy --Merged with view variables
//verbs -= /client/proc/cmd_modify_object_variables --Merged with view variables
//verbs -= /client/proc/cmd_admin_explosion --Merged with view variables
//verbs -= /client/proc/cmd_admin_emp --Merged with view variables
//verbs -= /client/proc/cmd_admin_godmode --Merged with view variables
//verbs -= /client/proc/cmd_admin_gib --Merged with view variables
//verbs -= /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs -= /client/proc/cmd_admin_attack_log --Merged with view variables
//verbs -= /proc/togglebuildmode --Merged with view variables
//verbs -= /client/proc/cmd_admin_prison --Merged with player panel
//verbs -= /obj/admins/proc/unprison --Merged with player panel
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
return
/client/proc/admin_observe()
set category = "Admin"
set name = "Set Observe"
if(!holder)
alert("You are not an admin")
return
verbs -= /client/proc/admin_play
spawn( 1200 )
verbs += /client/proc/admin_play
var/rank = holder.rank
clear_admin_verbs()
holder.state = 2
update_admins(rank)
if(!istype(mob, /mob/dead/observer))
mob.adminghostize(1)
src << "\blue You are now observing"
/client/proc/admin_play()
set category = "Admin"
set name = "Set Play"
if(!holder)
alert("You are not an admin")
return
verbs -= /client/proc/admin_observe
spawn( 1200 )
verbs += /client/proc/admin_observe
var/rank = holder.rank
clear_admin_verbs()
holder.state = 1
update_admins(rank)
if(istype(mob, /mob/dead/observer))
mob:reenter_corpse()
src << "\blue You are now playing"
/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]"
/client/proc/player_panel()
set name = "Player Panel"
set category = "Admin"
if(holder)
holder.player_panel_old()
return
/client/proc/player_panel_new()
set name = "Player Panel-New"
set category = "Admin"
if(holder)
holder.player_panel_new()
return
/client/proc/jobbans()
set name = "Display Job bans"
set category = "Admin"
if(holder)
holder.Jobbans()
return
/client/proc/unban_panel()
set name = "Unban Panel"
set category = "Admin"
if(holder)
holder.unbanpanel()
return
/client/proc/game_panel()
set name = "Game Panel"
set category = "Admin"
if(holder)
holder.Game()
return
/client/proc/secrets()
set name = "Secrets"
set category = "Admin"
if (holder)
holder.Secrets()
return
/client/proc/voting()
set name = "Voting"
set category = "Admin"
if (holder)
holder.Voting()
/client/proc/colorooc()
set category = "Fun"
set name = "OOC Text Color"
ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color
return
/client/proc/stealth()
set category = "Admin"
set name = "Stealth Mode"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
stealth = !stealth
if(stealth)
var/new_key = trim(input("Enter your desired display name.", "Fake Key", key))
if(!new_key)
stealth = 0
return
new_key = strip_html(new_key)
if(length(new_key) >= 26)
new_key = copytext(new_key, 1, 26)
fakekey = new_key
else
fakekey = null
log_admin("[key_name(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]", 1)
#define AUTOBATIME 10
/client/proc/warn(var/mob/M in world)
set category = "Special Verbs"
set name = "Warn"
set desc = "Warn a player"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if(M.client && M.client.holder && (M.client.holder.level >= holder.level))
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if(!M.client.warned)
M << "\red <B>You have been warned by an administrator. This is the only warning you will recieve.</B>"
M.client.warned = 1
message_admins("\blue [ckey] warned [M.ckey].")
else
AddBan(M.ckey, M.computer_id, "Autobanning due to previous warn", ckey, 1, AUTOBATIME)
M << "\red<BIG><B>You have been autobanned by [ckey]. This is what we in the biz like to call a \"second warning\".</B></BIG>"
M << "\red This is a temporary ban; it will automatically be removed in [AUTOBATIME] minutes."
log_admin("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
ban_unban_log_save("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
message_admins("\blue [ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
feedback_inc("ban_warn",1)
del(M.client)
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Special Verbs"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
var/turf/epicenter = mob.loc
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb")
var/choice = input("What size explosion would you like to produce?") in choices
switch(choice)
if(null)
return 0
if("Small Bomb")
explosion(epicenter, 1, 2, 3, 3)
if("Medium Bomb")
explosion(epicenter, 2, 3, 4, 4)
if("Big Bomb")
explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
var/devastation_range = input("Devastation range (in tiles):") as num
var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
var/light_impact_range = input("Light impact range (in tiles):") as num
var/flash_range = input("Flash range (in tiles):") as num
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].")
/client/proc/give_spell(mob/T as mob in world) // -- Urist
set category = "Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
if(!S) return
T.spell_list += new S
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Special Verbs"
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(O)
var/message = input("What do you want the message to be?", "Make Sound") as text|null
if(!message)
return
for (var/mob/V in hearers(O))
V.show_message(message, 2)
/client/proc/togglebuildmodeself()
set name = "Toggle Build Mode Self"
set category = "Special Verbs"
if(src.mob)
togglebuildmode(src.mob)
/client/proc/toggleadminhelpsound()
set name = "Toggle Adminhelp Sound"
set category = "Admin"
sound_adminhelp = !sound_adminhelp
if(sound_adminhelp)
usr << "You will now hear a sound when adminhelps arrive"
else
usr << "You will no longer hear a sound when adminhelps arrive"
/client/proc/object_talk(var/msg as text) // -- TLE
set category = "Special Verbs"
set name = "oSay"
set desc = "Display a message to everyone who can hear the target"
if(mob.control_object)
if(!msg)
return
for (var/mob/V in hearers(mob.control_object))
V.show_message("<b>[mob.control_object.name]</b> says: \"" + msg + "\"", 2)
/client/proc/kill_air() // -- TLE
set category = "Debug"
set name = "Kill Air"
set desc = "Toggle Air Processing"
if(kill_air)
kill_air = 0
usr << "<b>Enabled air processing.</b>"
else
kill_air = 1
usr << "<b>Disabled air processing.</b>"
/client/proc/show_verbs()
set name = "Toggle admin verb visibility"
set category = "Admin"
src << "Restoring admin verbs back"
var/temp = deadchat
clear_admin_verbs()
update_admins(holder.rank)
deadchat = temp
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
set name = "Toggle NewClickProc"
set category = "Admin"
if(!holder) return
using_new_click_proc = !using_new_click_proc
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
/client/proc/toggle_hear_deadcast()
set name = "Toggle Hear Deadcast"
set category = "Admin"
if(!holder) return
STFU_ghosts = !STFU_ghosts
usr << "You will now [STFU_ghosts ? "not hear" : "hear"] ghosts"
/client/proc/toggle_hear_radio()
set name = "Toggle Hear Radio"
set category = "Admin"
if(!holder) return
STFU_radio = !STFU_radio
usr << "You will now [STFU_radio ? "not hear" : "hear"] radio chatter from nearby radios or speakers"
/client/proc/deadmin_self()
set name = "De-admin self"
set category = "Admin"
if(src.holder)
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
del(holder)
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.", 1)
src.clear_admin_verbs()
src.update_admins(null)
admins.Remove(src.ckey)
usr << "You are now a normal player."
/client/proc/startSinglo()
set name = "Singlo Starter"
set category = "Debug"
set desc = "Starts a self-sustaining, stable singlo. This artifical singlo does not have a gravitational pull."
for(var/obj/machinery/emitter/E in world)
if(E.anchored)
E.active = 1
for(var/obj/machinery/field_generator/F in world)
if(F.anchored)
F.Varedit_start = 1
spawn(30)
for(var/obj/machinery/the_singularitygen/G in world)
if(G.anchored)
var/obj/machinery/singularity/S = new /obj/machinery/singularity(get_turf(G), 50)
spawn(0)
del(G)
S.energy = 1750
S.current_size = 7
S.icon = '224x224.dmi'
S.icon_state = "singularity_s7"
S.pixel_x = -96
S.pixel_y = -96
S.grav_pull = 0
//S.consume_range = 3
S.dissipate = 0
//S.dissipate_delay = 10
//S.dissipate_track = 0
//S.dissipate_strength = 10
for(var/obj/machinery/power/rad_collector/Rad in world)
if(Rad.anchored)
if(!Rad.P)
var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad)
Plasma.air_contents.toxins = 70
Rad.drainratio = 0
Rad.P = Plasma
Plasma.loc = Rad
if(!Rad.active)
Rad.toggle_power()
for(var/obj/machinery/power/smes/SMES in world)
if(SMES.anchored)
SMES.chargemode = 1
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
set name = "Toggle most admin verb visibility"
set category = "Admin"
src << "Hiding most admin verbs"
var/temp = deadchat
clear_admin_verbs()
deadchat = temp
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/hide_most_verbs
verbs += /client/proc/show_verbs
if(holder.level >= 5)//Senior Game Admin********************************************************************
verbs += /client/proc/colorooc
if(holder.level >= 3)//Secondary Game admin********************************************************************
verbs += /client/proc/debug_variables
//verbs += /client/proc/cmd_modify_object_variables --merged with view vairiables
verbs += /client/proc/Jump
verbs += /client/proc/jumptoturf
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/dsay
verbs += /client/proc/admin_play
verbs += /client/proc/admin_observe
verbs += /client/proc/game_panel
verbs += /client/proc/player_panel
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/cmd_admin_pm_context
verbs += /client/proc/cmd_admin_pm_panel
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadchat //toggles deadchat
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /client/proc/cmd_admin_say//asay
verbs += /client/proc/toggleadminhelpsound
return
/client/proc/hide_verbs()
set name = "Toggle admin verb visibility"
set category = "Admin"
src << "Hiding almost all admin verbs"
var/temp = deadchat
clear_admin_verbs()
deadchat = temp
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/hide_most_verbs
verbs += /client/proc/show_verbs
verbs += /client/proc/deadchat //toggles deadchat
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /client/proc/cmd_admin_say//asay
return

View File

@@ -1,502 +0,0 @@
var/list/forbidden_varedit_object_types = list(
/obj/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea.
/obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering
/datum/feedback_variable //Prevents people messing with feedback gathering
)
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world)
set category = "Debug"
set name = "Edit Variables"
set desc="(target) Edit a target item's variables"
src.modify_variables(O)
/client/proc/cmd_modify_ticker_variables()
set category = "Debug"
set name = "Edit Ticker Variables"
if (ticker == null)
src << "Game hasn't started yet."
else
src.modify_variables(ticker)
/client/proc/mod_list_add_ass() //haha
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
var/var_value = null
switch(class)
if("text")
var_value = input("Enter new text:","Text") as null|text
if("num")
var_value = input("Enter new number:","Num") as null|num
if("type")
var_value = input("Enter type:","Type") as null|anything in typesof(/obj,/mob,/area,/turf)
if("reference")
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as null|mob in world
if("file")
var_value = input("Pick file:","File") as null|file
if("icon")
var_value = input("Pick icon:","Icon") as null|icon
if("marked datum")
var_value = holder.marked_datum
if(!var_value) return
return var_value
/client/proc/mod_list_add(var/list/L)
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type") as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
var/var_value = null
switch(class)
if("text")
var_value = input("Enter new text:","Text") as text
if("num")
var_value = input("Enter new number:","Num") as num
if("type")
var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
var_value = input("Select reference:","Reference") as mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as mob in world
if("file")
var_value = input("Pick file:","File") as file
if("icon")
var_value = input("Pick icon:","Icon") as icon
if("marked datum")
var_value = holder.marked_datum
if(!var_value) return
switch(alert("Would you like to associate a var with the list entry?",,"Yes","No"))
if("Yes")
L += var_value
L[var_value] = mod_list_add_ass() //haha
if("No")
L += var_value
/client/proc/mod_list(var/list/L)
if(!istype(L,/list)) src << "Not a List."
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
var/list/names = sortList(L)
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
if(variable == "(ADD VAR)")
mod_list_add(L)
return
if(!variable)
return
var/default
var/dir
if (locked.Find(variable) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")))
return
if(isnull(variable))
usr << "Unable to determine variable type."
else if(isnum(variable))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
else if(istext(variable))
usr << "Variable appears to be <b>TEXT</b>."
default = "text"
else if(isloc(variable))
usr << "Variable appears to be <b>REFERENCE</b>."
default = "reference"
else if(isicon(variable))
usr << "Variable appears to be <b>ICON</b>."
variable = "\icon[variable]"
default = "icon"
else if(istype(variable,/atom) || istype(variable,/datum))
usr << "Variable appears to be <b>TYPE</b>."
default = "type"
else if(istype(variable,/list))
usr << "Variable appears to be <b>LIST</b>."
default = "list"
else if(istype(variable,/client))
usr << "Variable appears to be <b>CLIENT</b>."
default = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
default = "file"
usr << "Variable contains: [variable]"
if(dir)
switch(variable)
if(1)
dir = "NORTH"
if(2)
dir = "SOUTH"
if(4)
dir = "EAST"
if(8)
dir = "WEST"
if(5)
dir = "NORTHEAST"
if(6)
dir = "SOUTHEAST"
if(9)
dir = "NORTHWEST"
if(10)
dir = "SOUTHWEST"
else
dir = null
if(dir)
usr << "If a direction, direction is: [dir]"
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
switch(class)
if("list")
mod_list(variable)
if("restore to default")
variable = initial(variable)
if("edit referenced object")
modify_variables(variable)
if("(DELETE FROM LIST)")
L -= variable
return
if("text")
variable = input("Enter new text:","Text",\
variable) as text
if("num")
variable = input("Enter new number:","Num",\
variable) as num
if("type")
variable = input("Enter type:","Type",variable) \
in typesof(/obj,/mob,/area,/turf)
if("reference")
variable = input("Select reference:","Reference",\
variable) as mob|obj|turf|area in world
if("mob reference")
variable = input("Select reference:","Reference",\
variable) as mob in world
if("file")
variable = input("Pick file:","File",variable) \
as file
if("icon")
variable = input("Pick icon:","Icon",variable) \
as icon
if("marked datum")
variable = holder.marked_datum
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
usr << "\red It is forbidden to edit this object's variables."
return
var/class
var/variable
var/var_value
if(param_var_name)
if(!param_var_name in O.vars)
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
return
if (param_var_name == "holder" && holder.rank != "Game Master")
src << "No. Stop being stupid."
return
if (locked.Find(param_var_name) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")))
src << "Editing this variable requires you to be a game master or game admin."
return
variable = param_var_name
var_value = O.vars[variable]
if(autodetect_class)
if(isnull(var_value))
usr << "Unable to determine variable type."
class = null
autodetect_class = null
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
class = "num"
dir = 1
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
class = "text"
else if(isloc(var_value))
usr << "Variable appears to be <b>REFERENCE</b>."
class = "reference"
else if(isicon(var_value))
usr << "Variable appears to be <b>ICON</b>."
var_value = "\icon[var_value]"
class = "icon"
else if(istype(var_value,/atom) || istype(var_value,/datum))
usr << "Variable appears to be <b>TYPE</b>."
class = "type"
else if(istype(var_value,/list))
usr << "Variable appears to be <b>LIST</b>."
class = "list"
else if(istype(var_value,/client))
usr << "Variable appears to be <b>CLIENT</b>."
class = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
class = "file"
else
var/list/names = list()
for (var/V in O.vars)
names += V
names = sortList(names)
variable = input("Which var?","Var") as null|anything in names
if(!variable)
return
var_value = O.vars[variable]
if (locked.Find(variable) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")))
return
if (variable == "holder" && holder.rank != "Game Master") //Hotfix, a bit ugly but that exploit has been there for ages and now somebody just had to go and tell everyone of it bluh bluh - U
return
if(!autodetect_class)
var/dir
var/default
if(isnull(var_value))
usr << "Unable to determine variable type."
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
default = "text"
else if(isloc(var_value))
usr << "Variable appears to be <b>REFERENCE</b>."
default = "reference"
else if(isicon(var_value))
usr << "Variable appears to be <b>ICON</b>."
var_value = "\icon[var_value]"
default = "icon"
else if(istype(var_value,/atom) || istype(var_value,/datum))
usr << "Variable appears to be <b>TYPE</b>."
default = "type"
else if(istype(var_value,/list))
usr << "Variable appears to be <b>LIST</b>."
default = "list"
else if(istype(var_value,/client))
usr << "Variable appears to be <b>CLIENT</b>."
default = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
default = "file"
usr << "Variable contains: [var_value]"
if(dir)
switch(var_value)
if(1)
dir = "NORTH"
if(2)
dir = "SOUTH"
if(4)
dir = "EAST"
if(8)
dir = "WEST"
if(5)
dir = "NORTHEAST"
if(6)
dir = "SOUTHEAST"
if(9)
dir = "NORTHWEST"
if(10)
dir = "SOUTHWEST"
else
dir = null
if(dir)
usr << "If a direction, direction is: [dir]"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
else
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(!class)
return
var/original_name
if (!istype(O, /atom))
original_name = "\ref[O] ([O])"
else
original_name = O:name
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
switch(class)
if("list")
mod_list(O.vars[variable])
return
if("restore to default")
O.vars[variable] = initial(O.vars[variable])
if("edit referenced object")
return .(O.vars[variable])
if("text")
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
if(var_new==null) return
O.vars[variable] = var_new
if("num")
if(variable=="luminosity")
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
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new==null) return
O.vars[variable] = var_new
if("type")
var/var_new = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf)
if(var_new==null) return
O.vars[variable] = var_new
if("reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob|obj|turf|area in world
if(var_new==null) return
O.vars[variable] = var_new
if("mob reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world
if(var_new==null) return
O.vars[variable] = var_new
if("file")
var/var_new = input("Pick file:","File",O.vars[variable]) as null|file
if(var_new==null) return
O.vars[variable] = var_new
if("icon")
var/var_new = input("Pick icon:","Icon",O.vars[variable]) as null|icon
if(var_new==null) return
O.vars[variable] = var_new
if("marked datum")
O.vars[variable] = holder.marked_datum
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]", 1)

View File

@@ -1,98 +0,0 @@
/client/proc/play_sound(S as sound)
set category = "Fun"
set name = "Play Global Sound"
//if(Debug2)
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
var/sound/uploaded_sound = sound(S,0,1,0)
uploaded_sound.channel = 777
uploaded_sound.priority = 255
uploaded_sound.wait = 1
if(src.holder.rank == "Game Master" || src.holder.rank == "Senior Game Admin" || src.holder.rank == "Game Admin" || src.holder.rank == "Secondary Game Admin")
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
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
else
usr << "You already used up your jukebox monies this round!"
del(uploaded_sound)
/client/proc/play_local_sound(S as sound)
set category = "Fun"
set name = "Play Local Sound"
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
if(src.holder.rank == "Game Master" || src.holder.rank == "Senior Game Admin" || src.holder.rank == "Game Admin" || src.holder.rank == "Secondary Game Admin")
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
return
/*
/client/proc/cuban_pete()
set category = "Fun"
set name = "Cuban Pete Time"
message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'cubanpetetime.ogg'
for(var/mob/living/carbon/human/CP in world)
if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")
CP << "Your body can't contain the rhumba beat"
CP.gib(1)
/client/proc/bananaphone()
set category = "Fun"
set name = "Banana Phone"
message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'bananaphone.ogg'
client/proc/space_asshole()
set category = "Fun"
set name = "Space Asshole"
message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'space_asshole.ogg'
client/proc/honk_theme()
set category = "Fun"
set name = "Honk"
message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'honk_theme.ogg'*/

View File

@@ -94,6 +94,7 @@
<td><A href='?src=\ref[usr];priv_msg=\ref[M]'><b>PM</b></A> |
<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A> |
<A HREF='?src=\ref[src];adminplayervars=\ref[M]'>VV</A> |
<A HREF='?src=\ref[src];traitor_panel_pp=\ref[M]'>TP</A> |
<A HREF='?src=\ref[src];adminplayersubtlemessage=\ref[M]'>SM</A> |
<A HREF='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</A></font>
<br><font size="2">[muting]</font><br>
@@ -168,4 +169,123 @@
dat += "</table></body></html>"
usr << browse(dat, "window=players;size=640x480")
usr << browse(dat, "window=players;size=640x480")
/obj/admins/proc/check_antagonists()
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online)
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
else
var/timeleft = emergency_shuttle.timeleft()
switch(emergency_shuttle.location)
if(0)
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
if(1)
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
if(ticker.mode.syndicates.len)
dat += "<br><table cellspacing=5><tr><td><B>Syndicates</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.syndicates)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
else
dat += "<tr><td><i>Nuclear Operative not found!</i></td></tr>"
dat += "</table><br><table><tr><td><B>Nuclear Disk(s)</B></td></tr>"
for(var/obj/item/weapon/disk/nuclear/N in world)
dat += "<tr><td>[N.name], "
var/atom/disk_loc = N.loc
while(!istype(disk_loc, /turf))
if(istype(disk_loc, /mob))
var/mob/M = disk_loc
dat += "carried by <a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a> "
if(istype(disk_loc, /obj))
var/obj/O = disk_loc
dat += "in \a [O.name] "
disk_loc = disk_loc.loc
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
dat += "</table>"
if(ticker.mode.head_revolutionaries.len || ticker.mode.revolutionaries.len)
dat += "<br><table cellspacing=5><tr><td><B>Revolutionaries</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.head_revolutionaries)
var/mob/M = N.current
if(!M)
dat += "<tr><td><i>Head Revolutionary not found!</i></td></tr>"
else
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Leader)</b>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
for(var/datum/mind/N in ticker.mode.revolutionaries)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
dat += "</table><table cellspacing=5><tr><td><B>Target(s)</B></td><td></td><td><B>Location</B></td></tr>"
for(var/datum/mind/N in ticker.mode.get_living_heads())
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
var/turf/mob_loc = get_turf_loc(M)
dat += "<td>[mob_loc.loc]</td></tr>"
else
dat += "<tr><td><i>Head not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.changelings.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Changelings</B></td><td></td><td></td></tr>"
for(var/datum/mind/changeling in ticker.mode.changelings)
var/mob/M = changeling.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
dat += "<td><A HREF='?src=\ref[src];traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Changeling not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.wizards.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Wizards</B></td><td></td><td></td></tr>"
for(var/datum/mind/wizard in ticker.mode.wizards)
var/mob/M = wizard.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
dat += "<td><A HREF='?src=\ref[src];traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Wizard not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.cult.len)
dat += "<br><table cellspacing=5><tr><td><B>Cultists</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.cult)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.traitors.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Traitors</B></td><td></td><td></td></tr>"
for(var/datum/mind/traitor in ticker.mode.traitors)
var/mob/M = traitor.current
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
dat += "<td><A HREF='?src=\ref[src];traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Traitor not found!</i></td></tr>"
dat += "</table>"
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=400x500")
else
alert("The game hasn't started yet!")

View File

@@ -7,4 +7,16 @@
master_controller.process()
if("No")
return 0
//feedback_add_details("admin_verb","RMC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/debug_master_controller()
set category = "Debug"
set name = "Debug Master Controller"
switch(alert("Debug Master Controller or Failsafe?" ,, "Master Controller" , "Failsafe"))
if("Master Controller")
debug_variables(master_controller)
if("Failsafe")
debug_variables(Failsafe)
//feedback_add_details("admin_verb","DMC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return

View File

@@ -47,7 +47,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [C.key]") as text|null
msg = input(src,"Message:", "Private message") as text|null // This is to stop identification of stealthmins for now -- Erthilo
if(!msg) return
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"

View File

@@ -3,8 +3,6 @@
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = 1
// All admins should be authenticated, but... what if?
if (!src.holder)
src << "Only administrators may use this command."
return
@@ -24,7 +22,7 @@
for (var/mob/M in world)
if (M.client && M.client.holder)
if (src.holder.rank == "Admin Observer")
M << "<span class=\"gfartadmin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]:</span> <span class=\"message\">[msg]</span></span>"
M << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]:</EM> <span class='message'>[msg]</span></span>"
else
M << "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"

View File

@@ -4,7 +4,38 @@
if(!src.holder)
src << "Only administrators may use this command."
return
//feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//all plumbing - yes, some things might get stated twice, doesn't matter.
for (var/obj/machinery/atmospherics/plumbing in world)
if (plumbing.nodealert)
usr << "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])"
//Manifolds
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
//Pipes
for (var/obj/machinery/atmospherics/pipe/simple/pipe in world)
if (!pipe.node1 || !pipe.node2)
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
/client/proc/powerdebug()
set category = "Mapping"
set name = "Check Power"
if(!src.holder)
src << "Only administrators may use this command."
return
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/datum/powernet/PN in powernets)
if (!PN.nodes || !PN.nodes.len)
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
usr << "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
if (!PN.cables || (PN.cables.len < 10))
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
usr << "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"

View File

@@ -0,0 +1,17 @@
/client/proc/cinematic(var/cinematic as anything in list("explosion",null))
set name = "cinematic"
set category = "Fun"
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
set hidden = 1
if(!ticker) return
switch(cinematic)
if("explosion")
var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
var/override
switch(parameter)
if(1)
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("nuclear emergency","no override")
if(0)
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","nuclear emergency","AI malfunction","no override")
ticker.station_explosion_cinematic(parameter,override)
return

View File

@@ -2,7 +2,6 @@
set category = "Special Verbs"
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
set hidden = 1
// All admins should be authenticated, but... what if?
if(!src.holder)
src << "Only administrators may use this command."
return
@@ -23,4 +22,6 @@
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
M.show_message(rendered, 2)
M.show_message(rendered, 2)
//feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -33,107 +33,108 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall (TG Version)"
if(!holder)
src << "Only administrators may use this command."
return
var/target = null
var/lst[] // List reference
lst = new/list() // Make the list
var/returnval = null
var/class = null
switch(alert("Proc owned by something?",,"Yes","No"))
if("Yes")
class = input("Proc owned by...","Owner") in list("Obj","Mob","Area or Turf","Client","CANCEL ABORT STOP")
spawn(0)
var/target = null
var/targetselected = 0
var/lst[] // List reference
lst = new/list() // Make the list
var/returnval = null
var/class = null
switch(alert("Proc owned by something?",,"Yes","No"))
if("Yes")
targetselected = 1
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client")
switch(class)
if("Obj")
target = input("Enter target:","Target",usr) as obj in world
if("Mob")
target = input("Enter target:","Target",usr) as mob in world
if("Area or Turf")
target = input("Enter target:","Target",usr.loc) as area|turf in world
if("Client")
var/list/keys = list()
for(var/client/C)
keys += C
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
else
return
if("No")
target = null
targetselected = 0
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname) return
var/argnum = input("Number of arguments","Number:",0) as num|null
if(!argnum && (argnum!=0)) return
lst.len = argnum // Expand to right length
//TODO: make a list to store whether each argument was initialised as null.
//Reason: So we can abort the proccall if say, one of our arguments was a mob which no longer exists
//this will protect us from a fair few errors ~Carn
var/i
for(i=1, i<argnum+1, i++) // Lists indexed from 1 forwards in byond
// Make a list with each index containing one variable, to be given to the proc
class = input("What kind of variable?","Variable Type") in list("text","num","type","reference","mob reference","icon","file","client","mob's area","CANCEL")
switch(class)
if("CANCEL ABORT STOP")
if("CANCEL")
return
if("Obj")
target = input("Enter target:","Target",usr) as obj in world
if("Mob")
target = input("Enter target:","Target",usr) as mob in getmobs()
if("Area or Turf")
target = input("Enter target:","Target",usr.loc) as area|turf in world
if("Client")
if("text")
lst[i] = input("Enter new text:","Text",null) as text
if("num")
lst[i] = input("Enter new number:","Num",0) as num
if("type")
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world
if("mob reference")
lst[i] = input("Select reference:","Reference",usr) as mob in world
if("file")
lst[i] = input("Pick file:","File") as file
if("icon")
lst[i] = input("Pick icon:","Icon") as icon
if("client")
var/list/keys = list()
for(var/mob/M in world)
keys += M.client
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
if("No")
target = null
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null)
if("mob's area")
var/mob/temp = input("Select mob", "Selection", usr) as mob in world
lst[i] = temp.loc
var/argnum = input("Number of arguments","Number:",0) as num
lst.len = argnum // Expand to right length
var/i
for(i=1, i<argnum+1, i++) // Lists indexed from 1 forwards in byond
// Make a list with each index containing one variable, to be given to the proc
class = input("What kind of variable?","Variable Type") in list("text","num","type","reference","mob reference","icon","file","client","mob's area","CANCEL")
switch(class)
if("CANCEL")
if(targetselected)
if(!target)
usr << "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>"
return
if(!hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
return
if("text")
lst[i] = input("Enter new text:","Text",null) as text
if("num")
lst[i] = input("Enter new number:","Num",0) as num
if("type")
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
lst[i] = temp_variable
if("NONOCANCEL!")
return
if("Search")
lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
lst[i] = input("Select reference:","Reference",usr) as mob in getmobs()
if("file")
lst[i] = input("Pick file:","File") as file
if("icon")
lst[i] = input("Pick icon:","Icon") as icon
if("client")
var/list/keys = list()
for(var/mob/M in world)
keys += M.client
sortList(keys)
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
if("mob's area")
var/mob/temp = input("Select mob", "Selection", usr) as mob in getmobs()
lst[i] = temp.loc
spawn(0)
if(target)
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
else
//this currently has no hascall protection. wasn't able to get it working.
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
usr << "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>"
//feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/callprocgen()
set category = "Debug"
@@ -286,6 +287,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
t+= "CO2: [env.carbon_dioxide]\n"
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)
set category = "Fun"
@@ -327,6 +329,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
if(candidate.key == choice.key)
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)
set category = "Fun"
@@ -339,6 +342,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] has alienized [M.key].")
spawn(10)
M:Alienize()
//feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into an alien.", 1)
else
alert("Invalid mob")
@@ -353,6 +359,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] has metroidized [M.key].")
spawn(10)
M:Metroidize()
//feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into a metroid.")
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into a metroid.", 1)
else
alert("Invalid mob")
@@ -460,6 +469,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
del(O)
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
// feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_debug_make_powernets()
set category = "Debug"
@@ -467,6 +477,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
makepowernets()
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
// feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_debug_tog_aliens()
set category = "Server"
@@ -475,6 +486,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
aliens_allowed = !aliens_allowed
log_admin("[key_name(src)] has turned aliens [aliens_allowed ? "on" : "off"].")
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)
set category = "Admin"
@@ -490,12 +502,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(istype(H.wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = H.wear_id
id = pda.id
log_admin("[key_name(src)] has granted [M.key] full access.")
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
else
var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M);
log_admin("[key_name(src)] has granted [M.key] full access.")
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.registered_name = H.real_name
@@ -505,6 +515,29 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
H.update_clothing()
else
alert("Invalid mob")
//feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
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)
set category = "Admin"
set name = "Assume direct control"
set desc = "Direct intervention"
if(M.ckey)
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
return
else
var/mob/dead/observer/ghost = new/mob/dead/observer()
ghost.ckey = M.ckey;
var/mob/adminmob = src.mob
M.ckey = src.ckey;
if( isobserver(adminmob) )
del(adminmob)
//feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] assumed direct control of [M].")
message_admins("\blue [key_name_admin(usr)] assumed direct control of [M].", 1)
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in world)
@@ -541,6 +574,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
if (isnull(dresscode))
return
//feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/obj/item/I in M)
if (istype(I, /obj/item/weapon/implant))
continue
@@ -663,8 +697,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.registered_name = M.real_name
M.equip_if_possible(W, M.slot_wear_id)
var/obj/item/weapon/fireaxe/fire_axe = new(M)
fire_axe.name = "Fire Axe (Unwielded)"
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
M.equip_if_possible(fire_axe, M.slot_r_hand)
if("masked killer")
@@ -679,8 +712,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/weapon/kitchenknife(M), M.slot_l_store)
M.equip_if_possible(new /obj/item/weapon/scalpel(M), M.slot_r_store)
var/obj/item/weapon/fireaxe/fire_axe = new(M)
fire_axe.name = "Fire Axe (Unwielded)"
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
M.equip_if_possible(fire_axe, M.slot_r_hand)
for(var/obj/item/carried_item in M.contents)
@@ -863,4 +895,54 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(W, M.slot_wear_id)
M.update_clothing()
return
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..", 1)
return
/client/proc/startSinglo()
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
return
for(var/obj/machinery/emitter/E in world)
if(E.anchored)
E.active = 1
for(var/obj/machinery/field_generator/F in world)
if(F.anchored)
F.Varedit_start = 1
spawn(30)
for(var/obj/machinery/the_singularitygen/G in world)
if(G.anchored)
var/obj/machinery/singularity/S = new /obj/machinery/singularity(get_turf(G), 50)
spawn(0)
del(G)
S.energy = 1750
S.current_size = 7
S.icon = '224x224.dmi'
S.icon_state = "singularity_s7"
S.pixel_x = -96
S.pixel_y = -96
S.grav_pull = 0
//S.consume_range = 3
S.dissipate = 0
//S.dissipate_delay = 10
//S.dissipate_track = 0
//S.dissipate_strength = 10
for(var/obj/machinery/power/rad_collector/Rad in world)
if(Rad.anchored)
if(!Rad.P)
var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad)
Plasma.air_contents.toxins = 70
Rad.drainratio = 0
Rad.P = Plasma
Plasma.loc = Rad
if(!Rad.active)
Rad.toggle_power()
for(var/obj/machinery/power/smes/SMES in world)
if(SMES.anchored)
SMES.chargemode = 1

View File

@@ -0,0 +1,143 @@
/*
HOW DO I LOG RUNTIMES?
Firstly, start dreamdeamon if it isn't already running. Then select "world>Log Session" (or press the F3 key)
navigate the popup window to the data/logs/runtime/ folder from where your tgstation .dmb is located.
(you may have to make this folder yourself)
OPTIONAL: you can select the little checkbox down the bottom to make dreamdeamon save the log everytime you
start a world. Just remember to repeat these steps with a new name when you update to a new revision!
Save it with the name of the revision your server uses (e.g. r3459.txt).
Game Masters will now be able to grant access any runtime logs you have archived this way!
This will allow us to gather information on bugs across multiple servers and make maintaining the TG
codebase for the entire /TG/station commuity a TONNE easier :3 Thanks for your help!
*/
#define FTPDELAY 600 //600 tick delay to discourage spam
/*
These procs have failsafes built in to prevent spamming of file requests. As such it can only be used once every
[FTPDELAY] ticks. This can be changed by modifying FTPDELAY's value above.
PLEASE USE RESPONSIBLY, only download from the server if the log isn't already available elsewhere!
Bandwidth is expensive and lags are lame. Some log files canr each sizes of 4MB!
*/
//This proc allows Game Masters to grant a client access to the .getruntimelog verb
//Permissions expire at the end of each round.
//Runtimes can be used to meta or spot game-crashing exploits so it's advised to only grant coders that
//you trust access. Also, it may be wise to ensure that they are not going to play in the current round.
/client/proc/giveruntimelog()
set name = ".giveruntimelog"
set desc = "Give somebody access to any session logfiles saved to the /log/runtime/ folder."
set category = null
if( !src.holder || holder.rank != "Game Master" )
src << "<font color='red'>Only Game Masters may use this command.</font>"
return
var/list/clients = list()
for(var/client/C)
clients += C
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
if( !target || !istype(target,/client) )
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
return
target.verbs |= /client/proc/getruntimelog
target << "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>"
return
//This proc allows download of runtime logs saved within the data/logs/ folder by dreamdeamon.
//It works similarly to show-server-log.
/client/proc/getruntimelog()
set name = ".getruntimelog"
set desc = "Retrieve any session logfiles saved by dreamdeamon."
set category = null
var/time_to_wait = fileaccess_timer - world.time
if(time_to_wait > 0)
src << "<font color='red'>Error: getruntimelog(): spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
return
fileaccess_timer = world.time + FTPDELAY
var/path = "data/logs/runtime/"
var/list/path_list = flist(path)
var/choice = input(src,"Choose a runtime-log to download:","Download",null) as null|anything in path_list
if(!choice) return
path += "[choice]"
if(!fexists(path))
src << "<font color='red'>Error: getruntimelog(): Files not found/Invalid file([path]).</font>"
return
message_admins("[src] accessed runtime log: [path]")
src << run( file(path) )
return
//This proc allows download of past server logs saved within the data/logs/ folder.
//It works similarly to show-server-log.
/client/proc/getserverlog()
set name = ".getserverlog"
set desc = "Like 'Show Server Log' but it fetches old logs if there are any."
set category = null
var/time_to_wait = fileaccess_timer - world.time
if(time_to_wait > 0)
src << "<font color='red'>Error: getserverlog(): spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
return
fileaccess_timer = world.time + FTPDELAY
var/path = "data/logs/"
for(var/i=0, i<4, i++) //only bother searching up to 4 sub-directories. If we don't find it by then: give up.
var/list/path_list = flist(path)
if(path_list.len) path_list -= "runtime/"
else break
var/choice = input(src,"Choose a directory to access:","Download",null) as null|anything in path_list
if(!choice) return
path += "[choice]"
if( text2ascii(choice,length(choice)) != 47 ) //not a directory, finish up
if(!fexists(path))
src << "<font color='red'>Error: getserverlog(): File not found/Invalid file([path]).</font>"
return
src << run( file(path) )
return
return
//Other log stuff put here for the sake of organisation
//Shows today's server log
/obj/admins/proc/view_txt_log()
set category = "Admin"
set name = "Show Server Log"
set desc = "Shows today's server log."
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")].log"
if( fexists(path) )
src << run( file(path) )
else
src << "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>"
return
feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
//Shows today's attack log
/obj/admins/proc/view_atk_log()
set category = "Admin"
set name = "Show Server Attack Log"
set desc = "Shows today's server attack log."
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")] Attack.log"
if( fexists(path) )
src << run( file(path) )
else
src << "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>"
return
usr << run( file(path) )
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return

View File

@@ -1,53 +0,0 @@
/*
HOW DO I LOG RUNTIMES?
Firstly, start dreamdeamon if it isn't already running. Then select "world>Log Session" (or press the F3 key)
navigate the popup window to the log/runtime/ folder from where your tgstation .dmb is located.
OPTIONAL: you can select the little checkbox down the bottom to make dreamdeamon save the log everytime you
start a world. Just remember to repeat these steps with a new name when you update to a new revision!
Save it with the name of the revision your server uses (e.g. r3459.txt).
Coders with the Game Master rank will now be able to access any runtime logs you have archived this way!
This will allow us to gather information on bugs across multiple servers and make maintaining the TG
codebase for the entire /TG/station commuity a TONNE easier :3 Thanks for your help!
*/
#define FTPDELAY 200 //20 second delay to prevent spam
//This proc allows GameMasters to download txt files saved to the log/runtime/ folder on the server.
//In effect this means the server owner can log game sessions through DreamDeamon to that folder and
//Coders (with access) can download logs (old and current).
//To make life easier on everyone please name logfiles according to the revision number in use!
//This proc has a failsafe built in to prevent spamming of ftp requests. As such it can only be used once every
//20 seconds. This can be changed by modifying FTPDELAY's value.
//PLEASE USE RESPONSIBLY, only download from the server if the log isn't already available elsewhere!
//Bandwidth is expensive and lags are lame. Although txt files of a few kB shouldn't cause problems really ~Carn
/client/proc/getruntimelog()
set name = "getruntimelog"
set desc = "Retrieve any session logfiles saved by dreamdeamon"
set category = "Debug"
set hidden = 1
if( !src.holder || holder.rank != "Game Master" )
src << "<font color='red'>Only Game Masters may use this command.</font>"
return
var/time_to_wait = fileaccess_timer - world.time
if(time_to_wait > 0)
src << "<font color='red'>Error: getruntimelog(): FTP-request spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
return
fileaccess_timer = world.time + FTPDELAY
var/list/list_of_runtimelogs = flist("log/runtime/")
var/choice = input(src,"Choose a runtime-log to download:","Download",null) in list_of_runtimelogs
if(!choice || !fexists("log/runtime/[choice]"))
src << "<font color='red'>Error: getruntimelog(): Files not found/Invalid file([choice]).</font>"
return
src << ftp("log/runtime/[choice]")
return

View File

@@ -59,6 +59,7 @@ var/intercom_range_display_status = 0
if(camera_range_display_status)
for(var/obj/machinery/camera/C in world)
new/obj/effect/debugging/camera_range(C.loc)
//feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -100,6 +101,7 @@ var/intercom_range_display_status = 0
output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
//feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
intercom_view()
set category = "Mapping"
@@ -119,10 +121,11 @@ var/intercom_range_display_status = 0
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc)))
del(F)
//feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
enable_mapping_debug()
enable_debug_verbs()
set category = "Debug"
set name = "Mapping debug"
set name = "Debug verbs"
src.verbs += /client/proc/do_not_use_these //-errorage
src.verbs += /client/proc/camera_view //-errorage
src.verbs += /client/proc/sec_camera_report //-errorage
@@ -130,8 +133,17 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/air_status //Air things
src.verbs += /client/proc/Cell //More air things
src.verbs += /client/proc/atmosscan //check plumbing
src.verbs += /client/proc/powerdebug //check power
src.verbs += /client/proc/count_objects_on_z_level
src.verbs += /client/proc/count_objects_all
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
src.verbs += /client/proc/jump_to_dead_group
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
src.verbs += /client/proc/cmd_admin_grantfullaccess
//src.verbs += /client/proc/cmd_admin_rejuvenate
//feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
count_objects_on_z_level()
set category = "Mapping"
@@ -174,6 +186,7 @@ var/intercom_range_display_status = 0
world << line*/
world << "There are [count] objects of type [type_path] on z-level [num_level]"
//feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
count_objects_all()
set category = "Mapping"
@@ -199,4 +212,5 @@ var/intercom_range_display_status = 0
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/
world << "There are [count] objects of type [type_path] in the game world"
world << "There are [count] objects of type [type_path] in the game world"
//feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -8,6 +8,7 @@
if(alert("BEGIN THE TOURNAMENT?",,"Yes","No")=="No")
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)
if(H.stat == 2 || !(H.client)) continue
if(is_special_character(H)) continue

View File

@@ -31,6 +31,7 @@
else
usr << "You already used up your jukebox monies this round!"
del(uploaded_sound)
//feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/play_local_sound(S as sound)
@@ -46,6 +47,7 @@
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
return
//feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
@@ -62,7 +64,7 @@
for(var/mob/living/carbon/human/CP in world)
if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")
CP << "Your body can't contain the rhumba beat"
CP.gib(1)
CP.gib()
/client/proc/bananaphone()

View File

@@ -4,6 +4,11 @@
if(!holder)
src << "Only administrators may use this command."
return
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
if(confirm != "Yes")
return
for(var/obj/item/W in M)
M.drop_from_slot(W)
@@ -77,14 +82,25 @@
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>", 1)
//feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(mob/M as mob in world) // Targetted narrate -- TLE
/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
set category = "Special Verbs"
set name = "Direct Narrate"
if(!holder)
src << "Only administrators may use this command."
return
if(!M)
M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
if(!M)
return
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
if( !msg )
return
M << msg
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)
@@ -144,6 +160,8 @@
create_xeno()
//feedback_add_details("admin_verb","X") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] spawned a xeno.")
message_admins("\blue [key_name_admin(usr)] spawned a xeno.", 1)
return
//I use this proc for respawn character too. /N
@@ -457,51 +475,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
alert("Cannot revive a ghost")
return
if(config.allow_admin_rev)
//M.fireloss = 0
M.setToxLoss(0)
//M.bruteloss = 0
M.setOxyLoss(0)
M.SetParalysis(0)
M.SetStunned(0)
M.SetWeakened(0)
M.radiation = 0
//M.health = 100
M.nutrition = 400
M.bodytemperature = initial(M.bodytemperature)
M.heal_overall_damage(1000, 1000)
//M.updatehealth()
M.buckled = initial(M.buckled)
M.handcuffed = initial(M.handcuffed)
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
e.brute_dam = 0.0
e.burn_dam = 0.0
e.bandaged = 0.0
e.max_damage = initial(e.max_damage)
e.bleeding = 0
e.open = 0
e.broken = 0
e.destroyed = 0
e.perma_injury = 0
e.update_icon()
for(var/datum/organ/wound/W in e.wounds)
if(W.bleeding || !W.is_healing)
W.stopbleeding()
del(H.vessel)
H.vessel = new/datum/reagents(560)
H.vessel.my_atom = H
H.vessel.add_reagent("blood",560)
spawn(1)
H.fixblood()
H.pale = 0
H.update_body()
H.update_face()
H.UpdateDamageIcon()
if (M.stat > 1)
M.stat=0
..()
M.revive()
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!", 1)
@@ -634,9 +608,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Due to the delay here its easy for something to have happened to the mob
if(!M) return
if(usr.key != M.key && M.client)
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
if(istype(M, /mob/dead/observer))
gibs(M.loc, M.viruses)
@@ -652,6 +625,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
else
mob.gib()
log_admin("[key_name(usr)] used gibself.")
message_admins("\blue [key_name_admin(usr)] used gibself.", 1)
//feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
/client/proc/cmd_manual_ban()
@@ -726,6 +702,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
usr << "[t]"
//feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/* This proc is DEFERRED. Does not do anything.
/client/proc/cmd_admin_remove_plasma(area/A as area)
set category = "Debug"
set name = "Stabilize Atmos."
@@ -745,6 +722,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
// make things update properly
T.assume_air(new /datum/gas_mixture())
*/
/client/proc/toggle_view_range()
set category = "Special Verbs"
@@ -755,6 +733,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
else
view = world.view
log_admin("[key_name(usr)] changed their view range to [view].")
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].", 1) //why? removed by order of XSI
//feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_call_shuttle()
@@ -783,6 +765,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
//feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-called the emergency shuttle.", 1)
return
/client/proc/admin_cancel_shuttle()
@@ -802,6 +786,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
emergency_shuttle.recall()
//feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-recalled the emergency shuttle.", 1)
return
@@ -907,7 +893,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
config.allow_random_events = 0
usr << "Random events disabled"
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/rnd_check_designs()
set category = "Debug"

View File

@@ -135,7 +135,7 @@ var/global/sent_strike_team = 0
if(!(new_commando.mind in ticker.mode.traitors))//If they weren't already an extra traitor.
ticker.mode.traitors += new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
new_commando.equip_death_commando(leader_selected)
del(spawn_location)
// del(spawn_location)
return new_commando
/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0)

View File

@@ -37,7 +37,6 @@ var/global/sent_syndicate_strike_team = 0
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
emergency_shuttle.recall()
world << "\blue <B>Alert: The shuttle is going back!</B>"
var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
@@ -145,7 +144,7 @@ var/global/sent_syndicate_strike_team = 0
camera.c_tag = real_name
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
R.set_frequency(NUKE_FREQ) //Same frequency as the syndicate team in Nuke mode.
R.set_frequency(NUKE_FREQ) //Same frequency as the syndicate team in Nuke mode. DMTG
equip_if_possible(R, slot_ears)
equip_if_possible(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)
equip_if_possible(new /obj/item/clothing/shoes/swat(src), slot_shoes)

View File

@@ -16,7 +16,16 @@
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
world.tick_lag = newtick
//feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No"))
if("Yes")
config.Tickcomp = 1
else
config.Tickcomp = 0
return
src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made."
return

View File

@@ -143,6 +143,10 @@
proc/set_frequency(new_frequency)
if(!radio_controller)
sleep(20)
if(!radio_controller)
return
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)

View File

@@ -226,6 +226,7 @@
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
src.add_fingerprint(usr)
usr.machine = src
if(!beaker) return
var/datum/reagents/R = beaker:reagents
@@ -290,9 +291,9 @@
reagents.clear_reagents()
icon_state = "mixer0"
else if (href_list["createpill"])
var/name = input(usr,"Name:","Name your pill!",reagents.get_master_reagent_name())
var/name = reject_bad_text(input(usr,"Name:","Name your pill!",reagents.get_master_reagent_name()))
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
if(!name || name == " ") name = reagents.get_master_reagent_name()
if(!name) name = reagents.get_master_reagent_name()
P.name = "[name] pill"
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
@@ -300,9 +301,9 @@
reagents.trans_to(P,50)
else if (href_list["createbottle"])
if(!condi)
var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name())
var/name = reject_bad_text(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()))
var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
if(!name || name == " ") name = reagents.get_master_reagent_name()
if(!name) name = reagents.get_master_reagent_name()
P.name = "[name] bottle"
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
@@ -334,7 +335,6 @@
else
usr << browse(null, "window=chem_master")
src.updateUsrDialog()
src.add_fingerprint(usr)
return
attack_ai(mob/user as mob)

View File

@@ -155,13 +155,11 @@ datum
var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here
if(!blood_prop) //first blood!
blood_prop = new(T)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"], self.data["blood_type"]))
blood_prop.blood_DNA[self.data["blood_DNA"]] = self.data["blood_type"]
else
if(!blood_prop.blood_DNA)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"], self.data["blood_type"]))
else
blood_prop.blood_DNA.len++
blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], self.data["blood_type"])
blood_prop.blood_DNA = list()
blood_prop.blood_DNA[self.data["blood_DNA"]] = self.data["blood_type"]
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/newVirus = new D.type
@@ -185,13 +183,11 @@ datum
var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T
if(!blood_prop)
blood_prop = new(T)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"],"A+"))
blood_prop.blood_DNA[self.data["blood_DNA"]] = "A+"
else
if(!blood_prop.blood_DNA)
blood_prop.blood_DNA = list(list(self.data["blood_DNA"],"A+"))
else
blood_prop.blood_DNA.len++
blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list(self.data["blood_DNA"], "A+")
blood_prop.blood_DNA = list()
blood_prop.blood_DNA[self.data["blood_DNA"]] = "A+"
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/newVirus = new D.type
@@ -209,13 +205,11 @@ datum
var/obj/effect/decal/cleanable/xenoblood/blood_prop = locate() in T
if(!blood_prop)
blood_prop = new(T)
blood_prop.blood_DNA = list(list("UNKNOWN DNA","X*"))
blood_prop.blood_DNA["UNKNOWN DNA"] = "X*"
else
if(!blood_prop.blood_DNA)
blood_prop.blood_DNA = list(list("UNKNOWN DNA","X*"))
else
blood_prop.blood_DNA.len++
blood_prop.blood_DNA[blood_prop.blood_DNA.len] = list("UNKNOWN DNA","X*")
blood_prop.blood_DNA = list()
blood_prop.blood_DNA["UNKNOWN DNA"] = "X*"
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/newVirus = new D.type
@@ -436,7 +430,7 @@ datum
if(15 to 25)
M:drowsyness = max(M:drowsyness, 20)
if(25 to INFINITY)
M.sleeping = 1
M.sleeping += 1
M.adjustOxyLoss(-M.getOxyLoss())
M.SetWeakened(0)
M.SetStunned(0)
@@ -735,29 +729,30 @@ datum
del (M:wear_mask)
M << "\red Your mask melts away but protects you from the acid!"
return
if(!M.unacidable)
if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30)
if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30)
var/datum/organ/external/head/affecting = M:get_organ("head")
if(affecting)
affecting.disfigured = 1
affecting.take_damage(25, 0)
M:UpdateDamageIcon()
M:emote("scream")
M << "\red Your face has become disfigured!"
M.real_name = "Unknown"
M.warn_flavor_changed()
else
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
var/datum/organ/external/head/affecting = M:get_organ("head")
if(affecting)
affecting.disfigured = 1
affecting.take_damage(25, 0)
M:UpdateDamageIcon()
M:emote("scream")
M:disfigure_face()
else
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
else
M.take_organ_damage(min(15, volume * 2))
if(!M.unacidable)
M.take_organ_damage(min(15, volume * 2))
reaction_obj(var/obj/O, var/volume)
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10))
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
del(O)
if(!O.unacidable)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
del(O)
pacid
name = "Polytrinic acid"
@@ -788,42 +783,43 @@ datum
else
M << "\red Your helmet protects you from the acid!"
return
var/datum/organ/external/head/affecting = M:get_organ("head")
affecting.take_damage(15, 0)
M:UpdateDamageIcon()
M:emote("scream")
if(prob(15))
M << "\red Your face has become disfigured!"
M.real_name = "Unknown"
M.warn_flavor_changed()
affecting.disfigured = 1
if(!M.unacidable)
var/datum/organ/external/head/affecting = M:get_organ("head")
affecting.take_damage(15, 0)
M:UpdateDamageIcon()
M:emote("scream")
if(prob(15))
M:disfigure_face()
else
if(istype(M, /mob/living/carbon/monkey) && M:wear_mask)
del (M:wear_mask)
M << "\red Your mask melts away but protects you from the acid!"
return
M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid
if(!M.unacidable)
M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid
else
if(istype(M, /mob/living/carbon/human))
var/datum/organ/external/head/affecting = M:get_organ("head")
affecting.take_damage(15, 0)
M:UpdateDamageIcon()
M:emote("scream")
if(prob(15))
M << "\red Your face has become disfigured!"
M.real_name = "Unknown"
M.warn_flavor_changed()
affecting.disfigured = 1
else
M.take_organ_damage(min(15, volume * 4))
if(!M.unacidable)
if(istype(M, /mob/living/carbon/human))
var/datum/organ/external/head/affecting = M:get_organ("head")
affecting.take_damage(15, 0)
M:UpdateDamageIcon()
M:emote("scream")
if(prob(15))
M:disfigure_face()
else
M.take_organ_damage(min(15, volume * 4))
reaction_obj(var/obj/O, var/volume)
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)))
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
del(O)
if(!O.unacidable)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
M << "\red \the [O] melts."
del(O)
glycerol
name = "Glycerol"
@@ -881,6 +877,7 @@ datum
data++
M.mutations = 0
M.disabilities = 0
M.jitteriness = 0
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// switch(data)
@@ -1872,6 +1869,23 @@ datum
..()
return
lipozine
name = "Lipozine" // The anti-nutriment.
id = "lipozine"
description = "A chemical compound that causes a powerful fat-burning reaction."
reagent_state = LIQUID
nutriment_factor = 10 * REAGENTS_METABOLISM
color = "#BBEDA4" // rgb: 187, 237, 164
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:nutrition -= nutriment_factor
M:overeatduration = 0
if(M:nutrition < 0)//Prevent from going into negatives.
M:nutrition = 0
..()
return
soysauce
name = "Soysauce"
id = "soysauce"
@@ -2446,7 +2460,7 @@ datum
M:drowsyness = max(0,M:drowsyness-3)
M:slurring = max(0, M:slurring-3)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping - 2)
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature+5)
M.make_jittery(1)
@@ -2488,7 +2502,7 @@ datum
M:drowsyness = max(0,M:drowsyness-3)
M:slurring = max(0, M:slurring-3)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping-2)
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature-5)
M.make_jittery(1)
@@ -2507,7 +2521,7 @@ datum
M.dizziness = max(0,M.dizziness-2)
M:drowsyness = max(0,M:drowsyness-1)
if(!M:sleeping_willingly)
M:sleeping = 0
M.sleeping = max(0,M.sleeping-2)
if(M:getToxLoss() && prob(20))
M:adjustToxLoss(-1)
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
@@ -2542,7 +2556,7 @@ datum
M.dizziness +=5
M:drowsyness = 0
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping-2)
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = max(310, M.bodytemperature-5)
M:nutrition += 1
@@ -2559,7 +2573,7 @@ datum
on_mob_life(var/mob/living/M as mob)
M:drowsyness = max(0,M:drowsyness-7)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping-1)
if (M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature-5)
M.make_jittery(1)
@@ -2779,7 +2793,7 @@ datum
on_mob_life(var/mob/living/M as mob)
M:drowsyness = max(0,M:drowsyness-7)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping-2)
if (M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature-5)
M.make_jittery(1)
@@ -2902,9 +2916,9 @@ datum
color = "#664300" // rgb: 102, 67, 0
tequilla_sunrise
name = "Tequilla Sunrise"
name = "Tequila Sunrise"
id = "tequillasunrise"
description = "Tequilla and orange juice. Much like a Screwdriver, only Mexican~"
description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~"
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
@@ -3006,7 +3020,7 @@ datum
manhattan_proj
name = "Manhattan Project"
id = "manhattan_proj"
description = "A scienitst drink of choice, for thinking how to blow up the station."
description = "A scienitst's drink of choice, for pondering ways to blow up the station."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
@@ -3082,6 +3096,180 @@ datum
dizzy_adj = 15
slurr_adj = 15
sbiten
name = "Sbiten"
id = "sbiten"
description = "A spicy Vodka! Might be a little hot for the little guys!"
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if (M.bodytemperature < 360)
M.bodytemperature = min(360, M.bodytemperature+50) //310 is the normal bodytemp. 310.055
return
devilskiss
name = "Devils Kiss"
id = "devilskiss"
description = "Creepy time!"
reagent_state = LIQUID
color = "#A68310" // rgb: 166, 131, 16
red_mead
name = "Red Mead"
id = "red_mead"
description = "The true Viking drink! Even though it has a strange red color."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
mead
name = "Mead"
id = "mead"
description = "A Vikings drink, though a cheap one."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
iced_beer
name = "Iced Beer"
id = "iced_beer"
description = "A beer which is so cold the air around it freezes."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if (M.bodytemperature < 270)
M.bodytemperature = min(270, M.bodytemperature-40) //310 is the normal bodytemp. 310.055
return
grog
name = "Grog"
id = "grog"
description = "Watered down rum, NanoTrasen approves!"
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
aloe
name = "Aloe"
id = "aloe"
description = "So very, very, very good."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
andalusia
name = "Andalusia"
id = "andalusia"
description = "A nice, strange named drink."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
alliescocktail
name = "Allies Cocktail"
id = "alliescocktail"
description = "A drink made from your allies."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
acid_spit
name = "Acid Spit"
id = "acidspit"
description = "A drink by Nanotrasen. Made from live aliens."
reagent_state = LIQUID
color = "#365000" // rgb: 54, 80, 0
amasec
name = "Amasec"
id = "amasec"
description = "Official drink of the Imperium."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
M.stunned = 4
return
neurotoxin
name = "Neurotoxin"
id = "neurotoxin"
description = "A strong neurotoxin that puts the subject into a death-like state."
reagent_state = LIQUID
color = "#2E2E61" // rgb: 46, 46, 97
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:adjustOxyLoss(0.5)
M:adjustOxyLoss(0.5)
M:weakened = max(M:weakened, 15)
M:silent = max(M:silent, 15)
return
bananahonk
name = "Banana Mama"
id = "bananahonk"
description = "A drink from Clown Heaven."
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#664300" // rgb: 102, 67, 0
silencer
name = "Silencer"
id = "silencer"
description = "A drink from Mime Heaven."
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#664300" // rgb: 102, 67, 0
changelingsting
name = "Changeling Sting"
id = "changelingsting"
description = "A stingy drink."
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=5
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 115 && prob(33))
M.confused = max(M:confused+15,15)
..()
return
irishcarbomb
name = "Irish Car Bomb"
id = "irishcarbomb"
description = "Mmm, tastes like chocolate cake..."
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=5
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 115 && prob(33))
M.confused = max(M:confused+15,15)
..()
return
syndicatebomb
name = "Syndicate Bomb"
id = "syndicatebomb"
description = "A Syndicate bomb"
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
erikasurprise
name = "Erika Surprise"
id = "erikasurprise"
description = "The surprise is, it's green!"
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
//ALCHOHOL end
tonic
@@ -3095,7 +3283,7 @@ datum
M.dizziness = max(0,M.dizziness-5)
M:drowsyness = max(0,M:drowsyness-3)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping-2)
if (M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature-5)
..()
@@ -3112,7 +3300,7 @@ datum
M.dizziness = max(0,M.dizziness-5)
M:drowsyness = max(0,M:drowsyness-3)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping-2)
M.make_jittery(1)
..()
return
@@ -3128,7 +3316,7 @@ datum
M.dizziness = max(0,M.dizziness-5)
M:drowsyness = max(0,M:drowsyness-3)
if(!M:sleeping_willingly)
M:sleeping = 0
M:sleeping = max(0,M.sleeping - 2)
if (M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature-5)
..()
@@ -3147,192 +3335,8 @@ datum
..()
return
////////////////////////// REMOVED COCKTAIL REAGENTS BELOW:: RE-ENABLE THEM IF THEY EVER GET SPRITES THAT DON'T LOOK FUCKING STUPID --Agouri ///////////////////////////
/* sbiten
name = "Sbiten"
id = "sbiten"
description = "A spicy Vodka! Might be a little hot for the little guys!"
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if (M.bodytemperature < 360)
M.bodytemperature = min(360, M.bodytemperature+50) //310 is the normal bodytemp. 310.055
if(!data) data = 1
data++
M.dizziness +=6
if(data >= 45 && data <125)
if (!M.slurring) M.slurring = 1
M.slurring += 6
else if(data >= 125 && prob(33))
M.confused = max(M:confused+5,5)
..()
return
devilskiss
name = "Devils Kiss"
id = "devilskiss"
description = "Creepy time!"
reagent_state = LIQUID
color = "#A68310" // rgb: 166, 131, 16
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=4
if(data >= 55 && data <165)
if (!M.slurring) M.slurring = 1
M.slurring += 4
else if(data >= 165 && prob(33))
M.confused = max(M:confused+4,0)
..()
return
red_mead
name = "Red Mead"
id = "red_mead"
description = "The true Viking drink! Even though it has a strange red color."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=5
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 4
else if(data >= 115 && prob(33))
M.confused = max(M:confused+4,4)
..()
return
mead
name = "Mead"
id = "mead"
description = "A Vikings drink, though a cheap one."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.make_dizzy(3)
M:jitteriness = max(M:jitteriness-3,0)
M:nutrition += 2
if(data >= 25)
if (!M:slurring) M:slurring = 1
M:slurring += 3
if(data >= 40 && prob(33))
if (!M:confused) M:confused = 1
M:confused += 2
..()
return
iced_beer
name = "Iced Beer"
id = "iced_beer"
description = "A beer which is so cold the air around it freezes."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if (M.bodytemperature < 270)
M.bodytemperature = min(270, M.bodytemperature-40) //310 is the normal bodytemp. 310.055
if(!data) data = 1
data++
M.make_dizzy(3)
M:jitteriness = max(M:jitteriness-3,0)
M:nutrition += 2
if(data >= 25)
if (!M:slurring) M:slurring = 1
M:slurring += 3
if(data >= 40 && prob(33))
if (!M:confused) M:confused = 1
M:confused += 2
..()
return
grog
name = "Grog"
id = "grog"
description = "Watered down rum, Nanotrasen approves!"
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=2
if(data >= 90 && data <250)
if (!M.slurring) M.slurring = 1
M.slurring += 2
else if(data >= 250 && prob(33))
M.confused = max(M:confused+2,0)
..()
return
aloe
name = "Aloe"
id = "aloe"
description = "So very, very, very good."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=2
if(data >= 90 && data <250)
if (!M.slurring) M.slurring = 1
M.slurring += 2
else if(data >= 250 && prob(33))
M.confused = max(M:confused+2,0)
..()
return
andalusia
name = "Andalusia"
id = "andalusia"
description = "A nice, strange named drink."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=8
if(data >= 90 && data <250)
if (!M.slurring) M.slurring = 1
M.slurring += 1
else if(data >= 250 && prob(33))
M.confused = max(M:confused+2,0)
..()
return
alliescocktail
name = "Allies Cocktail"
id = "alliescocktail"
description = "A drink made from your allies."
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=4
if(data >= 90 && data <250)
if (!M.slurring) M.slurring = 1
M.slurring += 7
else if(data >= 250 && prob(60))
M.confused = max(M:confused+8,0)
..()
return
soy_latte
name = "Soy Latte"
id = "soy_latte"
@@ -3373,75 +3377,8 @@ datum
..()
return
acid_spit
name = "Acid Spit"
id = "acidspit"
description = "A drink by Nanotrasen. Made from live aliens."
reagent_state = LIQUID
color = "#365000" // rgb: 54, 80, 0
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=10
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 10
else if(data >= 115 && prob(33))
M.confused = max(M:confused+10,0)
..()
return
amasec
name = "Amasec"
id = "amasec"
description = "Always before COMBAT!!!"
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
M.stunned = 4
if(!data) data = 1
data++
M.dizziness +=4
if(data >= 55 && data <165)
if (!M.slurring) M.slurring = 1
M.slurring += 4
else if(data >= 165 && prob(33))
M.confused = max(M:confused+5,0)
..()
return
neurotoxin
name = "Neurotoxin"
id = "neurotoxin"
description = "A strong neurotoxin that puts the subject into a death-like state."
reagent_state = LIQUID
color = "#2E2E61" // rgb: 46, 46, 97
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:adjustOxyLoss(0.5)
M:adjustOxyLoss(0.5)
M:weakened = max(M:weakened, 15)
M:silent = max(M:silent, 15)
if(!data) data = 1
data++
M.dizziness +=6
if(data >= 15 && data <45)
if (!M.slurring) M.slurring = 1
M.slurring += 3
else if(data >= 45 && prob(50) && data <55)
M.confused = max(M:confused+3,0)
else if(data >=55)
M.druggy = max(M.druggy, 55)
..()
return
hippies_delight
name = "Hippies Delight"
name = "Hippie's Delight"
id = "hippiesdelight"
description = "A drink enjoyed by people during the 1960's."
reagent_state = LIQUID
@@ -3471,139 +3408,4 @@ datum
holder.remove_reagent(src.id, 0.2)
data++
..()
return
bananahonk
name = "Banana Honk"
id = "bananahonk"
description = "A drink from Clown Heaven."
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor
if(!data) data = 1
data++
if(istype(M, /mob/living/carbon/human) && M.job in list("Clown"))
if(!M) M = holder.my_atom
M:heal_organ_damage(1,1)
M.dizziness +=5
if(data >= 55 && data <165)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 165 && prob(33))
M.confused = max(M:confused+5,0)
..()
return
if(istype(M, /mob/living/carbon/monkey))
if(!M) M = holder.my_atom
M:heal_organ_damage(1,1)
M.dizziness +=5
if(data >= 55 && data <165)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 165 && prob(33))
M.confused = max(M:confused+5,0)
..()
return
silencer
name = "Silencer"
id = "silencer"
description = "A drink from Mime Heaven."
nutriment_factor = 1 * REAGENTS_METABOLISM
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor
if(!data) data = 1
data++
if(istype(M, /mob/living/carbon/human) && M.job in list("Mime"))
if(!M) M = holder.my_atom
M:heal_organ_damage(1,1)
M.dizziness +=5
if(data >= 55 && data <165)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 165 && prob(33))
M.confused = max(M:confused+5,0)
..()
return
changelingsting
name = "Changeling Sting"
id = "changelingsting"
description = "A stingy drink."
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=5
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 115 && prob(33))
M.confused = max(M:confused+15,15)
..()
return
irishcarbomb
name = "Irish Car Bomb"
id = "irishcarbomb"
description = "An irish car bomb"
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=5
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 5
else if(data >= 115 && prob(33))
M.confused = max(M:confused+15,15)
..()
return
syndicatebomb
name = "Syndicate Bomb"
id = "syndicatebomb"
description = "A Syndicate bomb"
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=10
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 10
else if(data >= 115 && prob(33))
M.confused = max(M:confused+15,15)
..()
return
erikasurprise
name = "Erika Surprise"
id = "erikasurprise"
description = "A surprise of Erika"
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
on_mob_life(var/mob/living/M as mob)
if(!data) data = 1
data++
M.dizziness +=30
if(data >= 55 && data <115)
if (!M.slurring) M.slurring = 1
M.slurring += 30
else if(data >= 115 && prob(60))
M.confused = max(M:confused+15,15)
..()
return*/
return

View File

@@ -431,6 +431,13 @@ datum
required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
result_amount = 5
lipozine
name = "Lipozine"
id = "Lipozine"
result = "lipozine"
required_reagents = list("sodiumchloride" = 1, "ethanol" = 1, "radium" = 1)
result_amount = 3
///////////////////////////////////////////////////////////////////////////////////
// foam and foam precursor
@@ -1254,7 +1261,7 @@ datum
////DRINKS THAT REQUIRE IMPROVED SPRITES BELOW:: -Agouri/////
/* sbiten
sbiten
name = "Sbiten"
id = "sbiten"
result = "sbiten"
@@ -1408,7 +1415,7 @@ datum
id = "silencer"
result = "silencer"
required_reagents = list("nothing" = 1, "cream" = 1, "sugar" = 1)
result_amount = 3*/
result_amount = 3

View File

@@ -1887,19 +1887,16 @@
del(D)
del(src)
/obj/item/weapon/reagent_containers/glass/watercan
/obj/item/weapon/reagent_containers/glass/bucket/wateringcan
name = "watering can"
desc = "A watering can, for all your watering needs."
icon = 'hydroponics.dmi'
icon_state = "watercan"
item_state = "bucket"
m_amt = 200
g_amt = 0
w_class = 3.0
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,50,70)
volume = 70
flags = FPRINT | OPENCONTAINER
attackby(var/obj/D, mob/user as mob)
if(isprox(D))
return
/obj/item/weapon/reagent_containers/glass/cantister
desc = "It's a canister. Mainly used for transporting fuel."
@@ -2291,6 +2288,25 @@
var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data)
/obj/item/weapon/reagent_containers/glass/bottle/pacid
name = "Polytrinic Acid Bottle"
desc = "A small bottle. Contains a small amount of Polytronic Acid"
icon = 'chemical.dmi'
icon_state = "bottle17"
New()
..()
reagents.add_reagent("pacid", 30)
/obj/item/weapon/reagent_containers/glass/bottle/adminordrazine
name = "Adminordrazine Bottle"
desc = "A small bottle. Contains the liquid essence of the gods."
icon = 'drinks.dmi'
icon_state = "holyflask"
New()
..()
reagents.add_reagent("adminordrazine", 30)
/obj/item/weapon/reagent_containers/glass/bottle/ert
name = "emergency medicine bottle"
desc = "A large bottle."
@@ -3350,14 +3366,6 @@
icon_state = "cubalibreglass"
name = "Cuba Libre"
desc = "A classic mix of rum and cola."
if("irishcream")
icon_state = "irishcreamglass"
name = "Irish Cream"
desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?"
if("cubalibre")
icon_state = "cubalibreglass"
name = "Cuba Libre"
desc = "A classic mix of rum and cola."
if("b52")
icon_state = "b52glass"
name = "B-52"
@@ -3490,8 +3498,7 @@
icon_state = "booger"
name = "Booger"
desc = "Ewww..."
/*if("snowwhite") /// Dumbly-sprited drinks below. If your drink is on the list, shame on you --Agouri
if("snowwhite")
icon_state = "snowwhite"
name = "Snow White"
desc = "A cold refreshment."
@@ -3578,7 +3585,7 @@
if("erikasurprise")
icon_state = "erikasurprise"
name = "Erika Surprise"
desc = "A surprise of Erika"*/
desc = "The surprise is, it's green!"
else
icon_state ="glass_brown"
name = "Glass of ..what?"

View File

@@ -162,6 +162,6 @@
W.name = "Fake Cyborg Card"
W.access = list(access_theatre)
W.assignment = "Kill all humans! Beep. Boop."
W.registered = name
W.registered_name = name
del(src)
*/

View File

@@ -152,6 +152,21 @@
heat_transfer_coefficient = 0.01
color="yellow"
/obj/item/clothing/gloves/fyellow //Cheap Chinese Crap
desc = "These gloves are cheap copies of the coveted gloves, no way this can end badly."
name = "fake insulated gloves"
icon_state = "yellow"
item_state = "ygloves"
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
permeability_coefficient = 0.05
protective_temperature = 800
heat_transfer_coefficient = null
color="yellow"
New()
siemens_coefficient = pick(0,0,0.25,0.25,0.5,0.5,1)
heat_transfer_coefficient = pick(0.01,0.1,0.25,0.25,0.5)
/obj/item/clothing/gloves/captain
desc = "Regal blue gloves, with a nice gold trim. Swanky."
name = "captain's gloves"
@@ -164,10 +179,7 @@
name = "botanist's leather gloves"
icon_state = "leather"
item_state = "ggloves"
siemens_coefficient = 0.50
permeability_coefficient = 0.9
protective_temperature = 400
heat_transfer_coefficient = 0.70
/obj/item/clothing/gloves/orange
name = "orange gloves"

View File

@@ -39,6 +39,14 @@
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
/obj/item/clothing/mask/balaclava
name = "balaclava"
desc = "LOADSAMONEY"
icon_state = "balaclava"
item_state = "balaclava"
flags = FPRINT|TABLEPASS|SUITSPACE|HEADSPACE|MASKCOVERSMOUTH|BLOCKHAIR
w_class = 2
/obj/item/clothing/mask/muzzle
name = "muzzle"
desc = "To stop that awful noise."

View File

@@ -8,81 +8,83 @@
process()
set background = 1
if (!src.alive) return
switch(task)
if("thinking")
src.attack = 0
src.target = null
sleep(thinkspeed)
walk_to(src,0)
if (src.aggressive) seek_target()
if (src.wanderer && !src.target) src.task = "wandering"
if("chasing")
if (src.frustration >= max_frustration)
// use a loop to avoid weird benchmarking phenomenons caused by
// recursion
while(1)
switch(task)
if("thinking")
src.attack = 0
src.target = null
src.last_found = world.time
src.frustration = 0
src.task = "thinking"
sleep(thinkspeed)
walk_to(src,0)
if (target)
if (get_dist(src, src.target) <= 1)
var/mob/living/carbon/M = src.target
ChaseAttack()
src.task = "attacking"
if(chasestate)
icon_state = chasestate
src.anchored = 1
src.target_lastloc = M.loc
else
var/turf/olddist = get_dist(src, src.target)
walk_to(src, src.target,1,chasespeed)
if ((get_dist(src, src.target)) >= (olddist))
src.frustration++
if (src.aggressive) seek_target()
if (src.wanderer && !src.target) src.task = "wandering"
if("chasing")
if (src.frustration >= max_frustration)
src.target = null
src.last_found = world.time
src.frustration = 0
src.task = "thinking"
walk_to(src,0)
if (target)
if (get_dist(src, src.target) <= 1)
var/mob/living/carbon/M = src.target
ChaseAttack()
src.task = "attacking"
if(chasestate)
icon_state = chasestate
src.anchored = 1
src.target_lastloc = M.loc
else
src.frustration = 0
sleep(5)
else src.task = "thinking"
if("attacking")
// see if he got away
if ((get_dist(src, src.target) > 1) || ((src.target:loc != src.target_lastloc)))
src.anchored = 0
src.task = "chasing"
if(chasestate)
icon_state = chasestate
else
if (get_dist(src, src.target) <= 1)
var/mob/living/carbon/M = src.target
if(!src.attacking) RunAttack()
if(!src.aggressive)
src.task = "thinking"
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
src.attacking = 0
else
if(M!=null)
if(ismob(src.target))
if(M.health < config.health_threshold_crit)
src.task = "thinking"
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
src.attacking = 0
else
var/turf/olddist = get_dist(src, src.target)
walk_to(src, src.target,1,chasespeed)
if ((get_dist(src, src.target)) >= (olddist))
src.frustration++
else
src.frustration = 0
sleep(5)
else src.task = "thinking"
if("attacking")
// see if he got away
if ((get_dist(src, src.target) > 1) || ((src.target:loc != src.target_lastloc)))
src.anchored = 0
src.attacking = 0
src.task = "chasing"
if(chasestate)
icon_state = chasestate
if("wandering")
if(chasestate)
icon_state = initial(icon_state)
patrol_step()
sleep(wanderspeed)
spawn(8)
process()
return
else
if (get_dist(src, src.target) <= 1)
var/mob/living/carbon/M = src.target
if(!src.attacking) RunAttack()
if(!src.aggressive)
src.task = "thinking"
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
src.attacking = 0
else
if(M!=null)
if(ismob(src.target))
if(M.health < config.health_threshold_crit)
src.task = "thinking"
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
src.attacking = 0
else
src.anchored = 0
src.attacking = 0
src.task = "chasing"
if(chasestate)
icon_state = chasestate
if("wandering")
if(chasestate)
icon_state = initial(icon_state)
patrol_step()
sleep(wanderspeed)
sleep(8)
patrol_step()
@@ -115,7 +117,7 @@
seek_target()
if(!prob(aggression)) return // make them attack depending on aggression levels
src.anchored = 0
var/T = null
for(var/mob/living/C in view(src.seekrange,src))//TODO: mess with this

View File

@@ -22,7 +22,12 @@ Contains the procs that control attacking critters
if (user.a_intent == "hurt")
TakeDamage(rand(1,2) * brutevuln)
if(istype(user, /mob/living/carbon/human))
if(istajaran(user))
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
playsound(src.loc, 'slice.ogg', 25, 1, -1)
else if(istype(user, /mob/living/carbon/human))
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[user] has punched [src]!</B>", 1)
playsound(src.loc, pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'), 100, 1)
@@ -32,10 +37,7 @@ Contains the procs that control attacking critters
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
playsound(src.loc, 'slice.ogg', 25, 1, -1)
else if(user.type == /mob/living/carbon/human/tajaran)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
playsound(src.loc, 'slice.ogg', 25, 1, -1)
else
for(var/mob/O in viewers(src, null))

View File

@@ -158,6 +158,13 @@
var/stunchance = 10 // chance to tackle things down
//TEMPORARY
New()
..()
spawn(0)
del(src)
//TEMPORARY
Harvest(var/obj/item/weapon/W, var/mob/living/user)
if(..())
@@ -211,6 +218,7 @@
atksilicon = 0
firevuln = 2
brutevuln = 1
wanderspeed = 1
Harvest(var/obj/item/weapon/W, var/mob/living/user)

View File

@@ -6,27 +6,251 @@
icon = 'custom_items.dmi'
w_class = 1.0
//////////// Clothing
//////////////////////////////////
////////// Fluff Items ///////////
//////////////////////////////////
/obj/item/clothing/glasses/meson/fluff/book_berner_1
/obj/item/fluff/wes_solari_1 //tzefa: Wes Solari
name = "family photograph"
desc = "A family photograph of a couple and a young child, Written on the back it says \"See you soon Dad -Roy\"."
icon_state = "wes_solari_1"
/obj/item/fluff/sarah_calvera_1 //fniff: Sarah Calvera
name = "old photo"
desc = "Looks like it was made on a really old, cheap camera. Low quality. The camera shows a young hispanic looking girl with red hair wearing a white dress is standing in front of an old looking wall. On the back there is a note in black marker that reads \"Sara, Siempre pensé que eras tan linda con ese vestido. Tu hermano, Carlos.\""
icon_state = "sarah_calvera_1"
/obj/item/fluff/angelo_wilkerson_1 //fniff: Angleo Wilkerson
name = "fancy watch"
desc = "An old and expensive pocket watch. Engraved on the bottom is \"Odium est Source De Dolor\". On the back, there is an engraving that does not match the bottom and looks more recent. \"Angelo, If you find this, you shall never see me again. Please, for your sake, go anywhere and do anything but stay. I'm proud of you and I will always love you. Your father, Jacob Wilkerson.\" Jacob Wilkerson... Wasn't he that serial killer?"
icon_state = "angelo_wilkerson_1"
/obj/item/fluff/sarah_carbrokes_1 //gvazdas: Sarah Carbrokes
name = "locket"
desc = "A grey locket with a picture of a black haired man in it. The text above it reads: \"Edwin Carbrokes\"."
icon_state = "sarah_carbrokes_1"
/obj/item/fluff/ethan_way_1 //whitellama: Ethan Way
name = "old ID"
desc = "A scratched and worn identification card; it appears too damaged to inferface with any technology. You can almost make out \"Tom Cabinet\" in the smeared ink."
icon_state = "ethan_way_1"
/obj/item/fluff/val_mcneil_1 //silentthunder: Val McNeil
name = "rosary pendant"
desc = "A cross on a ring of beads, has McNeil etched onto the back."
icon_state = "val_mcneil_1"
/obj/item/fluff/steve_johnson_1 //thebreadbocks: Steve Johnson
name = "bottle of hair dye"
desc = "A bottle of pink hair dye. So that's how he gets his beard so pink..."
icon_state = "steve_johnson_1"
item_state = "steve_johnson_1"
//////////////////////////////////
////////// Usable Items //////////
//////////////////////////////////
/obj/item/weapon/pen/fluff/multi //spaceman96: Trenna Seber
name = "multicolor pen"
desc = "It's a cool looking pen. Lots of colors!"
/obj/item/weapon/pen/fluff/fancypen //orangebottle: Lillian Levett, Lilliana Reade
name = "fancy pen"
desc = "A fancy metal pen. It uses blue ink. An inscription on one side reads,\"L.L. - L.R.\""
icon = 'custom_items.dmi'
icon_state = "fancypen"
/obj/item/fluff/victor_kaminsky_1 //chinsky: Victor Kaminski
name = "golden detective's badge"
desc = "NanoTrasen Security Department detective's badge, made from gold. Badge number is 564."
icon_state = "victor_kaminsky_1"
/obj/item/fluff/victor_kaminsky_1/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] [].", user, src, src.name), 1)
src.add_fingerprint(user)
/obj/item/weapon/clipboard/fluff/smallnote //lexusjjss: Lexus Langg, Zachary Tomlinson
name = "small notebook"
desc = "A generic small spiral notebook that flips upwards."
icon = 'custom_items.dmi'
icon_state = "smallnotetext"
/obj/item/weapon/storage/fluff/maye_daye_1 //morrinn: Maye Day
name = "pristine lunchbox"
desc = "A pristine stainless steel lunch box. The initials M.D. are engraved on the inside of the lid."
icon = 'custom_items.dmi'
icon_state = "maye_daye_1"
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/johann_erzatz_1 //leonheart11: Johann Erzatz
name = "vintage thermos"
desc = "An older thermos with a faint shine."
icon = 'custom_items.dmi'
icon_state = "johann_erzatz_1"
volume = 50
/obj/item/weapon/lighter/zippo/fluff/li_tsun_1 //mangled: Li Tsun
name = "blue zippo lighter"
desc = "A zippo lighter made of some blue metal."
icon = 'custom_items.dmi'
icon_state = "bluezippo"
icon_on = "bluezippoon"
icon_off = "bluezippo"
/obj/item/weapon/fluff/cado_keppel_1 //sparklysheep: Cado Keppel
name = "purple comb"
desc = "A pristine purple comb made from flexible plastic. It has a small K etched into its side."
w_class = 1.0
icon = 'custom_items.dmi'
icon_state = "purplecomb"
item_state = "purplecomb"
attack_self(mob/user)
if(user.r_hand == src || user.l_hand == src)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] uses their [] to comb their hair with incredible style and sophistication. What a guy.", user, src), 1)
return
/obj/item/weapon/camera_test/fluff/orange //chinsky: Summer Springfield
name = "orange camera"
icon = 'custom_items.dmi'
desc = "A modified detective's camera, painted in bright orange. On the back you see \"Have fun\" written in small accurate letters with something black."
icon_state = "orangecamera"
pictures_left = 30
/obj/item/weapon/card/id/fluff/lifetime //fastler: Fastler Greay; it seemed like something multiple people would have
name = "Lifetime ID Card"
desc = "A modified ID card given only to those people who have devoted their lives to the better interests of NanoTrasen. It sparkles blue."
icon = 'custom_items.dmi'
icon_state = "lifetimeid"
//////////////////////////////////
//////////// Clothing ////////////
//////////////////////////////////
//////////// Eye Wear ////////////
/obj/item/clothing/glasses/meson/fluff/book_berner_1 //asanadas: Book Berner
name = "bespectacled mesonic surveyors"
desc = "One of the older meson scanner models retrofitted to perform like its modern counterparts."
icon = 'custom_items.dmi'
icon_state = "book_berner_1"
/obj/item/clothing/glasses/fluff/serithi_artalis_1
/obj/item/clothing/glasses/fluff/serithi_artalis_1 //serithi: Serithi Artalis
name = "extranet HUD"
desc = "A heads-up display with limited connectivity to the NanoTrasen Extranet, capable of displaying information from official NanoTrasen records."
icon = 'custom_items.dmi'
icon_state = "serithi_artalis_1"
/obj/item/clothing/head/helmet/hardhat/fluff/greg_anderson_1
//////////// Hats ////////////
/obj/item/clothing/head/helmet/hardhat/fluff/greg_anderson_1 //deusdactyl: Greg Anderson
name = "old hard hat"
desc = "An old dented hard hat with the nametag \"Anderson\". It seems to be backwards."
icon_state = "hardhat0_dblue" //Already an in-game sprite
item_state = "hardhat0_dblue"
color = "dblue"
/obj/item/clothing/head/secsoft/fluff/swatcap //deusdactyl: James Girard
name = "\improper SWAT hat"
desc = "A black hat. The inside has the words, \"Lieutenant James Girard, LPD SWAT Team Four.\""
icon = 'custom_items.dmi'
icon_state = "swatcap"
/obj/item/clothing/head/helmet/welding/fluff/alice_mccrea_1 //madmalicemccrea: Alice McCrea
name = "flame decal welding helmet"
desc = "A welding helmet adorned with flame decals, and several cryptic slogans of varying degrees of legibility. \"Fly the Friendly Skies\" is clearly visible, written above the visor, for some reason."
icon = 'custom_items.dmi'
icon_state = "alice_mccrea_1"
/obj/item/clothing/head/helmet/welding/fluff/yuki_matsuda_1 //searif: Yuki Matsuda
name = "white decal welding helmet"
desc = "A white welding helmet with a character written across it."
icon = 'custom_items.dmi'
icon_state = "yuki_matsuda_1"
/obj/item/clothing/head/helmet/greenbandana/fluff/taryn_kifer_1 //themij: Taryn Kifer
name = "orange bandana"
desc = "Hey, I think we're missing a hazard vest..."
icon = 'custom_items.dmi'
icon_state = "taryn_kifer_1"
//////////// Suits ////////////
/obj/item/clothing/suit/storage/labcoat/fluff/pink //spaceman96: Trenna Seber
name = "pink labcoat"
desc = "A suit that protects against minor chemical spills. Has a pink stripe down from the shoulders."
icon = 'custom_items.dmi'
icon_state = "labcoat_pink_open"
/obj/item/clothing/suit/storage/det_suit/fluff/graycoat //vinceluk: Seth Sealis
name = "gray coat"
desc = "Old, worn out coat. It's seen better days."
icon = 'custom_items.dmi'
icon_state = "graycoat"
item_state = "graycoat"
color = "graycoat"
/obj/item/clothing/suit/storage/det_suit/fluff/leatherjack //atomicdog92: Seth Sealis
name = "leather jacket"
desc = "A black leather coat, popular amongst punks, greasers, and other galactic scum."
icon = 'custom_items.dmi'
icon_state = "leatherjack"
item_state = "leatherjack"
color = "leatherjack"
//////////// Uniforms ////////////
/obj/item/clothing/under/fluff/jumpsuitdown //searif: Yuki Matsuda
name = "rolled down jumpsuit"
desc = "A rolled down jumpsuit. Great for mechanics."
icon = 'custom_items.dmi'
icon_state = "jumpsuitdown"
item_state = "jumpsuitdown"
color = "jumpsuitdown"
/obj/item/clothing/under/fluff/olddressuniform //desiderium: Momiji Inubashiri
name = "retired dress uniform"
desc = "A retired Station Head of Staff uniform, phased out twenty years ago for the newer jumpsuit design, but still acceptable dress. Lovingly maintained."
icon = 'custom_items.dmi'
icon_state = "olddressuniform"
item_state = "olddressuniform"
color = "olddressuniform"
//////////// Masks ////////////
/obj/item/clothing/mask/fluff/flagmask //searif: Tsiokeriio Tarbell
name = "\improper First Nations facemask"
desc = "A simple cloth rag that bears the flag of the first nations."
icon = 'custom_items.dmi'
icon_state = "flagmask"
item_state = "flagmask"
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
/obj/item/clothing/mask/mara_kilpatrick_1 //staghorn: Mara Kilpatrick
name = "shamrock pendant"
desc = "A silver and emerald shamrock pendant. It has the initials \"M.K.\" engraved on the back."
icon = 'custom_items.dmi'
icon_state = "mara_kilpatrick_1"
flags = FPRINT|TABLEPASS
w_class = 1
//////////// Shoes ////////////
/obj/item/clothing/shoes/fluff/leatherboots //serithi: Serithi Artalis
name = "leather boots"
desc = "A pair of leather boots. Well-worn, but still kept in good condition. There is a small \"S\" scratched into the back of each boot."
icon = 'custom_items.dmi'
icon_state = "leatherboots"
item_state = "jackboots"
//////////// Sets ////////////
////// CDC //deusdactyl: Roger Wiles
/obj/item/clothing/under/rank/virologist/fluff/cdc_jumpsuit
name = "\improper CDC jumpsuit"
desc = "A modified standard-issue CDC jumpsuit made of a special fiber that gives special protection against biohazards. It has a biohazard symbol sewn into the back."
@@ -40,17 +264,7 @@
icon = 'custom_items.dmi'
icon_state = "labcoat_cdc_open"
/obj/item/clothing/suit/storage/labcoat/fluff/pink
name = "pink labcoat"
desc = "A suit that protects against minor chemical spills. Has a pink stripe down from the shoulders."
icon = 'custom_items.dmi'
icon_state = "labcoat_pink_open"
/obj/item/clothing/suit/storage/labcoat/fluff/red
name = "red labcoat"
desc = "A suit that protects against minor chemical spills. Has a red stripe on the shoulders and rolled up sleeves."
icon = 'custom_items.dmi'
icon_state = "labcoat_red_open"
////// Short Sleeve Medical Outfit //erthilo: Farah Lants
/obj/item/clothing/under/rank/medical/fluff/short
name = "short sleeve medical jumpsuit"
@@ -59,86 +273,31 @@
icon_state = "medical_short"
color = "medical_short"
/obj/item/clothing/under/fluff/jumpsuitdown
name = "rolled down jumpsuit"
desc = "A rolled down jumpsuit. Great for mechanics."
/obj/item/clothing/suit/storage/labcoat/fluff/red
name = "red labcoat"
desc = "A suit that protects against minor chemical spills. Has a red stripe on the shoulders and rolled up sleeves."
icon = 'custom_items.dmi'
icon_state = "jumpsuitdown"
item_state = "jumpsuitdown"
color = "jumpsuitdown"
icon_state = "labcoat_red_open"
/obj/item/clothing/under/fluff/olddressuniform
name = "retired dress uniform"
desc = "A retired Station Head of Staff uniform, phased out twenty years ago for the newer jumpsuit design, but still acceptable dress. Lovingly maintained."
////// Retired Patrol Outfit //desiderium: Rook Maudlin
/obj/item/clothing/suit/storage/det_suit/fluff/retpolcoat
name = "retired colony patrolman's coat"
desc = "A clean, black nylon windbreaker with the words \"OUTER LIGHT POLICE\" embroidered in gold-dyed thread on the back. \"RETIRED\" is tastefully embroidered below in a smaller font."
icon = 'custom_items.dmi'
icon_state = "olddressuniform"
item_state = "olddressuniform"
color = "olddressuniform"
icon_state = "retpolcoat"
item_state = "retpolcoat"
color = "retpolcoat"
//////////// Useable Items
/obj/item/weapon/pen/fluff/multi
name = "multicolor pen"
desc = "It's a cool looking pen. Lots of colors!"
/obj/item/weapon/pen/fluff/fancypen
name = "fancy pen"
desc = "A fancy metal pen. It uses blue ink. An inscription on one side reads,\"L.L. - L.R.\""
/obj/item/clothing/head/det_hat/fluff/retpolcap
name = "retired colony patrolman's cap"
desc = "A clean and properly creased colony police cap. The badge is shined and polished, the word \"RETIRED\" engraved professionally under the words \"OUTER LIGHT POLICE.\""
icon = 'custom_items.dmi'
icon_state = "fancypen"
icon_state = "retpolcap"
/obj/item/fluff/victor_kaminsky_1
name = "golden detective's badge"
desc = "NanoTrasen Security Department detective's badge, made from gold. Badge number is 564."
icon_state = "victor_kaminsky_1"
/obj/item/fluff/victor_kaminsky_1/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] [].", user, src, src.name), 1)
src.add_fingerprint(user)
/obj/item/weapon/clipboard/fluff/smallnote
name = "small notebook"
desc = "A generic small spiral notebook that flips upwards."
/obj/item/clothing/under/det/fluff/retpoluniform
name = "retired colony patrolman's uniform"
desc = "A meticulously clean police uniform belonging to Precinct 31, Outer Light Colony. The word \"RETIRED\" is engraved tastefully and professionally in the badge below the number, 501."
icon = 'custom_items.dmi'
icon_state = "smallnotetext"
/obj/item/weapon/storage/fluff/maye_daye_1
name = "pristine lunchbox"
desc = "A pristine stainless steel lunch box. The initials M.D. are engraved on the inside of the lid."
icon = 'custom_items.dmi'
icon_state = "maye_daye_1"
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/johann_erzatz_1
name = "vintage thermos"
desc = "An older thermos with a faint shine."
icon = 'custom_items.dmi'
icon_state = "johann_erzatz_1"
volume = 50
//////////// Misc Items
/obj/item/fluff/wes_solari_1
name = "family photograph"
desc = "A family photograph of a couple and a young child, Written on the back it says \"See you soon Dad -Roy\"."
icon_state = "wes_solari_1"
/obj/item/fluff/sarah_calvera_1
name = "old photo"
desc = "Looks like it was made on a really old, cheap camera. Low quality. The camera shows a young hispanic looking girl with red hair wearing a white dress is standing in front of an old looking wall. On the back there is a note in black marker that reads \"Sara, Siempre pensé que eras tan linda con ese vestido. Tu hermano, Carlos.\""
icon_state = "sarah_calvera_1"
/obj/item/fluff/angelo_wilkerson_1
name = "fancy watch"
desc = "An old and expensive pocket watch. Engraved on the bottom is \"Odium est Source De Dolor\". On the back, there is an engraving that does not match the bottom and looks more recent. \"Angelo, If you find this, you shall never see me again. Please, for your sake, go anywhere and do anything but stay. I'm proud of you and I will always love you. Your father, Jacob Wilkerson.\" Jacob Wilkerson... Wasn't he that serial killer?"
icon_state = "angelo_wilkerson_1"
/obj/item/fluff/sarah_carbrokes_1
name = "locket"
desc = "A grey locket with a picture of a black haired man in it. The text above it reads: \"Edwin Carbrokes\"."
icon_state = "sarah_carbrokes_1"
/obj/item/fluff/ethan_way_1
name = "old ID"
desc = "A scratched and worn identification card; it appears too damaged to inferface with any technology. You can almost make out \"Tom Cabinet\" in the smeared ink."
icon_state = "ethan_way_1"
icon_state = "retpoluniform"
color = "retpoluniform"

View File

@@ -29,6 +29,22 @@
if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back first
Item.loc = M.back
ok = 1
else if(istype(Item,/obj/item/weapon/card/id)) //player wants a custom ID card - only lifetime cards for now
var/obj/item/weapon/card/id/I = Item
for(var/obj/item/weapon/card/id/C in M)
I.registered_name = M.real_name
I.name = "[M.real_name]'s Lifetime ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])"
I.access = C.access
I.assignment = C.assignment
I.over_jumpsuit = C.over_jumpsuit
I.blood_type = C.blood_type
I.dna_hash = C.dna_hash
I.fingerprint_hash = C.fingerprint_hash
//
I.loc = C.loc
ok = 1
del(C)
break
else
for(var/obj/item/weapon/storage/S in M.contents) // Try to place it in any item that can store stuff, on the mob.
if (S:len < S:storage_slots)

View File

@@ -1393,6 +1393,7 @@
name = "Metroid Sandwich"
desc = "A sandwich is green stuff."
icon_state = "metroidsandwich"
trash = "plate"
New()
..()
reagents.add_reagent("nutriment", 2)
@@ -1417,6 +1418,64 @@
reagents.add_reagent("nutriment", 28)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup
name = "chantrelle soup"
desc = "A delicious and hearty mushroom soup."
icon_state = "mushroomsoup"
trash = "snack_bowl"
New()
..()
reagents.add_reagent("nutriment", 10)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit
name = "plump helmet biscuit"
desc = "This is a finely-prepared plump helmet biscuit. The ingredients are exceptionally minced plump helmet, and well-minced dwarven wheat flour."
icon_state = "phelmbiscuit"
New()
..()
if(prob(10))
name = "exceptional plump helmet biscuit"
desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!"
reagents.add_reagent("nutriment", 15)
bitesize = 2
else
reagents.add_reagent("nutriment", 5)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/chawanmushi
name = "chawanmushi"
desc = "A legendary egg custard that makes friends out of enemies. Probably too hot for a cat to eat."
icon_state = "chawanmushi"
trash = "snack_bowl"
New()
..()
reagents.add_reagent("nutriment", 5)
bitesize = 1
/obj/item/weapon/reagent_containers/food/snacks/beetsoup
name = "beet soup"
desc = "Wait, how do you spell it, again..?"
icon_state = "beetsoup"
trash = "snack_bowl"
New()
..()
switch(rand(1,6))
if(1)
name = "borsch"
if(2)
name = "bortsch"
if(3)
name = "borstch"
if(4)
name = "borsh"
if(5)
name = "borshch"
if(6)
name = "borscht"
reagents.add_reagent("nutriment", 8)
bitesize = 2
/////////////////////////////////////////////////Sliceable////////////////////////////////////////
// All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels

View File

@@ -1005,6 +1005,36 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie
/datum/recipe/plumphelmetbiscuit
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet,
)
result = /obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit
/datum/recipe/mushroomsoup
reagents = list("water" = 5, "milk" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle,
)
result = /obj/item/weapon/reagent_containers/food/snacks/mushroomsoup
/datum/recipe/chawanmushi
reagents = list("water" = 5, "soysauce" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle,
)
result = /obj/item/weapon/reagent_containers/food/snacks/chawanmushi
/datum/recipe/beetsoup
reagents = list("water" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet,
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage,
)
result = /obj/item/weapon/reagent_containers/food/snacks/beetsoup
//////////////////////////////////////////
// bs12 food port stuff

View File

@@ -0,0 +1,672 @@
/*
SwapMaps library by Lummox JR
developed for digitalBYOND
http://www.digitalbyond.org
Version 2.1
The purpose of this library is to make it easy for authors to swap maps
in and out of their game using savefiles. Swapped-out maps can be
transferred between worlds for an MMORPG, sent to the client, etc.
This is facilitated by the use of a special datum and a global list.
Uses of swapmaps:
- Temporary battle arenas
- House interiors
- Individual custom player houses
- Virtually unlimited terrain
- Sharing maps between servers running different instances of the same
game
- Loading and saving pieces of maps for reusable room templates
*/
/*
User Interface:
VARS:
swapmaps_iconcache
An associative list of icon files with names, like
'player.dmi' = "player"
swapmaps_mode
This must be set at runtime, like in world/New().
SWAPMAPS_SAV 0 (default)
Uses .sav files for raw /savefile output.
SWAPMAPS_TEXT 1
Uses .txt files via ExportText() and ImportText(). These maps
are easily editable and appear to take up less space in the
current version of BYOND.
PROCS:
SwapMaps_Find(id)
Find a map by its id
SwapMaps_Load(id)
Load a map by its id
SwapMaps_Save(id)
Save a map by its id (calls swapmap.Save())
SwapMaps_Unload(id)
Save and unload a map by its id (calls swapmap.Unload())
SwapMaps_Save_All()
Save all maps
SwapMaps_DeleteFile(id)
Delete a map file
SwapMaps_CreateFromTemplate(id)
Create a new map by loading another map to use as a template.
This map has id==src and will not be saved. To make it savable,
change id with swapmap.SetID(newid).
SwapMaps_LoadChunk(id,turf/locorner)
Load a swapmap as a "chunk", at a specific place. A new datum is
created but it's not added to the list of maps to save or unload.
The new datum can be safely deleted without affecting the turfs
it loaded. The purpose of this is to load a map file onto part of
another swapmap or an existing part of the world.
locorner is the corner turf with the lowest x,y,z values.
SwapMaps_SaveChunk(id,turf/corner1,turf/corner2)
Save a piece of the world as a "chunk". A new datum is created
for the chunk, but it can be deleted without destroying any turfs.
The chunk file can be reloaded as a swapmap all its own, or loaded
via SwapMaps_LoadChunk() to become part of another map.
SwapMaps_GetSize(id)
Return a list corresponding to the x,y,z sizes of a map file,
without loading the map.
Returns null if the map is not found.
SwapMaps_AddIconToCache(name,icon)
Cache an icon file by name for space-saving storage
swapmap.New(id,x,y,z)
Create a new map; specify id, width (x), height (y), and
depth (z)
Default size is world.maxx,world.maxy,1
swapmap.New(id,turf1,turf2)
Create a new map; specify id and 2 corners
This becomes a /swapmap for one of the compiled-in maps, for
easy saving.
swapmap.New()
Create a new map datum, but does not allocate space or assign an
ID (used for loading).
swapmap.Del()
Deletes a map but does not save
swapmap.Save()
Saves to map_[id].sav
Maps with id==src are not saved.
swapmap.Unload()
Saves the map and then deletes it
Maps with id==src are not saved.
swapmap.SetID(id)
Change the map's id and make changes to the lookup list
swapmap.AllTurfs(z)
Returns a block of turfs encompassing the entire map, or on just
one z-level
z is in world coordinates; it is optional
swapmap.Contains(turf/T)
Returns nonzero if T is inside the map's boundaries.
Also works for objs and mobs, but the proc is not area-safe.
swapmap.InUse()
Returns nonzero if a mob with a key is within the map's
boundaries.
swapmap.LoCorner(z=z1)
Returns locate(x1,y1,z), where z=z1 if none is specified.
swapmap.HiCorner(z=z2)
Returns locate(x2,y2,z), where z=z2 if none is specified.
swapmap.BuildFilledRectangle(turf/corner1,turf/corner2,item)
Builds a filled rectangle of item from one corner turf to the
other, on multiple z-levels if necessary. The corners may be
specified in any order.
item is a type path like /turf/wall or /obj/barrel{full=1}.
swapmap.BuildRectangle(turf/corner1,turf/corner2,item)
Builds an unfilled rectangle of item from one corner turf to
the other, on multiple z-levels if necessary.
swapmap.BuildInTurfs(list/turfs,item)
Builds item on all of the turfs listed. The list need not
contain only turfs, or even only atoms.
*/
swapmap
var/id // a string identifying this map uniquely
var/x1 // minimum x,y,z coords
var/y1
var/z1
var/x2 // maximum x,y,z coords (also used as width,height,depth until positioned)
var/y2
var/z2
var/tmp/locked // don't move anyone to this map; it's saving or loading
var/tmp/mode // save as text-mode
var/ischunk // tells the load routine to load to the specified location
New(_id,x,y,z)
if(isnull(_id)) return
id=_id
mode=swapmaps_mode
if(isturf(x) && isturf(y))
/*
Special format: Defines a map as an existing set of turfs;
this is useful for saving a compiled map in swapmap format.
Because this is a compiled-in map, its turfs are not deleted
when the datum is deleted.
*/
x1=min(x:x,y:x);x2=max(x:x,y:x)
y1=min(x:y,y:y);y2=max(x:y,y:y)
z1=min(x:z,y:z);z2=max(x:z,y:z)
InitializeSwapMaps()
if(z2>swapmaps_compiled_maxz ||\
y2>swapmaps_compiled_maxy ||\
x2>swapmaps_compiled_maxx)
del(src)
return
x2=x?(x):world.maxx
y2=y?(y):world.maxy
z2=z?(z):1
AllocateSwapMap()
Del()
// a temporary datum for a chunk can be deleted outright
// for others, some cleanup is necessary
if(!ischunk)
swapmaps_loaded-=src
swapmaps_byname-=id
if(z2>swapmaps_compiled_maxz ||\
y2>swapmaps_compiled_maxy ||\
x2>swapmaps_compiled_maxx)
var/list/areas=new
for(var/atom/A in block(locate(x1,y1,z1),locate(x2,y2,z2)))
for(var/obj/O in A) del(O)
for(var/mob/M in A)
if(!M.key) del(M)
else M.loc=null
areas[A.loc]=null
del(A)
// delete areas that belong only to this map
for(var/area/a in areas)
if(a && !a.contents.len) del(a)
if(x2>=world.maxx || y2>=world.maxy || z2>=world.maxz) CutXYZ()
del(areas)
..()
/*
Savefile format:
map
id
x // size, not coords
y
z
areas // list of areas, not including default
[each z; 1 to depth]
[each y; 1 to height]
[each x; 1 to width]
type // of turf
AREA // if non-default; saved as a number (index into areas list)
vars // all other changed vars
*/
Write(savefile/S)
var
x;y;z;n
list/areas
area/defarea=locate(world.area)
if(!defarea) defarea=new world.area
areas=list()
for(var/turf/T in block(locate(x1,y1,z1),locate(x2,y2,z2)))
areas[T.loc]=null
for(n in areas) // quickly eliminate associations for smaller storage
areas-=n
areas+=n
areas-=defarea
InitializeSwapMaps()
locked=1
S["id"] << id
S["z"] << z2-z1+1
S["y"] << y2-y1+1
S["x"] << x2-x1+1
S["areas"] << areas
for(n in 1 to areas.len) areas[areas[n]]=n
var/oldcd=S.cd
for(z=z1,z<=z2,++z)
S.cd="[z-z1+1]"
for(y=y1,y<=y2,++y)
S.cd="[y-y1+1]"
for(x=x1,x<=x2,++x)
S.cd="[x-x1+1]"
var/turf/T=locate(x,y,z)
S["type"] << T.type
if(T.loc!=defarea) S["AREA"] << areas[T.loc]
T.Write(S)
S.cd=".."
S.cd=".."
sleep()
S.cd=oldcd
locked=0
del(areas)
Read(savefile/S,_id,turf/locorner)
var
x;y;z;n
list/areas
area/defarea=locate(world.area)
id=_id
if(locorner)
ischunk=1
x1=locorner.x
y1=locorner.y
z1=locorner.z
if(!defarea) defarea=new world.area
if(!_id)
S["id"] >> id
else
var/dummy
S["id"] >> dummy
S["z"] >> z2 // these are depth,
S["y"] >> y2 // height,
S["x"] >> x2 // width
S["areas"] >> areas
locked=1
AllocateSwapMap() // adjust x1,y1,z1 - x2,y2,z2 coords
var/oldcd=S.cd
for(z=z1,z<=z2,++z)
S.cd="[z-z1+1]"
for(y=y1,y<=y2,++y)
S.cd="[y-y1+1]"
for(x=x1,x<=x2,++x)
S.cd="[x-x1+1]"
var/tp
S["type"]>>tp
var/turf/T=locate(x,y,z)
T.loc.contents-=T
T=new tp(locate(x,y,z))
if("AREA" in S.dir)
S["AREA"]>>n
var/area/A=areas[n]
A.contents+=T
else defarea.contents+=T
// clear the turf
for(var/obj/O in T) del(O)
for(var/mob/M in T)
if(!M.key) del(M)
else M.loc=null
// finish the read
T.Read(S)
S.cd=".."
S.cd=".."
sleep()
S.cd=oldcd
locked=0
del(areas)
/*
Find an empty block on the world map in which to load this map.
If no space is found, increase world.maxz as necessary. (If the
map is greater in x,y size than the current world, expand
world.maxx and world.maxy too.)
Ignore certain operations if loading a map as a chunk. Use the
x1,y1,z1 position for it, and *don't* count it as a loaded map.
*/
proc/AllocateSwapMap()
InitializeSwapMaps()
world.maxx=max(x2,world.maxx) // stretch x/y if necessary
world.maxy=max(y2,world.maxy)
if(!ischunk)
if(world.maxz<=swapmaps_compiled_maxz)
z1=swapmaps_compiled_maxz+1
x1=1;y1=1
else
var/list/l=ConsiderRegion(1,1,world.maxx,world.maxy,swapmaps_compiled_maxz+1)
x1=l[1]
y1=l[2]
z1=l[3]
del(l)
x2+=x1-1
y2+=y1-1
z2+=z1-1
world.maxz=max(z2,world.maxz) // stretch z if necessary
if(!ischunk)
swapmaps_loaded[src]=null
swapmaps_byname[id]=src
proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2)
while(1)
var/nextz=0
var/swapmap/M
for(M in swapmaps_loaded)
if(M.z2<Z1 || (Z2 && M.z1>Z2) || M.z1>=Z1+z2 ||\
M.x1>X2 || M.x2<X1 || M.x1>=X1+x2 ||\
M.y1>Y2 || M.y2<Y1 || M.y1>=Y1+y2) continue
// look for sub-regions with a defined ceiling
var/nz2=Z2?(Z2):Z1+z2-1+M.z2-M.z1
if(M.x1>=X1+x2)
.=ConsiderRegion(X1,Y1,M.x1-1,Y2,Z1,nz2)
if(.) return
else if(M.x2<=X2-x2)
.=ConsiderRegion(M.x2+1,Y1,X2,Y2,Z1,nz2)
if(.) return
if(M.y1>=Y1+y2)
.=ConsiderRegion(X1,Y1,X2,M.y1-1,Z1,nz2)
if(.) return
else if(M.y2<=Y2-y2)
.=ConsiderRegion(X1,M.y2+1,X2,Y2,Z1,nz2)
if(.) return
nextz=nextz?min(nextz,M.z2+1):(M.z2+1)
if(!M)
/* If nextz is not 0, then at some point there was an overlap that
could not be resolved by using an area to the side */
if(nextz) Z1=nextz
if(!nextz || (Z2 && Z2-Z1+1<z2))
return (!Z2 || Z2-Z1+1>=z2)?list(X1,Y1,Z1):null
X1=1;X2=world.maxx
Y1=1;Y2=world.maxy
proc/CutXYZ()
var/mx=swapmaps_compiled_maxx
var/my=swapmaps_compiled_maxy
var/mz=swapmaps_compiled_maxz
for(var/swapmap/M in swapmaps_loaded) // may not include src
mx=max(mx,M.x2)
my=max(my,M.y2)
mz=max(mz,M.z2)
world.maxx=mx
world.maxy=my
world.maxz=mz
// save and delete
proc/Unload()
Save()
del(src)
proc/Save()
if(id==src) return 0
var/savefile/S=mode?(new):new("map_[id].sav")
S << src
while(locked) sleep(1)
if(mode)
fdel("map_[id].txt")
S.ExportText("/","map_[id].txt")
return 1
// this will not delete existing savefiles for this map
proc/SetID(newid)
swapmaps_byname-=id
id=newid
swapmaps_byname[id]=src
proc/AllTurfs(z)
if(isnum(z) && (z<z1 || z>z2)) return null
return block(LoCorner(z),HiCorner(z))
// this could be safely called for an obj or mob as well, but
// probably not an area
proc/Contains(turf/T)
return (T && T.x>=x1 && T.x<=x2\
&& T.y>=y1 && T.y<=y2\
&& T.z>=z1 && T.z<=z2)
proc/InUse()
for(var/turf/T in AllTurfs())
for(var/mob/M in T) if(M.key) return 1
proc/LoCorner(z=z1)
return locate(x1,y1,z)
proc/HiCorner(z=z2)
return locate(x2,y2,z)
/*
Build procs: Take 2 turfs as corners, plus an item type.
An item may be like:
/turf/wall
/obj/fence{icon_state="iron"}
*/
proc/BuildFilledRectangle(turf/T1,turf/T2,item)
if(!Contains(T1) || !Contains(T2)) return
var/turf/T=T1
// pick new corners in a block()-friendly form
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
for(T in block(T1,T2)) new item(T)
proc/BuildRectangle(turf/T1,turf/T2,item)
if(!Contains(T1) || !Contains(T2)) return
var/turf/T=T1
// pick new corners in a block()-friendly form
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
if(T2.x-T1.x<2 || T2.y-T1.y<2) BuildFilledRectangle(T1,T2,item)
else
//for(T in block(T1,T2)-block(locate(T1.x+1,T1.y+1,T1.z),locate(T2.x-1,T2.y-1,T2.z)))
for(T in block(T1,locate(T2.x,T1.y,T2.z))) new item(T)
for(T in block(locate(T1.x,T2.y,T1.z),T2)) new item(T)
for(T in block(locate(T1.x,T1.y+1,T1.z),locate(T1.x,T2.y-1,T2.z))) new item(T)
for(T in block(locate(T2.x,T1.y+1,T1.z),locate(T2.x,T2.y-1,T2.z))) new item(T)
/*
Supplementary build proc: Takes a list of turfs, plus an item
type. Actually the list doesn't have to be just turfs.
*/
proc/BuildInTurfs(list/turfs,item)
for(var/T in turfs) new item(T)
atom
Write(savefile/S)
for(var/V in vars-"x"-"y"-"z"-"contents"-"icon"-"overlays"-"underlays")
if(issaved(vars[V]))
if(vars[V]!=initial(vars[V])) S[V]<<vars[V]
else S.dir.Remove(V)
if(icon!=initial(icon))
if(swapmaps_iconcache && swapmaps_iconcache[icon])
S["icon"]<<swapmaps_iconcache[icon]
else S["icon"]<<icon
// do not save mobs with keys; do save other mobs
var/mob/M
for(M in src) if(M.key) break
if(overlays.len) S["overlays"]<<overlays
if(underlays.len) S["underlays"]<<underlays
if(contents.len && !isarea(src))
var/list/l=contents
if(M)
l=l.Copy()
for(M in src) if(M.key) l-=M
if(l.len) S["contents"]<<l
if(l!=contents) del(l)
Read(savefile/S)
var/list/l
if(contents.len) l=contents
..()
// if the icon was a text string, it would not have loaded properly
// replace it from the cache list
if(!icon && ("icon" in S.dir))
var/ic
S["icon"]>>ic
if(istext(ic)) icon=swapmaps_iconcache[ic]
if(l && contents!=l)
contents+=l
del(l)
// set this up (at runtime) as follows:
// list(\
// 'player.dmi'="player",\
// 'monster.dmi'="monster",\
// ...
// 'item.dmi'="item")
var/list/swapmaps_iconcache
// preferred mode; sav or text
var/const/SWAPMAPS_SAV=0
var/const/SWAPMAPS_TEXT=1
var/swapmaps_mode=SWAPMAPS_SAV
var/swapmaps_compiled_maxx
var/swapmaps_compiled_maxy
var/swapmaps_compiled_maxz
var/swapmaps_initialized
var/swapmaps_loaded
var/swapmaps_byname
proc/InitializeSwapMaps()
if(swapmaps_initialized) return
swapmaps_initialized=1
swapmaps_compiled_maxx=world.maxx
swapmaps_compiled_maxy=world.maxy
swapmaps_compiled_maxz=world.maxz
swapmaps_loaded=list()
swapmaps_byname=list()
if(swapmaps_iconcache)
for(var/V in swapmaps_iconcache)
// reverse-associate everything
// so you can look up an icon file by name or vice-versa
swapmaps_iconcache[swapmaps_iconcache[V]]=V
proc/SwapMaps_AddIconToCache(name,icon)
if(!swapmaps_iconcache) swapmaps_iconcache=list()
swapmaps_iconcache[name]=icon
swapmaps_iconcache[icon]=name
proc/SwapMaps_Find(id)
InitializeSwapMaps()
return swapmaps_byname[id]
proc/SwapMaps_Load(id)
InitializeSwapMaps()
var/swapmap/M=swapmaps_byname[id]
if(!M)
var/savefile/S
var/text=0
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
text=1
else if(fexists("map_[id].sav"))
S=new("map_[id].sav")
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
text=1
else return // no file found
if(text)
S=new
S.ImportText("/",file("map_[id].txt"))
S >> M
while(M.locked) sleep(1)
M.mode=text
return M
proc/SwapMaps_Save(id)
InitializeSwapMaps()
var/swapmap/M=swapmaps_byname[id]
if(M) M.Save()
return M
proc/SwapMaps_Save_All()
InitializeSwapMaps()
for(var/swapmap/M in swapmaps_loaded)
if(M) M.Save()
proc/SwapMaps_Unload(id)
InitializeSwapMaps()
var/swapmap/M=swapmaps_byname[id]
if(!M) return // return silently from an error
M.Unload()
return 1
proc/SwapMaps_DeleteFile(id)
fdel("map_[id].sav")
fdel("map_[id].txt")
proc/SwapMaps_CreateFromTemplate(template_id)
var/swapmap/M=new
var/savefile/S
var/text=0
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
text=1
else if(fexists("map_[template_id].sav"))
S=new("map_[template_id].sav")
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
text=1
else
world.log << "SwapMaps error in SwapMaps_CreateFromTemplate(): map_[template_id] file not found."
return
if(text)
S=new
S.ImportText("/",file("map_[template_id].txt"))
/*
This hacky workaround is needed because S >> M will create a brand new
M to fill with data. There's no way to control the Read() process
properly otherwise. The //.0 path should always match the map, however.
*/
S.cd="//.0"
M.Read(S,M)
M.mode=text
while(M.locked) sleep(1)
return M
proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
var/swapmap/M=new
var/savefile/S
var/text=0
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
text=1
else if(fexists("map_[chunk_id].sav"))
S=new("map_[chunk_id].sav")
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
text=1
else
world.log << "SwapMaps error in SwapMaps_LoadChunk(): map_[chunk_id] file not found."
return
if(text)
S=new
S.ImportText("/",file("map_[chunk_id].txt"))
/*
This hacky workaround is needed because S >> M will create a brand new
M to fill with data. There's no way to control the Read() process
properly otherwise. The //.0 path should always match the map, however.
*/
S.cd="//.0"
M.Read(S,M,locorner)
while(M.locked) sleep(1)
del(M)
return 1
proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
if(!corner1 || !corner2)
world.log << "SwapMaps error in SwapMaps_SaveChunk():"
if(!corner1) world.log << " corner1 turf is null"
if(!corner2) world.log << " corner2 turf is null"
return
var/swapmap/M=new
M.id=chunk_id
M.ischunk=1 // this is a chunk
M.x1=min(corner1.x,corner2.x)
M.y1=min(corner1.y,corner2.y)
M.z1=min(corner1.z,corner2.z)
M.x2=max(corner1.x,corner2.x)
M.y2=max(corner1.y,corner2.y)
M.z2=max(corner1.z,corner2.z)
M.mode=swapmaps_mode
M.Save()
while(M.locked) sleep(1)
del(M)
return 1
proc/SwapMaps_GetSize(id)
var/savefile/S
var/text=0
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
text=1
else if(fexists("map_[id].sav"))
S=new("map_[id].sav")
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
text=1
else
world.log << "SwapMaps error in SwapMaps_GetSize(): map_[id] file not found."
return
if(text)
S=new
S.ImportText("/",file("map_[id].txt"))
/*
The //.0 path should always be the map. There's no other way to
read this data.
*/
S.cd="//.0"
var/x
var/y
var/z
S["x"] >> x
S["y"] >> y
S["z"] >> z
return list(x,y,z)

View File

@@ -0,0 +1,73 @@
var/global/dmm_suite/maploader = new
dmm_suite{
/*
dmm_suite version 1.0
Released January 30th, 2011.
defines the object /dmm_suite
- Provides the proc load_map()
- Loads the specified map file onto the specified z-level.
- provides the proc write_map()
- Returns a text string of the map in dmm format
ready for output to a file.
- provides the proc save_map()
- Returns a .dmm file if map is saved
- Returns FALSE if map fails to save
The dmm_suite provides saving and loading of map files in BYOND's native DMM map
format. It approximates the map saving and loading processes of the Dream Maker
and Dream Seeker programs so as to allow editing, saving, and loading of maps at
runtime.
------------------------
To save a map at runtime, create an instance of /dmm_suite, and then call
write_map(), which accepts three arguments:
- A turf representing one corner of a three dimensional grid (Required).
- Another turf representing the other corner of the same grid (Required).
- Any, or a combination, of several bit flags (Optional, see documentation).
The order in which the turfs are supplied does not matter, the /dmm_writer will
determine the grid containing both, in much the same way as DM's block() function.
write_map() will then return a string representing the saved map in dmm format;
this string can then be saved to a file, or used for any other purose.
------------------------
To load a map at runtime, create an instance of /dmm_suite, and then call load_map(),
which accepts two arguments:
- A .dmm file to load (Required).
- A number representing the z-level on which to start loading the map (Optional).
The /dmm_suite will load the map file starting on the specified z-level. If no
z-level was specified, world.maxz will be increased so as to fit the map. Note
that if you wish to load a map onto a z-level that already has objects on it,
you will have to handle the removal of those objects. Otherwise the new map will
simply load the new objects on top of the old ones.
Also note that all type paths specified in the .dmm file must exist in the world's
code, and that the /dmm_reader trusts that files to be loaded are in fact valid
.dmm files. Errors in the .dmm format will cause runtime errors.
*/
verb/load_map(var/dmm_file as file, var/z_offset as num){
// dmm_file: A .dmm file to load (Required).
// z_offset: A number representing the z-level on which to start loading the map (Optional).
}
verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
// t1: A turf representing one corner of a three dimensional grid (Required).
// t2: Another turf representing the other corner of the same grid (Required).
// flags: Any, or a combination, of several bit flags (Optional, see documentation).
}
// save_map is included as a legacy proc. Use write_map instead.
verb/save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num){
// t1: A turf representing one corner of a three dimensional grid (Required).
// t2: Another turf representing the other corner of the same grid (Required).
// map_name: A valid name for the map to be saved, such as "castle" (Required).
// flags: Any, or a combination, of several bit flags (Optional, see documentation).
}
}

View File

@@ -0,0 +1,237 @@
/*
DMP to swapmap converter
version 1.0
by Lummox JR
*/
mob/verb/Convert(filename as file)
dmp2swapmap(filename)
proc/d2sm_prepmap(filename)
var/txt = file2text(filename)
if(!txt) return
var/i,j
i=findText(txt,ascii2text(13)) // eliminate carriage returns
while(i)
txt=copytext(txt,1,i)+copytext(txt,i+1)
i=findText(txt,ascii2text(13),i)
i=findText(txt,"\\\n")
while(i)
for(j=i+2,j<=length(txt),++j) if(text2ascii(txt,j)>32) break
txt=copytext(txt,1,i)+copytext(txt,j)
i=findText(txt,"\\\n",i)
return txt
proc/dmp2swapmap(filename)
//var/txt = file2text(filename)
//if(!txt) return
var/txt = d2sm_prepmap(filename)
var/mapname="[filename]"
var/i,j,k
i=findtext(mapname,".dmp")
while(i && i+4<length(mapname)) i=findtext(mapname,".dmp",i+1)
mapname=copytext(mapname,1,i)
/* i=findText(txt,ascii2text(13))
while(i)
txt=copytext(txt,1,i)+copytext(txt,i+1)
i=findText(txt,ascii2text(13),i)
i=findText(txt,"\\\n")
while(i)
for(j=i+2,j<=length(txt),++j) if(text2ascii(txt,j)>32) break
txt=copytext(txt,1,i)+copytext(txt,j)
i=findText(txt,"\\\n",i) */
var/list/codes=new
var/codelen=1
var/list/areas
var/mode=34
var/z=0
var/X=0,Y=0,Z=0
while(txt)
if(text2ascii(txt)==34)
if(mode!=34)
world << "Corrupt map file [filename]: Unexpected code found after z-level [z]"
return
// standard line:
// "a" = (/obj, /obj, /turf, /area)
i=findtext(txt,"\"",2)
var/code=copytext(txt,2,i)
codelen=length(code)
i=findtext(txt,"(",i)
if(!i)
world << "Corrupt map file [filename]: No type list follows \"[code]\""
return
k=findtext(txt,"\n",++i)
j=(k || length(txt+1))
while(--j>=i && text2ascii(txt,j)!=41)
if(j<i)
world << "Corrupt map file [filename]: Type list following \"[code]\" is incomplete"
return
var/list/L = d2sm_ParseCommaList(copytext(txt,i,j))
if(istext(L))
world << "Corrupt map file [filename]: [L]"
return
if(L.len<2)
world << "Corrupt map file [filename]: Type list following \"[code]\" has only 1 item"
return
txt=k?copytext(txt,k+1):null
if(L[L.len] == "[world.area]") L[L.len]=0
else
if(!areas) areas=list()
i=areas.Find(L[L.len])
if(i) L[L.len]=i
else
areas+=L[L.len]
L[L.len]=areas.len
var/codetrans=d2sm_ConvertType(L[L.len-1],"\t\t\t\t")
if(L[L.len]) codetrans+="\t\t\t\tAREA = [L[L.len]]\n"
if(L.len>2) codetrans+=d2sm_Contents(L,L.len-2,"\t\t\t\t")
codes[code]=copytext(codetrans,1,length(codetrans))
else if(text2ascii(txt)==40)
mode=40
// standard line (top-down, left-right symbol order):
// (1,1,1) = {"
// abcde
// bcdef
// "}
i=d2sm_MatchBrace(txt,1,40)
if(!i)
world << "Corrupt map file [filename]: No matching ) for coordinates: [copytext(txt,1,findtext(txt,"\n"))]"
return
var/list/coords=d2sm_ParseCommaList(copytext(txt,2,i))
if(istext(coords) || coords.len!=3)
world << "Corrupt map file [filename]: [istext(coords)?(coords):"[copytext(txt,1,i+1)] is not a valid (x,y,z) coordinate"]"
return
j=findtext(txt,"{",i+1)
if(!j)
world << "Corrupt map file [filename]: No braces {} following [copytext(txt,1,i+1)]"
return
k=d2sm_MatchBrace(txt,j,123)
if(!k)
world << "Corrupt map file [filename]: No closing brace } following [copytext(txt,1,i+1)]"
return
var/mtxt=copytext(txt,j+1,k)
if(findText(mtxt,"\"\n")!=1 || !findText(mtxt,"\n\"",length(mtxt)-1))
world << findText(mtxt,"\"\n")
world << findText(mtxt,"\n\"",length(mtxt)-1)
world << "Corrupt map file [filename]: No quotes in braces following [copytext(txt,1,i+1)]"
return
mtxt=copytext(mtxt,2,length(mtxt))
var/_x=0,_y=0
for(i=1,,++_y)
j=findText(mtxt,"\n",i+1)
if(!j) break
_x=max(_x,(j-i-1)/codelen)
i=j
X=max(X,_x)
Y=max(Y,_y)
z=text2num(coords[3])
Z=max(Z,z)
txt=copytext(txt,k+1)
else
i=findtext(txt,"\n")
txt=i?copytext(txt,i+1):null
world << "Map size: [X],[Y],[Z]"
//for(var/code in codes)
// world << "Code \"[code]\":\n[codes[code]]"
fdel("map_[mapname].txt")
var/F = file("map_[mapname].txt")
F << ". = object(\".0\")\n.0\n\ttype = /swapmap\n\tid = \"[mapname]\"\n\tz = [Z]\n\ty = [Y]\n\tx = [X]"
if(areas)
txt=""
for(i=0,i<areas.len,++i)
txt+="[i?", ":""]object(\".[i]\")"
F << "\tareas = list([txt])"
for(i=0,i<areas.len,++i)
F << "\t\t.[i]"
txt=d2sm_ConvertType(areas[i+1],"\t\t\t")
F << copytext(txt,1,length(txt))
// 2nd pass
txt=d2sm_prepmap(filename)
while(txt)
// skip all non-data sections
if(text2ascii(txt)!=40)
i=findText(txt,"\n")
if(i) txt=copytext(txt,i+1)
else txt=null
continue
i=d2sm_MatchBrace(txt,1,40)
var/list/coords=d2sm_ParseCommaList(copytext(txt,2,i))
j=findtext(txt,"{",i+1)
k=d2sm_MatchBrace(txt,j,123)
var/mtxt=copytext(txt,j+2,k-1)
var/_x=0,_y=0
for(i=1,,++_y)
j=findText(mtxt,"\n",i+1)
if(!j) break
_x=max(_x,(j-i-1)/codelen)
i=j
// print out this z-level now
F << "\t[coords[3]]"
i=1
for(var/y=_y,y>0,--y) // map is top-down
++i
F << "\t\t[y]"
for(var/x in 1 to _x)
F << "\t\t\t[x]"
j=i+codelen
F << codes[copytext(mtxt,i,j)]
i=j
txt=copytext(txt,k+1)
/* for(z in 1 to Z)
F << "\t[z]"
for(var/y in 1 to Y)
F << "\t\t[y]"
for(var/x in 1 to X)
F << "\t\t\t[x]"
F << codes[pick(codes)] */
proc/d2sm_ParseCommaList(txt)
var/list/L=new
var/i,ch
for(i=1,i<=length(txt),++i)
if(text2ascii(txt,i)>32) break
for(,i<=length(txt),++i)
ch=text2ascii(txt,i)
if(ch==44)
L+=copytext(txt,1,i)
for(++i,i<=length(txt),++i) if(text2ascii(txt,i)>32) break
txt=copytext(txt,i)
i=0;continue
if(ch==40 || ch==91 || ch==123)
i=d2sm_MatchBrace(txt,i,ch)
if(!i) return "No matching brace found for [ascii2text(ch)]"
if(i>1) L+=copytext(txt,1,i)
return L
proc/d2sm_MatchBrace(txt, i, which)
if(which==40) ++which
else which+=2
var/j,ch
for(j=i+1,j<=length(txt),++j)
ch=text2ascii(txt,j)
if(ch==which) return j
if(ch==40 || ch==91 || ch==123)
j=d2sm_MatchBrace(txt,j,ch)
if(!j) return 0
proc/d2sm_ConvertType(tt,tabs="")
var/i=findText(tt,"{")
if(!i) return "[tabs]type = [tt]\n"
.="[tabs]type = [copytext(tt,1,i)]\n"
var/list/L=d2sm_ParseCommaList(copytext(tt,i+1,d2sm_MatchBrace(tt,i,123)))
if(istext(L)) return
for(var/pair in L)
.="[.][tabs][pair]\n"
proc/d2sm_Contents(list/conts,n,tabs="")
.="[tabs]contents = list("
var/i
for(i=0,i<n,++i)
.+="[i?", ":""]object(\".[i]\")"
.+=")\n"
tabs+="\t"
for(i=0,i<n,++i)
.+="[tabs].[i]\n"
.+=d2sm_ConvertType(conts[i+1],tabs+"\t")

View File

@@ -0,0 +1,47 @@
var/list/potentialRandomZlevels = list()
proc/createRandomZlevel()
var/text = file2text("maps/RandomZLevels/fileList.txt")
if (!text) // No random Z-levels for you.
return
world << "\red \b Reticulating Splines"
var/list/CL = dd_text2list(text, "\n")
for (var/t in CL)
if (!t)
continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
// var/value = null
if (pos)
name = lowertext(copytext(t, 1, pos))
// value = copytext(t, pos + 1)
else
name = lowertext(t)
if (!name)
continue
potentialRandomZlevels.Add(t)
if(potentialRandomZlevels.len)
var/map = pick(potentialRandomZlevels)
var/file = file(map)
if(isfile(file))
maploader.load_map(file)
else
return

249
code/modules/maps/reader.dm Normal file
View File

@@ -0,0 +1,249 @@
dmm_suite{
load_map(var/dmm_file as file, var/z_offset as num){
if(!z_offset){
z_offset = world.maxz+1
}
var/quote = ascii2text(34)
var/tfile = file2text(dmm_file)
var/tfile_len = length(tfile)
var/list/grid_models[0]
var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0)))
for(var/lpos=1;lpos<tfile_len;lpos=findtext(tfile,"\n",lpos,0)+1){
var/tline = copytext(tfile,lpos,findtext(tfile,"\n",lpos,0))
if(copytext(tline,1,2)!=quote){break}
var/model_key = copytext(tline,2,findtext(tfile,quote,2,0))
var/model_contents = copytext(tline,findtext(tfile,"=")+3,length(tline))
grid_models[model_key] = model_contents
sleep(-1)
}
var/zcrd=-1
var/ycrd=0
var/xcrd=0
for(var/zpos=findtext(tfile,"\n(1,1,");TRUE;zpos=findtext(tfile,"\n(1,1,",zpos+1,0)){
zcrd++
world.maxz = max(world.maxz, zcrd+z_offset)
ycrd=0
var/zgrid = copytext(tfile,findtext(tfile,quote+"\n",zpos,0)+2,findtext(tfile,"\n"+quote,zpos,0)+1)
for(var/gpos=1;gpos!=0;gpos=findtext(zgrid,"\n",gpos,0)+1){
var/grid_line = copytext(zgrid,gpos,findtext(zgrid,"\n",gpos,0)+1)
var/y_depth = length(zgrid)/(length(grid_line))
if(world.maxy<y_depth){world.maxy=y_depth}
grid_line=copytext(grid_line,1,length(grid_line))
if(!ycrd){
ycrd = y_depth
}
else{ycrd--}
xcrd=0
for(var/mpos=1;mpos<=length(grid_line);mpos+=key_len){
xcrd++
if(world.maxx<xcrd){world.maxx=xcrd}
var/model_key = copytext(grid_line,mpos,mpos+key_len)
parse_grid(grid_models[model_key],xcrd,ycrd,zcrd+z_offset)
}
if(gpos+length(grid_line)+1>length(zgrid)){break}
sleep(-1)
}
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len){break}
sleep(-1)
}
}
proc{
parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num){
/*Method parse_grid()
- Accepts a text string containing a comma separated list of type paths of the
same construction as those contained in a .dmm file, and instantiates them.
*/
var/list/text_strings[0]
for(var/index=1;findtext(model,quote);index++){
/*Loop: Stores quoted portions of text in text_strings, and replaces them with an
index to that list.
- Each iteration represents one quoted section of text.
*/
text_strings.len=index
text_strings[index] = copytext(model,findtext(model,quote)+1,findtext(model,quote,findtext(model,quote)+1,0))
model = copytext(model,1,findtext(model,quote))+"~[index]"+copytext(model,findtext(model,quote,findtext(model,quote)+1,0)+1,0)
sleep(-1)
}
var/list/old_turf_underlays[0]
var/old_turf_density
var/old_turf_opacity
/*The old_turf variables store information about turfs instantiated in this location/iteration.
This is done to approximate the layered turf effect of DM's map editor.
An image of each turf is stored in old_turf_underlays[], and is later added to the new turf's underlays.
*/
for(var/dpos=1;dpos!=0;dpos=findtext(model,",",dpos,0)+1){
/*Loop: Identifies each object's data, instantiates it, and reconstitues it's fields.
- Each iteration represents one object's data, including type path and field values.
*/
var/full_def = copytext(model,dpos,findtext(model,",",dpos,0))
var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{")))
var/list/attributes[0]
if(findtext(full_def,"{")){
full_def = copytext(full_def,1,length(full_def))
for(var/apos=findtext(full_def,"{")+1;apos!=0;apos=findtext(full_def,";",apos,0)+1){
//Loop: Identifies each attribute/value pair, and stores it in attributes[].
attributes.Add(copytext(full_def,apos,findtext(full_def,";",apos,0)))
if(!findtext(copytext(full_def,apos,0),";")){break}
sleep(-1)
}
}
//Construct attributes associative list
var/list/fields = new(0)
for(var/index=1;index<=attributes.len;index++){
var/trim_left = trim_text(copytext(attributes[index],1,findtext(attributes[index],"=")))
var/trim_right = trim_text(copytext(attributes[index],findtext(attributes[index],"=")+1,0))
//Check for string
if(findtext(trim_right,"~")){
var/reference_index = copytext(trim_right,findtext(trim_right,"~")+1,0)
trim_right=text_strings[text2num(reference_index)]
}
//Check for number
else if(isnum(text2num(trim_right))){
trim_right = text2num(trim_right)
}
//Check for file
else if(copytext(trim_right,1,2) == "'"){
trim_right = file(copytext(trim_right,2,length(trim_right)))
}
fields[trim_left] = trim_right
}
//End construction
//Begin Instanciation
var/atom/instance
var/dmm_suite/preloader/_preloader = new(fields)
if(ispath(atom_def,/area)){
instance = locate(atom_def)
instance.contents.Add(locate(xcrd,ycrd,zcrd))
}
else if(ispath(atom_def,/turf)){
var/turf/old_turf = locate(xcrd,ycrd,zcrd)
if(old_turf.density){old_turf_density = 1}
if(old_turf.opacity){old_turf_opacity = 1}
if(old_turf.icon){
var/image/old_turf_image = image(old_turf.icon,null,old_turf.icon_state,old_turf.layer,old_turf.dir)
old_turf_underlays.Add(old_turf_image)
}
instance = new atom_def(old_turf, _preloader)
for(var/inverse_index=old_turf_underlays.len;inverse_index;inverse_index--){
var/image/image_underlay = old_turf_underlays[inverse_index]
image_underlay.loc = instance
instance.underlays.Add(image_underlay)
}
if(!instance.density){instance.density = old_turf_density}
if(!instance.opacity){instance.opacity = old_turf_opacity}
}
if(_preloader && instance){
_preloader.load(instance)
}
//End Instanciation
if(!findtext(copytext(model,dpos,0),",")){break}
sleep(-1)
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
for(var/dpos=1;dpos!=0;dpos=findtext(model,",",dpos,0)+1)
{
/*Loop: Identifies each object's data, instantiates it, and reconstitues it's fields.
- Each iteration represents one object's data, including type path and field values.
*/
var/full_def = copytext(model,dpos,findtext(model,",",dpos,0))
var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{")))
var/list/attributes[0]
if(findtext(full_def,"{")){
full_def = copytext(full_def,1,length(full_def))
for(var/apos=findtext(full_def,"{")+1;apos!=0;apos=findtext(full_def,";",apos,0)+1){
//Loop: Identifies each attribute/value pair, and stores it in attributes[].
attributes.Add(copytext(full_def,apos,findtext(full_def,";",apos,0)))
if(!findtext(copytext(full_def,apos,0),";")){break}
sleep(-1)
}
}
//Construct attributes associative list
var/list/fields = new(0)
for(var/index=1;index<=attributes.len;index++){
var/trim_left = trim_text(copytext(attributes[index],1,findtext(attributes[index],"=")))
var/trim_right = trim_text(copytext(attributes[index],findtext(attributes[index],"=")+1,0))
//Check for string
if(findtext(trim_right,"~")){
var/reference_index = copytext(trim_right,findtext(trim_right,"~")+1,0)
trim_right=text_strings[text2num(reference_index)]
}
//Check for number
else if(isnum(text2num(trim_right))){
trim_right = text2num(trim_right)
}
//Check for file
else if(copytext(trim_right,1,2) == "'"){
trim_right = file(copytext(trim_right,2,length(trim_right)))
}
fields[trim_left] = trim_right
}
//End construction
//Begin Instanciation
var/atom/instance
var/dmm_suite/preloader/_preloader = new(fields)
if(!ispath(atom_def,/area) && !ispath(atom_def,/turf))
{
instance = new atom_def(locate(xcrd,ycrd,zcrd), _preloader)
}
if(_preloader && instance)
{
_preloader.load(instance)
}
//End Instanciation
if(!findtext(copytext(model,dpos,0),",")){break}
sleep(-1)
}
}
trim_text(var/what as text){
while(length(what) && findtext(what," ",1,2)){
what=copytext(what,2,0)
}
while(length(what) && findtext(what," ",length(what),0)){
what=copytext(what,1,length(what))
}
return what
}
}
}
atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader){
if(istype(_dmm_preloader, /dmm_suite/preloader)){
_dmm_preloader.load(src)
}
. = ..()
}
dmm_suite{
preloader{
parent_type = /datum
var{
list/attributes
}
New(list/the_attributes){
.=..()
if(!the_attributes.len){ Del()}
attributes = the_attributes
}
proc{
load(atom/what){
for(var/attribute in attributes){
what.vars[attribute] = attributes[attribute]
}
Del()
}
}
}
}

174
code/modules/maps/writer.dm Normal file
View File

@@ -0,0 +1,174 @@
#define DMM_IGNORE_AREAS 1
#define DMM_IGNORE_TURFS 2
#define DMM_IGNORE_OBJS 4
#define DMM_IGNORE_NPCS 8
#define DMM_IGNORE_PLAYERS 16
#define DMM_IGNORE_MOBS 24
dmm_suite{
var{
quote = "\""
list/letter_digits = list(
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z",
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z"
)
}
save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num){
//Check for illegal characters in file name... in a cheap way.
if(!((ckeyEx(map_name)==map_name) && ckeyEx(map_name))){
CRASH("Invalid text supplied to proc save_map, invalid characters or empty string.")
}
//Check for valid turfs.
if(!isturf(t1) || !isturf(t2)){
CRASH("Invalid arguments supplied to proc save_map, arguments were not turfs.")
}
var/file_text = write_map(t1,t2,flags)
if(fexists("[map_name].dmm")){
fdel("[map_name].dmm")
}
var/saved_map = file("[map_name].dmm")
saved_map << file_text
return saved_map
}
write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
//Check for valid turfs.
if(!isturf(t1) || !isturf(t2)){
CRASH("Invalid arguments supplied to proc write_map, arguments were not turfs.")
}
var/turf/nw = locate(min(t1.x,t2.x),max(t1.y,t2.y),min(t1.z,t2.z))
var/turf/se = locate(max(t1.x,t2.x),min(t1.y,t2.y),max(t1.z,t2.z))
var/list/templates[0]
var/template_buffer = {""}
var/dmm_text = {""}
for(var/pos_z=nw.z;pos_z<=se.z;pos_z++){
for(var/pos_y=nw.y;pos_y>=se.y;pos_y--){
for(var/pos_x=nw.x;pos_x<=se.x;pos_x++){
var/turf/test_turf = locate(pos_x,pos_y,pos_z)
var/test_template = make_template(test_turf, flags)
var/template_number = templates.Find(test_template)
if(!template_number){
templates.Add(test_template)
template_number = templates.len
}
template_buffer += "[template_number],"
}
template_buffer += ";"
}
template_buffer += "."
}
var/key_length = round/*floor*/(log(letter_digits.len,templates.len-1)+1)
var/list/keys[templates.len]
for(var/key_pos=1;key_pos<=templates.len;key_pos++){
keys[key_pos] = get_model_key(key_pos,key_length)
dmm_text += {""[keys[key_pos]]" = ([templates[key_pos]])\n"}
}
var/z_level = 0
for(var/z_pos=1;TRUE;z_pos=findtext(template_buffer,".",z_pos)+1){
if(z_pos>=length(template_buffer)){break}
if(z_level){dmm_text+={"\n"}}
dmm_text += {"\n(1,1,[++z_level]) = {"\n"}
var/z_block = copytext(template_buffer,z_pos,findtext(template_buffer,".",z_pos))
for(var/y_pos=1;TRUE;y_pos=findtext(z_block,";",y_pos)+1){
if(y_pos>=length(z_block)){break}
var/y_block = copytext(z_block,y_pos,findtext(z_block,";",y_pos))
for(var/x_pos=1;TRUE;x_pos=findtext(y_block,",",x_pos)+1){
if(x_pos>=length(y_block)){break}
var/x_block = copytext(y_block,x_pos,findtext(y_block,",",x_pos))
var/key_number = text2num(x_block)
var/temp_key = keys[key_number]
dmm_text += temp_key
sleep(-1)
}
dmm_text += {"\n"}
sleep(-1)
}
dmm_text += {"\"}"}
sleep(-1)
}
return dmm_text
}
proc{
make_template(var/turf/model as turf, var/flags as num){
var/template = ""
var/obj_template = ""
var/mob_template = ""
var/turf_template = ""
if(!(flags & DMM_IGNORE_TURFS)){
turf_template = "[model.type][check_attributes(model)],"
} else{ turf_template = "[world.turf],"}
var/area_template = ""
if(!(flags & DMM_IGNORE_OBJS)){
for(var/obj/O in model.contents){
obj_template += "[O.type][check_attributes(O)],"
}
}
for(var/mob/M in model.contents){
if(M.client){
if(!(flags & DMM_IGNORE_PLAYERS)){
mob_template += "[M.type][check_attributes(M)],"
}
}
else{
if(!(flags & DMM_IGNORE_NPCS)){
mob_template += "[M.type][check_attributes(M)],"
}
}
}
if(!(flags & DMM_IGNORE_AREAS)){
var/area/m_area = model.loc
area_template = "[m_area.type][check_attributes(m_area)]"
} else{ area_template = "[world.area]"}
template = "[obj_template][mob_template][turf_template][area_template]"
return template
}
check_attributes(var/atom/A){
var/attributes_text = {"{"}
for(var/V in A.vars){
sleep(-1)
if((!issaved(A.vars[V])) || (A.vars[V]==initial(A.vars[V]))){continue}
if(istext(A.vars[V])){
attributes_text += {"[V] = "[A.vars[V]]""}
}
else if(isnum(A.vars[V])||ispath(A.vars[V])){
attributes_text += {"[V] = [A.vars[V]]"}
}
else if(isicon(A.vars[V])||isfile(A.vars[V])){
attributes_text += {"[V] = '[A.vars[V]]'"}
}
else{
continue
}
if(attributes_text != {"{"}){
attributes_text+={"; "}
}
}
if(attributes_text=={"{"}){
return
}
if(copytext(attributes_text, length(attributes_text)-1, 0) == {"; "}){
attributes_text = copytext(attributes_text, 1, length(attributes_text)-1)
}
attributes_text += {"}"}
return attributes_text
}
get_model_key(var/which as num, var/key_length as num){
var/key = ""
var/working_digit = which-1
for(var/digit_pos=key_length;digit_pos>=1;digit_pos--){
var/place_value = round/*floor*/(working_digit/(letter_digits.len**(digit_pos-1)))
working_digit-=place_value*(letter_digits.len**(digit_pos-1))
key = "[key][letter_digits[place_value+1]]"
}
return key
}
}
}

View File

@@ -224,6 +224,13 @@ proc/move_mining_shuttle()
origin_tech = "materials=6;powerstorage=4;engineering=5"
desc = "Yours is the drill that will pierce the heavens!"
borgdrill
name = "Cyborg Mining Drill"
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 15
desc = ""
/*****************************Shovel********************************/
/obj/item/weapon/shovel

View File

@@ -284,7 +284,7 @@
// seedName = pick(list("1","2","3","4"))
// seedAmt = rand(1,4)
if(prob(20))
icon_state = "asteroid[rand(0,8)]"
icon_state = "asteroid[rand(0,12)]"
spawn(2)
updateMineralOverlays()

View File

@@ -34,6 +34,12 @@
if(0)
usr << "The satchel now picks up one ore at a time."
/obj/item/weapon/satchel/borg
icon = 'mining.dmi'
icon_state = "satchel"
name = "Cyborg Mining Satchel"
mode = 1; //0 = pick one at a time, 1 = pick all on tile
capacity = 200; //the number of ore pieces it can carry.
/**********************Ore box**************************/

View File

@@ -0,0 +1,5 @@
/mob/dead/dust() //ghosts can't be vaporised.
return
/mob/dead/gib() //ghosts can't be gibbed.
return

View File

@@ -1,8 +1,3 @@
/obj/hud/proc/ghost_hud()
station_explosion = new h_type( src )
station_explosion.icon = 'station_explosion.dmi'
station_explosion.icon_state = "start"
station_explosion.layer = 20
station_explosion.mouse_opacity = 0
station_explosion.screen_loc = "1,3"
return

View File

@@ -71,6 +71,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(key)
var/mob/dead/observer/ghost = new(src)
ghost.key = key
if(timeofdeath)
ghost.timeofdeath = timeofdeath
verbs -= /mob/proc/ghost
if (ghost.client)
ghost.client.eye = ghost

76
code/modules/mob/death.dm Normal file
View File

@@ -0,0 +1,76 @@
//This is the proc for gibbing a mob. Cannot gib ghosts.
//added different sort of gibs and animations. N
/mob/proc/gib()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
// flick("gibbed-m", animation)
gibs(loc, viruses, dna)
spawn(15)
if(animation) del(animation)
if(src) del(src)
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
//Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here.
//Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
/mob/proc/dust()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
// flick("dust-m", animation)
new /obj/effect/decal/ash(loc)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/proc/death(gibbed)
timeofdeath = world.time
var/cancel = 0
for(var/mob/M in world)
if(M.client && (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))
world << "Aborting world restart!"
return
feedback_set_details("end_error","no live players")
if(blackbox)
blackbox.save_all_data_to_sql()
sleep(50)
log_game("Rebooting because of no live players")
world.Reboot()
return
return ..(gibbed)

View File

@@ -15,7 +15,8 @@
if(facehugger.stat == CONSCIOUS)
var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active")
activeIndicator.override = 1
client.images += activeIndicator
if(client)
client.images += activeIndicator
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation

View File

@@ -0,0 +1,39 @@
/mob/living/carbon/alien/gib()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("gibbed-a", animation)
xgibs(loc, viruses)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/carbon/alien/dust()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("dust-a", animation)
new /obj/effect/decal/remains/xeno(loc)
spawn(15)
if(animation) del(animation)
if(src) del(src)

View File

@@ -11,6 +11,7 @@
src.stand_icon = new /icon('alien.dmi', "aliend_s")
src.lying_icon = new /icon('alien.dmi', "aliend_l")
src.resting_icon = new /icon('alien.dmi', "aliend_sleep")
src.running_icon = new /icon('alien.dmi', "aliend_running")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"

View File

@@ -10,6 +10,7 @@
src.stand_icon = new /icon('alien.dmi', "alienh_s")
src.lying_icon = new /icon('alien.dmi', "alienh_l")
src.resting_icon = new /icon('alien.dmi', "alienh_sleep")
src.running_icon = new /icon('alien.dmi', "alienh_running")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"

View File

@@ -10,6 +10,7 @@
src.stand_icon = new /icon('alien.dmi', "aliens_s")
src.lying_icon = new /icon('alien.dmi', "aliens_l")
src.resting_icon = new /icon('alien.dmi', "aliens_sleep")
src.running_icon = new /icon('alien.dmi', "aliens_running")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"

View File

@@ -37,14 +37,6 @@
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
// station explosion cinematic
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
var/obj/screen/using
using = new src.h_type( src )

View File

@@ -11,6 +11,7 @@
stand_icon = new /icon('alien.dmi', "alien_s")
lying_icon = new /icon('alien.dmi', "alien_l")
resting_icon = new /icon('alien.dmi', "alienh_sleep")
running_icon = new /icon('alien.dmi', "alienh_running")
icon = stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
@@ -90,7 +91,7 @@
flick("flash", flash)
// if (stat == 2 && client)
// gib(1)
// gib()
// return
// else if (stat == 2 && !client)
@@ -105,7 +106,7 @@
switch (severity)
if (1.0)
b_loss += 500
gib(1)
gib()
return
if (2.0)
@@ -336,6 +337,13 @@
else
icon = resting_icon
else if(!lying)
if(update_icon)
if(m_intent == "run")
icon = running_icon
else
icon = stand_icon
overlays += body_lying
if (face_lying)
@@ -741,7 +749,7 @@ In all, this is a lot like the monkey code. /N
if ("help")
if(!sleeping_willingly)
sleeping = 0
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
@@ -783,7 +791,7 @@ In all, this is a lot like the monkey code. /N
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))

View File

@@ -380,7 +380,7 @@
src.drowsyness--
src.eye_blurry = max(2, src.eye_blurry)
if (prob(5))
src.sleeping = 1
src.sleeping += 1
src.Paralyse(5)
confused = max(0, confused - 1)

View File

@@ -12,6 +12,8 @@
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
src.stand_icon = new /icon('alien.dmi', "queen_s")
src.lying_icon = new /icon('alien.dmi', "queen_l")
src.resting_icon = new /icon('alien.dmi', "queen_sleep")
src.running_icon = new /icon('alien.dmi', "queen_running")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"

View File

@@ -39,14 +39,6 @@
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
// station explosion cinematic
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
var/obj/screen/using
using = new src.h_type( src )

View File

@@ -80,7 +80,7 @@
flick("flash", flash)
/*
if (stat == 2 && client)
gib(1)
gib()
return
else if (stat == 2 && !client)
@@ -93,7 +93,7 @@
switch (severity)
if (1.0)
b_loss += 500
gib(1)
gib()
return
if (2.0)
@@ -490,7 +490,7 @@
if ("help")
if(!sleeping_willingly)
sleeping = 0
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)

View File

@@ -303,7 +303,7 @@
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping = 1
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)

View File

@@ -1,6 +1,6 @@
/mob/living/carbon/brain
var
obj/item/device/mmi/container = null
obj/item/container = null
timeofhostdeath = 0
New()
@@ -31,9 +31,14 @@
return 1
return ..()
Login()
if(!container)
verbs += /mob/proc/ghost
Logout()
verbs -= /mob/proc/ghost
/mob/living/carbon/brain/Login()
..()
if (!isturf(src.loc))
src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE
if (!container || !istype(container, /obj/item/device/mmi))
src.verbs += /mob/proc/ghost
return

View File

@@ -1,5 +1,5 @@
/mob/living/carbon/brain/death(gibbed)
if(!gibbed && container)//If not gibbed but in a container.
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
for(var/mob/O in viewers(container, null))
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
container.icon_state = "mmi_dead"

View File

@@ -1,10 +1,4 @@
/obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi')
station_explosion = new h_type( src )
station_explosion.icon = 'station_explosion.dmi'
station_explosion.icon_state = "start"
station_explosion.layer = 20
station_explosion.mouse_opacity = 0
station_explosion.screen_loc = "1,3"
blurry = new h_type( src )
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"

View File

@@ -40,6 +40,8 @@
clamp_values()
proc
clamp_values()
@@ -141,7 +143,7 @@
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping = 1
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
@@ -318,4 +320,5 @@
if(bodytemperature > 409)
for(var/datum/disease/D in viruses)
D.cure()
return
return

View File

@@ -1,3 +1,4 @@
/mob/living/carbon/brain/say(var/message)
if(!container) return //No container, can't speak, bucko./N
if(!(container && istype(container, /obj/item/device/mmi)))
return //No MMI, can't speak, bucko./N
else ..()

View File

@@ -35,7 +35,7 @@
if(prob(src.getBruteLoss() - 50))
src.gib()
/mob/living/carbon/gib(give_medal,ex_act)
/mob/living/carbon/gib()
for(var/mob/M in src)
if(M in src.stomach_contents)
src.stomach_contents.Remove(M)
@@ -43,7 +43,7 @@
for(var/mob/N in viewers(src, null))
if(N.client)
N.show_message(text("\red <B>[M] bursts out of [src]!</B>"), 2)
. = ..(ex_act)
. = ..()
/mob/living/carbon/attack_hand(mob/M as mob)
if (M.hand)
@@ -168,9 +168,9 @@
/mob/living/carbon/proc/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(item_in_hand.twohanded == 1)
if(item_in_hand.wielded == 1)
usr << text("Your other hand is too busy holding the []",item_in_hand.name)
if(istype(item_in_hand,/obj/item/weapon/twohanded))
if(item_in_hand:wielded == 1)
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
return
src.hand = !( src.hand )
if (!( src.hand ))
@@ -193,7 +193,6 @@
var/status = ""
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
if(halloss > 0)
if(prob(30))
brutedamage += halloss
@@ -215,6 +214,9 @@
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(org.destroyed)
status = "MISSING!"
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1)
@@ -228,10 +230,10 @@
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
src.sleeping = max(0,src.sleeping-5)
if(!src.sleeping_willingly)
src.sleeping = 0
src.resting = 0
src.sleeping = max(0,src.sleeping-5)
if(src.sleeping == 0)
src.resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)

View File

@@ -1,3 +1,44 @@
/mob/living/carbon/human/gib()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("gibbed-h", animation)
hgibs(loc, viruses, dna)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/carbon/human/dust()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("dust-h", animation)
new /obj/effect/decal/remains/human(loc)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/carbon/human/death(gibbed)
if(halloss > 0 && (!gibbed))
//hallucination = 0
@@ -61,8 +102,11 @@
/mob/living/carbon/human/proc/ChangeToHusk()
if(mutations & HUSK)
return
var/datum/organ/external/head/head = get_organ("head")
if(head)
head.disfigured = 1
name = get_visible_name()
mutations |= HUSK
real_name = "Unknown"
update_body()
return

View File

@@ -164,7 +164,9 @@
if ("faint")
message = "<B>[src]</B> faints."
src.sleeping = 1
if(src.sleeping)
return //Can't faint while asleep
src.sleeping += 10 //Short-short nap
m_type = 1
if ("cough")
@@ -524,6 +526,8 @@
continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
continue
if(findtext(message," snores.")) //Because we have so many sleeping people.
continue
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
M.show_message(message)

View File

@@ -41,14 +41,6 @@
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
// station explosion cinematic
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
var/obj/screen/using
using = new src.h_type( src )

View File

@@ -70,11 +70,17 @@
/mob/living/carbon/human/New()
..()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
if(!dna) dna = new /datum/dna(null)
if(!dna)
dna = new /datum/dna(null)
new /datum/organ/external/chest(src)
new /datum/organ/external/groin(src)
@@ -123,19 +129,24 @@
gender = MALE
g = "m"
spawn (1)
if(!stand_icon)
stand_icon = new /icon('human.dmi', "body_[g]_s")
if(!lying_icon)
lying_icon = new /icon('human.dmi', "body_[g]_l")
spawn(1)
stand_icon = new /icon('human.dmi', "body_[g]_s")
lying_icon = new /icon('human.dmi', "body_[g]_l")
icon = stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
spawn(10) // Failsafe for.. weirdness.
update_clothing()
update_body()
vessel = new/datum/reagents(600)
vessel.my_atom = src
vessel.add_reagent("blood",560)
spawn(1) fixblood()
spawn(1)
fixblood()
..()
/*var/known_languages = list()
@@ -164,15 +175,15 @@
iconL.Remove(G.icon_state)
if(nums.len >= 3)
var/obj/effect/decal/cleanable/blood/drip/D = pick(nums)
D.blood_DNA.len++
D.blood_DNA[D.blood_DNA.len] = list(dna.unique_enzymes,dna.b_type)
D.blood_DNA[dna.unique_enzymes] = dna.b_type
if(virus2)
D.virus2 = virus2.getcopy()
return
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
this.icon_state = pick(iconL)
this.blood_DNA = list(list(dna.unique_enzymes,dna.b_type))
this.blood_DNA = list()
this.blood_DNA[dna.unique_enzymes] = dna.b_type
this.blood_owner = src
if(virus2)
@@ -267,6 +278,7 @@
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/50
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
var/datum/organ/external/o = organs["[organ]"]
if(o.broken)
@@ -335,7 +347,7 @@
// /obj/item/clothing/head/bomb_hood(src)
/*
if (stat == 2 && client)
gib(1)
gib()
return
else if (stat == 2 && !client)
@@ -350,7 +362,7 @@
if (1.0)
b_loss += 500
if (!prob(getarmor(null, "bomb")))
gib(1,1)
gib()
return
else
var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
@@ -555,8 +567,8 @@
return
if (!( W.flags & ONBACK ))
return
if(W.twohanded && W.wielded)
usr << "Unwield the [initial(W.name)] first!"
if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
return
u_equip(W)
back = W
@@ -1177,37 +1189,8 @@
overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
belt.screen_loc = ui_belt
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see the face
if (wear_id)
if (istype(wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/id = wear_id
if (id.registered_name)
name = id.registered_name
else
name = "Unknown"
else if (istype(wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = wear_id
if (pda.owner)
name = pda.owner
else
name = "Unknown"
else
name = "Unknown"
else
if (wear_id)
if (istype(wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/id = wear_id
if (id.registered_name != real_name)
name = "[real_name] (as [id.registered_name])"
else if (istype(wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = wear_id
if (pda.owner)
if (pda.owner != real_name)
name = "[real_name] (as [pda.owner])"
else
name = real_name
name = get_visible_name()
if (wear_id)
wear_id.screen_loc = ui_id
@@ -1484,7 +1467,6 @@
del(face_standing)
del(face_lying)
return
if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now
del(face_standing)
del(face_lying)
@@ -1552,7 +1534,6 @@
/obj/effect/equip_e/human/process()
if (item)
item.add_fingerprint(source)
var/item_loc = 0
if (!item)
switch(place)
if("mask")
@@ -1615,218 +1596,119 @@
//SN src = null
del(src)
return
else
switch(place)
if("mask")
if(target.wear_mask)
item_loc = 1
if("l_hand")
if(target.l_hand)
item_loc = 1
if("r_hand")
if(target.r_hand)
item_loc = 1
if("gloves")
if(target.gloves)
item_loc = 1
if("eyes")
if(target.glasses)
item_loc = 1
if("l_ear")
if(target.l_ear)
item_loc = 1
if("r_ear")
if(target.r_ear)
item_loc = 1
if("head")
if(target.head)
item_loc = 1
if("shoes")
if(target.shoes)
item_loc = 1
if("belt")
if(target.belt)
item_loc = 1
if("suit")
if(target.wear_suit)
item_loc = 1
if("back")
if(target.back)
item_loc = 1
if("uniform")
if(target.w_uniform)
item_loc = 1
if("s_store")
if(target.s_store)
item_loc = 1
if("h_store")
if(target.h_store)
item_loc = 1
if("id")
if(target.wear_id)
item_loc = 1
if("internal")
if (target.internal)
item_loc = 1
if("handcuff")
if (target.handcuffed)
item_loc = 1
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
if (item && !L.Find(place) && !item_loc)
if ((item && !( L.Find(place) )))
if(isrobot(source) && place != "handcuff")
del(src)
return
for(var/mob/O in viewers(target, null))
O.show_message(text("\red <B>[] is trying to put \a [] on []</B>", source, item, target), 1)
else
if (place == "syringe")
for(var/mob/O in viewers(target, null))
O.show_message(text("\red <B>[] is trying to inject []!</B>", source, target), 1)
else
if (place == "pill")
for(var/mob/O in viewers(target, null))
O.show_message(text("\red <B>[] is trying to force [] to swallow []!</B>", source, target, item), 1)
else
if(place == "fuel")
for(var/mob/O in viewers(target, null))
O.show_message(text("\red [source] is trying to force [target] to eat the [item:content]!"), 1)
var/message=null
switch(place)
if("syringe")
message = text("\red <B>[] is trying to inject []!</B>", source, target)
if("pill")
message = text("\red <B>[] is trying to force [] to swallow []!</B>", source, target, item)
if("fuel")
message = text("\red [source] is trying to force [target] to eat the [item:content]!")
if("drink")
message = text("\red <B>[] is trying to force [] to swallow a gulp of []!</B>", source, target, item)
if("dnainjector")
message = text("\red <B>[] is trying to inject [] with the []!</B>", source, target, item)
if("mask")
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
else
if (place == "drink")
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
/* if("headset")
message = text("\red <B>[] is trying to take off \a [] from []'s face!</B>", source, target.w_radio, target) */
if("l_hand")
message = text("\red <B>[] is trying to take off \a [] from []'s left hand!</B>", source, target.l_hand, target)
if("r_hand")
message = text("\red <B>[] is trying to take off \a [] from []'s right hand!</B>", source, target.r_hand, target)
if("gloves")
if(istype(target.gloves, /obj/item/clothing)&&!target.gloves:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.gloves, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s hands!</B>", source, target.gloves, target)
if("eyes")
if(istype(target.glasses, /obj/item/clothing)&&!target.glasses:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.glasses, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s eyes!</B>", source, target.glasses, target)
if("l_ear")
if(istype(target.l_ear, /obj/item/clothing)&&!target.l_ear:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.l_ear, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s left ear!</B>", source, target.l_ear, target)
if("r_ear")
if(istype(target.r_ear, /obj/item/clothing)&&!target.r_ear:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.r_ear, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s right ear!</B>", source, target.r_ear, target)
if("head")
if(istype(target.head, /obj/item/clothing)&&!target.head:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.head, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s head!</B>", source, target.head, target)
if("shoes")
if(istype(target.shoes, /obj/item/clothing)&&!target.shoes:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.shoes, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s feet!</B>", source, target.shoes, target)
if("belt")
message = text("\red <B>[] is trying to take off the [] from []'s belt!</B>", source, target.belt, target)
if("suit")
if(istype(target.wear_suit, /obj/item/clothing)&&!target.wear_suit:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
if("back")
message = text("\red <B>[] is trying to take off \a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("uniform")
if(istype(target.w_uniform, /obj/item/clothing)&&!target.w_uniform:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.w_uniform, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s body!</B>", source, target.w_uniform, target)
if("s_store")
message = text("\red <B>[] is trying to take off \a [] from []'s suit!</B>", source, target.s_store, target)
if("h_store")
message = text("\red <B>[] is trying to empty []'s hat!</B>", source, target)
if("pockets")
for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store))
if(MT.armed)
for(var/mob/O in viewers(target, null))
O.show_message(text("\red <B>[] is trying to force [] to swallow a gulp of []!</B>", source, target, item), 1)
else
if (place == "dnainjector")
for(var/mob/O in viewers(target, null))
O.show_message(text("\red <B>[] is trying to inject [] with the []!</B>", source, target, item), 1)
else
var/message = null
switch(place)
if("mask")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their mask removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) mask</font>")
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
/* if("headset")
message = text("\red <B>[] is trying to take off \a [] from []'s face!</B>", source, target.w_radio, target) */
if("l_hand")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left hand item removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left hand item</font>")
message = text("\red <B>[] is trying to take off \a [] from []'s left hand!</B>", source, target.l_hand, target)
if("r_hand")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right hand item removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right hand item</font>")
message = text("\red <B>[] is trying to take off \a [] from []'s right hand!</B>", source, target.r_hand, target)
if("gloves")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their gloves removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) gloves</font>")
if(istype(target.gloves, /obj/item/clothing)&&!target.gloves:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.gloves, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s hands!</B>", source, target.gloves, target)
if("eyes")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their eyewear removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) eyewear</font>")
if(istype(target.glasses, /obj/item/clothing)&&!target.glasses:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.glasses, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s eyes!</B>", source, target.glasses, target)
if("l_ear")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left ear item removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left ear item</font>")
if(istype(target.l_ear, /obj/item/clothing)&&!target.l_ear:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.l_ear, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s left ear!</B>", source, target.l_ear, target)
if("r_ear")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right ear item removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right ear item</font>")
if(istype(target.r_ear, /obj/item/clothing)&&!target.r_ear:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.r_ear, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s right ear!</B>", source, target.r_ear, target)
if("head")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their hat removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) hat</font>")
if(istype(target.head, /obj/item/clothing)&&!target.head:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.head, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s head!</B>", source, target.head, target)
if("shoes")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their shoes removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) shoes</font>")
if(istype(target.shoes, /obj/item/clothing)&&!target.shoes:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.shoes, target)
else
message = text("\red <B>[] is trying to take off the [] from []'s feet!</B>", source, target.shoes, target)
if("belt")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their belt item removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) belt item</font>")
message = text("\red <B>[] is trying to take off the [] from []'s belt!</B>", source, target.belt, target)
if("suit")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit</font>")
if(istype(target.wear_suit, /obj/item/clothing)&&!target.wear_suit:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s body!</B>", source, target.wear_suit, target)
if("back")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their back item removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) back item</font>")
message = text("\red <B>[] is trying to take off \a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("uniform")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform</font>")
if(istype(target.w_uniform, /obj/item/clothing)&&!target.w_uniform:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.w_uniform, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s body!</B>", source, target.w_uniform, target)
if("s_store")
message = text("\red <B>[] is trying to take off \a [] from []'s suit!</B>", source, target.s_store, target)
if("h_store")
message = text("\red <B>[] is trying to empty []'s hat!</B>", source, target)
if("pockets")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store))
if(MT.armed)
for(var/mob/O in viewers(target, null))
if(O == source)
O.show_message(text("\red <B>You reach into the [target]'s pockets, but there was a live mousetrap in there!</B>"), 1)
else
O.show_message(text("\red <B>[source] reaches into [target]'s pockets and sets off a hidden mousetrap!</B>"), 1)
target.u_equip(MT)
if (target.client)
target.client.screen -= MT
MT.loc = source.loc
MT.triggered(source, source.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
return
message = text("\red <B>[] is trying to empty []'s pockets!!</B>", source, target)
if("CPR")
if (target.cpr_time + 3 >= world.time)
//SN src = null
del(src)
return
message = text("\red <B>[] is trying perform CPR on []!</B>", source, target)
if("id")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their ID removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) ID</font>")
message = text("\red <B>[] is trying to take off [] from []'s uniform!</B>", source, target.wear_id, target)
if("internal")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their internals toggled by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) internals</font>")
if (target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
else
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
else
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
if(O == source)
O.show_message(text("\red <B>You reach into the [target]'s pockets, but there was a live mousetrap in there!</B>"), 1)
else
O.show_message(text("\red <B>[source] reaches into [target]'s pockets and sets off a hidden mousetrap!</B>"), 1)
target.u_equip(MT)
if (target.client)
target.client.screen -= MT
MT.loc = source.loc
MT.triggered(source, source.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
return
message = text("\red <B>[] is trying to empty []'s pockets!!</B>", source, target)
if("CPR")
if (target.cpr_time >= world.time + 3)
//SN src = null
del(src)
return
message = text("\red <B>[] is trying perform CPR on []!</B>", source, target)
if("id")
message = text("\red <B>[] is trying to take off [] from []'s uniform!</B>", source, target.wear_id, target)
if("internal")
if (target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
else
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
spawn( 40 )
done()
return
@@ -1846,7 +1728,7 @@ It can still be worn/put on as normal.
if(source.loc != s_loc) return
if(target.loc != t_loc) return
if(LinkBlocked(s_loc,t_loc)) return
if(item && source.equipped() != item) return
if(item && source.equipped() != item) return
if ((source.restrained() || source.stat)) return
switch(place)
if("mask")
@@ -2453,18 +2335,33 @@ It can still be worn/put on as normal.
return if_no_id
return
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
/mob/living/carbon/human/proc/get_visible_name()
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see their face
return get_id_name("Unknown")
else
var/face_name = get_face_name()
var/id_name = get_id_name("")
if(id_name && (id_name != face_name))
return "[face_name] as ([id_name])"
return face_name
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head = get_organ("head")
if(!head || head.disfigured) //no face!
return "Unknown"
else
return "[real_name]"
//gets name from ID or PDA itself, ID inside PDA doesn't matter
//Useful when player is being seen by other mobs
/mob/living/carbon/human/proc/get_visible_name(var/if_no_id = "Unknown")
/mob/living/carbon/human/proc/get_id_name(var/if_no_id = "Unknown")
var/obj/item/device/pda/pda = wear_id
var/obj/item/weapon/card/id/id = wear_id
if (istype(pda))
. = pda.owner
else if (istype(id))
. = id.registered_name
else
return if_no_id
return
if(istype(pda)) return pda.owner
if(istype(id)) return id.registered_name
return if_no_id
//gets ID card object from special clothes slot or null.
/mob/living/carbon/human/proc/get_idcard()
@@ -2856,4 +2753,4 @@ It can still be worn/put on as normal.
else
reset_view(0)
remoteobserve = null
src.tkdisable = 0
src.tkdisable = 0

View File

@@ -119,35 +119,36 @@
if("lizard")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
attack_verb = "whip"
else
attack_verb = "punch"
if(M.type == /mob/living/carbon/human/tajaran)
if(istajaran(M))
attack_verb = "slash"
var/damage = rand(0, 5)
if(!damage)
if(M.mutantrace == "lizard")
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
else if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
else if (M.type == /mob/living/carbon/human/tajaran)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
switch(attack_verb)
if(("slash") || ("scratch"))
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] has attempted to [attack_verb] [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(M.mutations & HULK) damage += 5
if(M.mutantrace == "lizard")
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
else if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, "punch", 25, 1, -1)
else if (M.type == /mob/living/carbon/human/tajaran)
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
switch(attack_verb)
if(("slash") || ("scratch"))
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
else
playsound(loc, "punch", 25, 1, -1)
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
@@ -157,11 +158,10 @@
apply_effect(2, WEAKEN, armor_block)
UpdateDamageIcon()
if("disarm")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [src] ([src.ckey]) disarmed [M] ([M.ckey]).")
log_attack("<font color='red'>[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])</font>")
@@ -212,4 +212,7 @@
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
update_clothing()
return
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
return

View File

@@ -1,3 +1,13 @@
//Instead of setting real_name = "Unknown", use this when necessary.
//It will prevent the cloned-as-unknown bug and various other derpy things.
/mob/living/carbon/human/proc/disfigure_face()
var/datum/organ/external/head/head = get_organ("head")
if(head && !head.disfigured)
head.disfigured = 1
name = get_visible_name()
src << "\red Your face has become disfigured."
warn_flavor_changed()
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
var/datum/organ/external/E = get_organ(zone)
if(istype(E, /datum/organ/external))

View File

@@ -37,7 +37,7 @@ emp_act
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2)
return 2
return (..())
return (..(P , def_zone))
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
@@ -119,10 +119,9 @@ emp_act
if(!I || !user) return 0
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
var/hit_area = affecting.display_name
if((user != src) && check_shields(I.force, "the [I.name]"))
return 0

View File

@@ -19,7 +19,8 @@
/mob/living/carbon/human/Process_Spaceslipping(var/prob_slip = 5)
//If knocked out we might just hit it and stop. This makes it possible to get dead bodies and such.
if(stat) prob_slip += 50
if(stat)
prob_slip = 0 // Changing this to zero to make it line up with the comment, and also, make more sense.
//Do we have magboots or such on if so no slip
if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.flags & NOSLIP))

View File

@@ -457,10 +457,17 @@
return null
update_canmove()
if(paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
if(sleeping || paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
canmove = 0
else
lying = 0
canmove = 1
/* for(var/obj/effect/stop/S in geaslist)
if(S.victim == src)
geaslist -= S
del(S)
*/
handle_breath(datum/gas_mixture/breath)
if(nodamage || (mutations & mNobreath))
@@ -545,7 +552,7 @@
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
sleeping = max(sleeping, 4)
sleeping = max(src.sleeping+2, 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20) && isbreathing)
spawn(0) emote(pick("giggle", "laugh"))
@@ -819,7 +826,7 @@
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping = 1
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
@@ -964,7 +971,7 @@
if (silent)
silent--
if (paralysis || stunned || weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
if (resting || sleeping || paralysis || stunned || weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
if (stunned > 0)
AdjustStunned(-1)
stat = 0
@@ -978,6 +985,22 @@
blinded = 1
lying = 1
stat = 1
if (sleeping > 0)
handle_dreams()
adjustHalLoss(-5)
blinded = 1
lying = 1
stat = 1
if (prob(10) && health && !hal_crit)
spawn(0)
emote("snore")
sleeping--
if(resting)
lying = 1
stat = 0
var/h = hand
hand = 0
drop_item()
@@ -998,15 +1021,14 @@
if (stuttering) stuttering--
if (slurring) slurring--
//Carn: marker 4#
var/datum/organ/external/head/head = organs["head"]
if(head && !head.disfigured)
if(head.brute_dam >= 45 || head.burn_dam >= 45)
head.disfigured = 1
emote("scream")
real_name = "Unknown"
src << "\red Your face has become disfigured."
disfigure_face()
face_op_stage = 0.0
warn_flavor_changed()
var/blood_max = 0
for(var/name in organs)
var/datum/organ/external/temp = organs[name]
@@ -1064,11 +1086,6 @@
if(!druggy)
see_invisible = 2
else if (type == /mob/living/carbon/human/tajaran)
// sight |= SEE_MOBS
// sight |= SEE_OBJS
see_in_dark = 8
else if (seer)
var/obj/effect/rune/R = locate() in loc
if (istype(R) && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin)
@@ -1125,22 +1142,41 @@
if (mutantrace == "lizard" || mutantrace == "metroid")
see_in_dark = 3
see_invisible = 1
else if (istajaran(src))
see_in_dark = 8
else if (druggy) // If drugged~
see_in_dark = 2
//see_invisible regulated by drugs themselves.
else
see_in_dark = 2
var/seer = 0
for(var/obj/effect/rune/R in world)
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
seer = 1
if(!seer)
see_invisible = 0
else if(istype(head, /obj/item/clothing/head/helmet/welding))
var/seer = 0
for(var/obj/effect/rune/R in world)
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
seer = 1
if(!seer)
see_invisible = 0
else if(istype(head, /obj/item/clothing/head/helmet/welding)) // wat. This is never fucking called.
if(!head:up && tinted_weldhelh)
see_in_dark = 1
/* HUD shit goes here, as long as it doesn't modify src.sight flags */
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
if(istype(glasses, /obj/item/clothing/glasses/hud/health))
@@ -1242,7 +1278,7 @@
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
if(resting || lying || sleeping) rest.icon_state = "rest[(resting || lying || sleeping) ? 1 : 0]"
if(rest) rest.icon_state = "rest[(resting || lying || sleeping) ? 1 : 0]"
if (toxin || hal_screwyhud == 4) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
@@ -1251,26 +1287,26 @@
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
switch(bodytemperature) //310.055 optimal body temp
if(370 to INFINITY)
bodytemp.icon_state = "temp4"
if(350 to 370)
bodytemp.icon_state = "temp3"
if(335 to 350)
bodytemp.icon_state = "temp2"
if(320 to 335)
bodytemp.icon_state = "temp1"
if(300 to 320)
bodytemp.icon_state = "temp0"
if(295 to 300)
bodytemp.icon_state = "temp-1"
if(280 to 295)
bodytemp.icon_state = "temp-2"
if(260 to 280)
bodytemp.icon_state = "temp-3"
else
bodytemp.icon_state = "temp-4"
if(bodytemp)
switch(bodytemperature) //310.055 optimal body temp
if(370 to INFINITY)
bodytemp.icon_state = "temp4"
if(350 to 370)
bodytemp.icon_state = "temp3"
if(335 to 350)
bodytemp.icon_state = "temp2"
if(320 to 335)
bodytemp.icon_state = "temp1"
if(300 to 320)
bodytemp.icon_state = "temp0"
if(295 to 300)
bodytemp.icon_state = "temp-1"
if(280 to 295)
bodytemp.icon_state = "temp-2"
if(260 to 280)
bodytemp.icon_state = "temp-3"
else
bodytemp.icon_state = "temp-4"
if(!client) return 0 //Wish we did not need these
client.screen -= hud_used.blurry
@@ -1388,7 +1424,17 @@
if(!M.nodamage)
M.adjustBruteLoss(5)
nutrition += 10
/* One day.
if(nutrition <= 100)
if (prob (1))
src << "\red Your stomach rumbles."
if(nutrition <= 50)
if (prob (25))
bruteloss++
if (prob (5))
src << "You feel very weak."
weakened += rand(2, 3)
*/
handle_changeling()
if (mind)
if (mind.special_role == "Changeling" && changeling)
@@ -1436,14 +1482,7 @@
/*
// Commented out so hunger system won't be such shock
// Damage and effect from not eating
if(nutrition <= 50)
if (prob (0.1))
src << "\red Your stomach rumbles."
if (prob (10))
bruteloss++
if (prob (5))
src << "You feel very weak."
weakened += rand(2, 3)
*/
/*
snippets

View File

@@ -1,4 +1,7 @@
/mob/living/carbon/human/say(var/message)
/* if(src.mutantrace == "lizard")
if(copytext(message, 1, 2) != "*")
message = dd_replaceText(message, "s", stutter("ss"))*///Just here for reference. -- Erthilo
if(src.mutantrace == "metroid" && prob(5))
if(copytext(message, 1, 2) != "*")
if(copytext(message, 1, 2) == ";")

View File

@@ -20,7 +20,7 @@
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && src.name != src.real_name)
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_visible_name()])"
alt_name = " (as [H.get_id_name("Unknown")])"
// Mute disability
if (src.disabilities & 64)
return

View File

@@ -44,12 +44,4 @@
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
// station explosion cinematic
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
*/

View File

@@ -110,7 +110,7 @@
src << "\red <i>[pick("This subject is incompatable", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nurished", "This subject is not food")]...</i>"
"I do not feel nourished", "This subject is not food")]...</i>"
sleep(rand(15,45))
@@ -136,13 +136,7 @@
if(Victim && !rabid && !attacked)
if(Victim.LAssailant && Victim.LAssailant != Victim)
if(prob(50))
var/Found = 0
for(var/mob/F in Friends)
if(F == Victim.LAssailant)
Found = 1
if(!Found)
Friends += Victim.LAssailant
Friends |= Victim.LAssailant
if(M.client && istype(src, /mob/living/carbon/human))
if(prob(85))

View File

@@ -1,5 +1,46 @@
/mob/living/carbon/monkey/gib()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("gibbed-m", animation)
gibs(loc, viruses, dna)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/carbon/monkey/dust()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("dust-m", animation)
new /obj/effect/decal/ash(loc)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/carbon/monkey/death(gibbed)
if(src.stat == 2)
if(src.stat == DEAD)
return
if (src.healths)

View File

@@ -43,14 +43,6 @@
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
// station explosion cinematic
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
var/obj/screen/using
using = new src.h_type( src )

View File

@@ -333,7 +333,7 @@
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
src.sleeping = max(src.sleeping, 2)
src.sleeping = max(src.sleeping+2, 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
@@ -591,26 +591,26 @@
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
switch(src.bodytemperature) //310.055 optimal body temp
if(345 to INFINITY)
src.bodytemp.icon_state = "temp4"
if(335 to 345)
src.bodytemp.icon_state = "temp3"
if(327 to 335)
src.bodytemp.icon_state = "temp2"
if(316 to 327)
src.bodytemp.icon_state = "temp1"
if(300 to 316)
src.bodytemp.icon_state = "temp0"
if(295 to 300)
src.bodytemp.icon_state = "temp-1"
if(280 to 295)
src.bodytemp.icon_state = "temp-2"
if(260 to 280)
src.bodytemp.icon_state = "temp-3"
else
src.bodytemp.icon_state = "temp-4"
if(bodytemp)
switch(src.bodytemperature) //310.055 optimal body temp
if(345 to INFINITY)
src.bodytemp.icon_state = "temp4"
if(335 to 345)
src.bodytemp.icon_state = "temp3"
if(327 to 335)
src.bodytemp.icon_state = "temp2"
if(316 to 327)
src.bodytemp.icon_state = "temp1"
if(300 to 316)
src.bodytemp.icon_state = "temp0"
if(295 to 300)
src.bodytemp.icon_state = "temp-1"
if(280 to 295)
src.bodytemp.icon_state = "temp-2"
if(260 to 280)
src.bodytemp.icon_state = "temp-3"
else
src.bodytemp.icon_state = "temp-4"
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy

View File

@@ -677,6 +677,14 @@
/mob/living/carbon/monkey/ex_act(severity)
flick("flash", flash)
/* if (stat == 2 && client)
gib()
return
if (stat == 2 && !client)
gibs(loc, viruses)
del(src)
return*/
switch(severity)
if(1.0)
if (stat != 2)

View File

@@ -217,11 +217,50 @@
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
src.radiation = 0
src.nutrition = 400
src.bodytemperature = initial(src.bodytemperature)
//src.health = 100
if(ishuman(src))
src.heal_overall_damage(1000, 1000)
//M.updatehealth()
src.buckled = initial(src.buckled)
src.handcuffed = initial(src.handcuffed)
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
e.brute_dam = 0.0
e.burn_dam = 0.0
e.bandaged = 0.0
e.max_damage = initial(e.max_damage)
e.bleeding = 0
e.open = 0
e.broken = 0
e.destroyed = 0
e.perma_injury = 0
e.update_icon()
for(var/datum/organ/wound/W in e.wounds)
if(W.bleeding || !W.is_healing)
W.stopbleeding()
del(H.vessel)
H.vessel = new/datum/reagents(560)
H.vessel.my_atom = H
H.vessel.add_reagent("blood",560)
spawn(1)
H.fixblood()
H.pale = 0
H.update_body()
H.update_face()
H.UpdateDamageIcon()
if (src.stat > 1)
src.stat=0
..()
src.heal_overall_damage(1000, 1000)
src.buckled = initial(src.buckled)
src.handcuffed = initial(src.handcuffed)
if(src.stat > 1) src.stat = CONSCIOUS
if(src.stat > 1)
src.stat = CONSCIOUS
..()
return

View File

@@ -1,7 +1,10 @@
/mob/living/proc/binarycheck()
if (istype(src, /mob/living/silicon/pai)) return
if (issilicon(src)) return 1
if (!ishuman(src)) return
if (istype(src, /mob/living/silicon/pai))
return
if (issilicon(src))
return 1
if (!ishuman(src))
return
var/mob/living/carbon/human/H = src
if (H.l_ear || H.r_ear)
var/obj/item/device/radio/headset/dongle
@@ -64,7 +67,7 @@
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && name != real_name)
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_visible_name()])"
alt_name = " (as [H.get_id_name("Unknown")])"
var/italics = 0
var/message_range = null
var/message_mode = null

View File

@@ -31,6 +31,7 @@
real_name = pickedName
name = real_name
original_name = real_name
anchored = 1
canmove = 0
loc = loc
@@ -329,6 +330,30 @@
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
statelaws()
if (href_list["track"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
if(A && target)
A.ai_actual_track(target)
return
else if (href_list["faketrack"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
if(A && target)
A:cameraFollow = target
A << text("Now tracking [] on camera.", target.name)
if (usr.machine == null)
usr.machine = usr
while (usr:cameraFollow == target)
usr << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
sleep(40)
continue
return
return
/mob/living/silicon/ai/meteorhit(obj/O as obj)
@@ -565,7 +590,7 @@
malf_picker.use(src)
//I am the icon meister. Bow fefore me.
//I am the icon meister. Bow fefore me. //>fefore
/mob/living/silicon/ai/proc/ai_hologram_change()
set name = "Change Hologram"
set desc = "Change the default hologram available to AI to something else."

View File

@@ -1,10 +1,2 @@
/obj/hud/proc/ai_hud()
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
return

View File

@@ -12,6 +12,10 @@
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
return ..()
/mob/living/silicon/ai/say_quote(var/text)

View File

@@ -0,0 +1,39 @@
/mob/living/silicon/gib()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
// flick("gibbed-r", animation)
robogibs(loc, viruses)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/silicon/dust()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
// flick("dust-r", animation)
new /obj/effect/decal/remains/robot(loc)
spawn(15)
if(animation) del(animation)
if(src) del(src)

View File

@@ -11,6 +11,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates
comments
ready = 0
/datum/paiController
var/list/pai_candidates = list()
var/list/asked = list()
@@ -42,20 +44,39 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(href_list["new"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/option = href_list["option"]
var/t = ""
var/maxNameLen = 26
switch(option)
if("name")
candidate.name = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = copytext(sanitize(t),1,maxNameLen)
if("desc")
candidate.description = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("role")
candidate.role = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("ooc")
candidate.comments = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = copytext(sanitize(candidate.name),1,maxNameLen)
if(candidate.description)
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
if(candidate.role)
candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
if(candidate.comments)
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
if("submit")
if(candidate)
@@ -184,13 +205,16 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(c.key == O.key)
hasSubmitted = 1
if(!hasSubmitted && O.client.be_pai)
spawn question(O.client, origin)
question(O.client)
proc/question(var/client/C, var/mob/origin)
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "[origin] is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
C.be_pai = 0
proc/question(var/client/C)
spawn(0)
if(!C) return
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
C.be_pai = 0

View File

@@ -1,3 +1,45 @@
/mob/living/silicon/robot/gib()
//robots don't die when gibbed. instead they drop their MMI'd brain
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("gibbed-r", animation)
robogibs(loc, viruses)
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/silicon/robot/dust()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("dust-r", animation)
new /obj/effect/decal/remains/robot(loc)
if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out.
spawn(15)
if(animation) del(animation)
if(src) del(src)
/mob/living/silicon/robot/death(gibbed)
if (!gibbed)
src.emote("deathgasp")

View File

@@ -38,14 +38,6 @@
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
// station explosion cinematic
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
var/obj/screen/using

View File

@@ -54,12 +54,12 @@
src.cell.use(1)
else
if(src.module_state_1)
src.cell.use(5)
src.cell.use(5.5)
if(src.module_state_2)
src.cell.use(5)
src.cell.use(5.5)
if(src.module_state_3)
src.cell.use(5)
src.cell.use(1)
src.cell.use(5.5)
src.cell.use(0.1)
src.blinded = 0
src.stat = 0
else
@@ -242,18 +242,18 @@
else
src.cells.icon_state = "charge-empty"
switch(src.bodytemperature) //310.055 optimal body temp
if(335 to INFINITY)
src.bodytemp.icon_state = "temp2"
if(320 to 335)
src.bodytemp.icon_state = "temp1"
if(300 to 320)
src.bodytemp.icon_state = "temp0"
if(260 to 300)
src.bodytemp.icon_state = "temp-1"
else
src.bodytemp.icon_state = "temp-2"
if(bodytemp)
switch(src.bodytemperature) //310.055 optimal body temp
if(335 to INFINITY)
src.bodytemp.icon_state = "temp2"
if(320 to 335)
src.bodytemp.icon_state = "temp1"
if(300 to 320)
src.bodytemp.icon_state = "temp0"
if(260 to 300)
src.bodytemp.icon_state = "temp-1"
else
src.bodytemp.icon_state = "temp-2"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"

View File

@@ -13,9 +13,10 @@
src.real_name += " "
src.real_name += "-[ident]"
src.name = src.real_name
if(!src.connected_ai)
/*if(!src.connected_ai)
for(var/mob/living/silicon/ai/A in world)
src.connected_ai = A
A.connected_robots += src
break
*/
return

View File

@@ -26,9 +26,9 @@
src << "<b>Unit slaved to [connected_ai.name], downloading laws.</b>"
lawupdate = 1
else
laws = new /datum/ai_laws/asimov
laws = new /datum/ai_laws/nanotrasen
lawupdate = 0
src << "<b>Unable to locate an AI, reverting to standard Asimov laws.</b>"
src << "<b>Unable to locate an AI, reverting to standard NanoTrasen laws.</b>"
else
laws = new /datum/ai_laws/antimov
lawupdate = 0
@@ -265,6 +265,11 @@
else
stat(null, text("No Cell Inserted!"))
if(module)
internal = locate(/obj/item/weapon/tank/jetpack) in module.modules
if(internal)
stat("Internal Atmosphere Info", internal.name)
stat("Tank Pressure", internal.air_contents.return_pressure())
/mob/living/silicon/robot/restrained()
return 0
@@ -1230,4 +1235,4 @@ Frequency:
for(var/obj/item/borg/upgrade/flashproof/F in module.modules)
return 1
return 0
return 0

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