mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' of github.com:Baystation12/Baystation12
This commit is contained in:
@@ -185,6 +185,7 @@
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#define FILE_DIR "sound/scary"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
// END_FILE_DIR
|
||||
@@ -683,7 +684,6 @@
|
||||
#include "code\game\objects\items\weapons\table_rack_parts.dm"
|
||||
#include "code\game\objects\items\weapons\teleportation.dm"
|
||||
#include "code\game\objects\items\weapons\tiles_wires.dm"
|
||||
#include "code\game\objects\items\weapons\toilets.dm"
|
||||
#include "code\game\objects\items\weapons\tools.dm"
|
||||
#include "code\game\objects\items\weapons\twohanded.dm"
|
||||
#include "code\game\objects\items\weapons\implants\implant.dm"
|
||||
@@ -799,6 +799,7 @@
|
||||
#include "code\modules\critters\critters.dm"
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\flufftext\Dreaming.dm"
|
||||
#include "code\modules\flufftext\Hallucination.dm"
|
||||
#include "code\modules\flufftext\TextFilters.dm"
|
||||
#include "code\modules\food\food.dm"
|
||||
#include "code\modules\food\recipes_microwave.dm"
|
||||
|
||||
@@ -21,6 +21,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/items // List of items
|
||||
var/list/ItemList // Parsed list of items
|
||||
var/uses // Numbers of crystals
|
||||
// List of items not to shove in their hands.
|
||||
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
|
||||
|
||||
New()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
@@ -34,7 +36,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
src.menu_message += "Tele-Crystals left: [src.uses]<BR>"
|
||||
src.menu_message += "<HR>"
|
||||
src.menu_message += "<B>Request item:</B><BR>"
|
||||
src.menu_message += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><BR>"
|
||||
src.menu_message += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"
|
||||
|
||||
var/cost
|
||||
var/item
|
||||
@@ -158,7 +160,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/path_obj = text2path(href_list["buy_item"])
|
||||
var/mob/A = src.hostpda.loc
|
||||
var/item = new path_obj(get_turf(src.hostpda))
|
||||
if(ismob(A)) //&& !istype(item, /obj/spawner))
|
||||
if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner))
|
||||
if(!A.r_hand)
|
||||
item:loc = A
|
||||
A.r_hand = item
|
||||
@@ -167,6 +169,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
item:loc = A
|
||||
A.l_hand = item
|
||||
item:layer = 20
|
||||
else
|
||||
item:loc = get_turf(A)
|
||||
usr.update_clothing()
|
||||
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
|
||||
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
|
||||
@@ -237,7 +241,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/path_obj = text2path(href_list["buy_item"])
|
||||
var/item = new path_obj(get_turf(src.loc))
|
||||
var/mob/A = src.loc
|
||||
if(ismob(A)) //&& !istype(item, /obj/spawner))
|
||||
if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner))
|
||||
if(!A.r_hand)
|
||||
item:loc = A
|
||||
A.r_hand = item
|
||||
@@ -246,6 +250,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
item:loc = A
|
||||
A.l_hand = item
|
||||
item:layer = 20
|
||||
else
|
||||
item:loc = get_turf(A)
|
||||
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
|
||||
del item*/
|
||||
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
|
||||
|
||||
@@ -121,6 +121,319 @@ obj/machinery/computer/forensic_scanning
|
||||
onclose(user,"scanner")
|
||||
|
||||
|
||||
Topic(href,href_list)
|
||||
switch(href_list["operation"])
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
if(istype(M,/mob/living/silicon))
|
||||
authenticated = 1
|
||||
updateDialog()
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
if (I && istype(I))
|
||||
if(src.check_access(I))
|
||||
authenticated = 1
|
||||
//usr << "\green Access Granted"
|
||||
//if(!authenticated)
|
||||
//usr << "\red Access Denied"
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
if("clear")
|
||||
if(canclear)
|
||||
temp = null
|
||||
if("eject")
|
||||
if(scanning)
|
||||
scanning.loc = loc
|
||||
scanning = null
|
||||
else
|
||||
temp = "Eject Failed: No Object"
|
||||
if("insert")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
if(I && istype(I))
|
||||
if(istype(I, /obj/item/weapon/evidencebag))
|
||||
scanning = I.contents[1]
|
||||
scanning.loc = src
|
||||
I.overlays -= scanning
|
||||
I.icon_state = "evidenceobj"
|
||||
else
|
||||
scanning = I
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
else
|
||||
temp = "Invalid Object Rejected."
|
||||
if("card")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
if(I && istype(I,/obj/item/weapon/f_card))
|
||||
card = I
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
process_card()
|
||||
usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints."
|
||||
else
|
||||
usr << "\red Invalid Object Rejected."
|
||||
if("database")
|
||||
canclear = 1
|
||||
if((!misc || !misc.len) && (!files || !files.len))
|
||||
temp = "Database is empty."
|
||||
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 + 1), i++)
|
||||
temp += "<a href='?src=\ref[src];operation=record;identifier=[i]'>{Dossier [i]}</a><br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=card'>{Insert Finger Print Card}</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 + 1), 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>"
|
||||
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])
|
||||
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>"
|
||||
temp += print_string
|
||||
for(var/i = 2, i < (dossier.len + 1), i++)
|
||||
var/list/outputs = dossier[i]
|
||||
var/item_name = get_name(outputs[1])
|
||||
var/list/prints_len = outputs[2]
|
||||
temp += "Object: [item_name]<br>"
|
||||
temp += " [prints_len.len] Unique fingerprints found.<br>"
|
||||
var/list/fibers = outputs[3]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j < (fibers.len + 1), j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
temp += " Fibers: [dat]<br>"
|
||||
else
|
||||
temp += " No fibers found.<br>"
|
||||
var/list/blood = outputs[4]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
if(blood.len > 1)
|
||||
for(var/j = 2, j < (blood.len + 1), j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
temp += " Blood: [dat]<br>"
|
||||
else
|
||||
temp += " No blood found.<br>"
|
||||
else
|
||||
temp = "ERROR. Database not found!<br>"
|
||||
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.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/print_string = "Fingerprints: Print not complete!<br>"
|
||||
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
|
||||
print_string = "Fingerprints: " + prints[num2text(2)] + "<BR>"
|
||||
P.info += print_string
|
||||
for(var/i = 2, i < (dossier.len + 1), i++)
|
||||
var/list/outputs = dossier[i]
|
||||
var/item_name = get_name(outputs[1])
|
||||
var/list/prints_len = outputs[2]
|
||||
P.info += "Object: [item_name]<br>"
|
||||
P.info += " [prints_len.len] Unique fingerprints found.<br>"
|
||||
var/list/fibers = outputs[3]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j < (fibers.len + 1), j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
P.info += " Fibers: [dat]<br>"
|
||||
else
|
||||
P.info += " No fibers found.<br>"
|
||||
var/list/blood = outputs[4]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
if(blood.len > 1)
|
||||
for(var/j = 2, j < (blood.len + 1), j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
P.info += " Blood: [dat]<br>"
|
||||
else
|
||||
P.info += " No blood found."
|
||||
else
|
||||
usr << "ERROR. Database not found!<br>"
|
||||
if("auxiliary")
|
||||
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 += "Consolidated data points: [item_name]<br>"
|
||||
var/list/fibers = outputs[2]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j <= fibers.len, j++)
|
||||
dat += "<br> [fibers[j]]"
|
||||
temp += " Fibers: [dat]<br>"
|
||||
else
|
||||
temp += " No fibers found."
|
||||
var/list/blood = outputs[3]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
for(var/j = 2, j <= blood.len, j++)
|
||||
dat += "<br> [blood[j]]"
|
||||
temp += " Blood: [dat]<br>"
|
||||
else
|
||||
temp += " No blood found.<br>"
|
||||
else
|
||||
temp = "ERROR. Database not found!<br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database;delete=[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])"
|
||||
P.overlays += "paper_words"
|
||||
P.info = "<b>Auxiliary Evidence Database</b><br><br>"
|
||||
P.info += "Consolidated data points: [item_name]<br>"
|
||||
var/list/fibers = outputs[2]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j <= fibers.len, j++)
|
||||
dat += "<br> [fibers[j]]"
|
||||
P.info += " Fibers: [dat]<br>"
|
||||
else
|
||||
P.info += " No fibers found."
|
||||
var/list/blood = outputs[3]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
for(var/j = 2, j <= blood.len, j++)
|
||||
dat += "<br> [blood[j]]"
|
||||
P.info += " Blood: [dat]<br>"
|
||||
else
|
||||
P.info += " No blood found.<br>"
|
||||
else
|
||||
usr << "ERROR. Database not found!<br>"
|
||||
if("scan")
|
||||
if(scanning)
|
||||
scan_process = 3
|
||||
scan_data = "Scanning [scanning]: 25% complete"
|
||||
updateDialog()
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_data = "Scanning [scanning]: 50% complete"
|
||||
updateDialog()
|
||||
scan_process = 2
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_data = "Scanning [scanning]: 75% complete"
|
||||
updateDialog()
|
||||
scan_process = 1
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_process = 0
|
||||
scan_name = scanning.name
|
||||
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 + 1), i++)
|
||||
var/list/templist = scanning.blood_DNA[i]
|
||||
scan_data += "-Blood type: [templist[2]]\nDNA: [templist[1]]<br><br>"
|
||||
else
|
||||
scan_data += "No Blood Found<br><br>"
|
||||
if (!length(scanning.fingerprints))
|
||||
scan_data += "No Fingerprints Found<br><br>"
|
||||
else
|
||||
var/list/L = scanning.fingerprints
|
||||
scan_data += "Isolated [L.len] Fingerprints. Loaded into database.<br>"
|
||||
add_data(scanning)
|
||||
|
||||
if(!scanning.suit_fibers)
|
||||
/*if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
var/obj/item/device/detective_scanner/scanner = scanning
|
||||
if(scanner.stored_name)
|
||||
scan_data += "Fibers/Materials Data - [scanner.stored_name]:<br>"
|
||||
for(var/data in scanner.stored_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
else
|
||||
scan_data += "No Fibers/Materials Data<br>"
|
||||
else*/
|
||||
scan_data += "No Fibers/Materials Located<br>"
|
||||
else
|
||||
/*if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
var/obj/item/device/detective_scanner/scanner = scanning
|
||||
if(scanner.stored_name)
|
||||
scan_data += "Fibers/Materials Data - [scanner.stored_name]:<br>"
|
||||
for(var/data in scanner.stored_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
else
|
||||
scan_data += "No Fibers/Materials Data<br>"*/
|
||||
|
||||
scan_data += "Fibers/Materials Found:<br>"
|
||||
for(var/data in scanning.suit_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
scan_data += "<br><b>Data transfered from Scanner to Database.</b><br>"
|
||||
add_data_scanner(scanning)
|
||||
else if(!length(scanning.fingerprints))
|
||||
scan_data += "<br><b><a href='?src=\ref[src];operation=add'>Add to Database?</a></b><br>"
|
||||
else
|
||||
temp = "Scan Failed: No Object"
|
||||
|
||||
|
||||
if("print")
|
||||
if(scan_data)
|
||||
temp = "Scan Data Printed."
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
P.name = "Scan Data ([scan_name])"
|
||||
P.info = "<tt>[scan_data]</tt>"
|
||||
P.overlays += "paper_words"
|
||||
else
|
||||
temp = "Print Failed: No Data"
|
||||
if("erase")
|
||||
scan_data = ""
|
||||
if("cancel")
|
||||
scan_process = 0
|
||||
if("add")
|
||||
if(scanning)
|
||||
add_data(scanning)
|
||||
else
|
||||
temp = "Data Transfer Failed: No Object."
|
||||
updateUsrDialog()
|
||||
|
||||
verb/reset()
|
||||
set name = "Reset Screen"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
temp = ""
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
ex_act()
|
||||
return
|
||||
|
||||
@@ -312,281 +625,16 @@ obj/machinery/computer/forensic_scanning
|
||||
del(card)
|
||||
return
|
||||
|
||||
proc/delete_record(var/location)
|
||||
if(misc && misc.len)
|
||||
for(var/i = location, i < misc.len, i++)
|
||||
misc[i] = misc[i+i]
|
||||
misc.len--
|
||||
return
|
||||
|
||||
proc/get_name(var/atom/A)
|
||||
return A.name
|
||||
|
||||
Topic(href,href_list)
|
||||
switch(href_list["operation"])
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
if(istype(M,/mob/living/silicon))
|
||||
authenticated = 1
|
||||
updateDialog()
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
if (I && istype(I))
|
||||
if(src.check_access(I))
|
||||
authenticated = 1
|
||||
//usr << "\green Access Granted"
|
||||
//if(!authenticated)
|
||||
//usr << "\red Access Denied"
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
if("clear")
|
||||
if(canclear)
|
||||
temp = null
|
||||
if("eject")
|
||||
if(scanning)
|
||||
scanning.loc = loc
|
||||
scanning = null
|
||||
else
|
||||
temp = "Eject Failed: No Object"
|
||||
if("insert")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
if(I && istype(I))
|
||||
if(istype(I, /obj/item/weapon/evidencebag))
|
||||
scanning = I.contents[1]
|
||||
scanning.loc = src
|
||||
I.overlays -= scanning
|
||||
I.icon_state = "evidenceobj"
|
||||
else
|
||||
scanning = I
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
else
|
||||
temp = "Invalid Object Rejected."
|
||||
if("card")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
if(I && istype(I,/obj/item/weapon/f_card))
|
||||
card = I
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
process_card()
|
||||
usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints."
|
||||
else
|
||||
usr << "\red Invalid Object Rejected."
|
||||
if("database")
|
||||
canclear = 1
|
||||
if(!misc && !files)
|
||||
temp = "Database is empty."
|
||||
else
|
||||
if(files)
|
||||
temp = "<b>Criminal Evidence Database</b><br><br>"
|
||||
temp += "Consolidated data points:<br>"
|
||||
for(var/i = 1, i < (files.len + 1), i++)
|
||||
temp += "<a href='?src=\ref[src];operation=record;identifier=[i]'>{Dossier [i]}</a><br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=card'>{Insert Finger Print Card}</a><br><br><br>"
|
||||
else
|
||||
temp = ""
|
||||
if(misc)
|
||||
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 + 1), 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>"
|
||||
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])
|
||||
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>"
|
||||
temp += print_string
|
||||
for(var/i = 2, i < (dossier.len + 1), i++)
|
||||
var/list/outputs = dossier[i]
|
||||
var/item_name = get_name(outputs[1])
|
||||
var/list/prints_len = outputs[2]
|
||||
temp += "Object: [item_name]<br>"
|
||||
temp += " [prints_len.len] Unique fingerprints found.<br>"
|
||||
var/list/fibers = outputs[3]
|
||||
if(fibers)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j < (fibers.len + 1), j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
temp += " Fibers: [dat]<br>"
|
||||
else
|
||||
temp += " No fibers found.<br>"
|
||||
var/list/blood = outputs[4]
|
||||
if(blood)
|
||||
var/dat = "[blood[1]]"
|
||||
if(blood.len > 1)
|
||||
for(var/j = 2, j < (blood.len + 1), j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
temp += " Blood: [dat]<br>"
|
||||
else
|
||||
temp += " No blood found.<br>"
|
||||
else
|
||||
temp = "ERROR. Database not found!<br>"
|
||||
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.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/print_string = "Fingerprints: Print not complete!<br>"
|
||||
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
|
||||
print_string = "Fingerprints: " + prints[num2text(2)] + "<BR>"
|
||||
P.info += print_string
|
||||
for(var/i = 2, i < (dossier.len + 1), i++)
|
||||
var/list/outputs = dossier[i]
|
||||
var/item_name = get_name(outputs[1])
|
||||
var/list/prints_len = outputs[2]
|
||||
P.info += "Object: [item_name]<br>"
|
||||
P.info += " [prints_len.len] Unique fingerprints found.<br>"
|
||||
var/list/fibers = outputs[3]
|
||||
if(fibers)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j < (fibers.len + 1), j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
P.info += " Fibers: [dat]<br>"
|
||||
else
|
||||
P.info += " No fibers found.<br>"
|
||||
var/list/blood = outputs[4]
|
||||
if(blood)
|
||||
var/dat = "[blood[1]]"
|
||||
if(blood.len > 1)
|
||||
for(var/j = 2, j < (blood.len + 1), j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
P.info += " Blood: [dat]<br>"
|
||||
else
|
||||
P.info += " No blood found."
|
||||
else
|
||||
usr << "ERROR. Database not found!<br>"
|
||||
if("auxiliary")
|
||||
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 += "Consolidated data points: [item_name]<br>"
|
||||
var/list/fibers = outputs[2]
|
||||
if(fibers)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j < (fibers.len + 1), j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
temp += " Fibers: [dat]<br>"
|
||||
else
|
||||
temp += " No fibers found."
|
||||
var/list/blood = outputs[3]
|
||||
if(blood)
|
||||
var/dat = "[blood[1]]"
|
||||
for(var/j = 2, j < (blood.len + 1), j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
temp += " Blood: [dat]<br>"
|
||||
else
|
||||
temp += " No blood found.<br>"
|
||||
else
|
||||
temp = "ERROR. Database not found!<br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
|
||||
if("scan")
|
||||
if(scanning)
|
||||
scan_process = 3
|
||||
scan_data = "Scanning [scanning]: 25% complete"
|
||||
updateDialog()
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_data = "Scanning [scanning]: 50% complete"
|
||||
updateDialog()
|
||||
scan_process = 2
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_data = "Scanning [scanning]: 75% complete"
|
||||
updateDialog()
|
||||
scan_process = 1
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_process = 0
|
||||
scan_name = scanning.name
|
||||
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 + 1), i++)
|
||||
var/list/templist = scanning.blood_DNA[i]
|
||||
scan_data += "-Blood type: [templist[2]]\nDNA: [templist[1]]<br><br>"
|
||||
else
|
||||
scan_data += "No Blood Found<br><br>"
|
||||
if (!length(scanning.fingerprints))
|
||||
scan_data += "No Fingerprints Found<br><br>"
|
||||
else
|
||||
var/list/L = scanning.fingerprints
|
||||
scan_data += "Isolated [L.len] Fingerprints. Loaded into database.<br>"
|
||||
add_data(scanning)
|
||||
|
||||
if(!scanning.suit_fibers)
|
||||
/*if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
var/obj/item/device/detective_scanner/scanner = scanning
|
||||
if(scanner.stored_name)
|
||||
scan_data += "Fibers/Materials Data - [scanner.stored_name]:<br>"
|
||||
for(var/data in scanner.stored_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
else
|
||||
scan_data += "No Fibers/Materials Data<br>"
|
||||
else*/
|
||||
scan_data += "No Fibers/Materials Located<br>"
|
||||
else
|
||||
/*if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
var/obj/item/device/detective_scanner/scanner = scanning
|
||||
if(scanner.stored_name)
|
||||
scan_data += "Fibers/Materials Data - [scanner.stored_name]:<br>"
|
||||
for(var/data in scanner.stored_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
else
|
||||
scan_data += "No Fibers/Materials Data<br>"*/
|
||||
|
||||
scan_data += "Fibers/Materials Found:<br>"
|
||||
for(var/data in scanning.suit_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
scan_data += "<br><b>Data transfered from Scanner to Database.</b><br>"
|
||||
add_data_scanner(scanning)
|
||||
else if(!length(scanning.fingerprints))
|
||||
scan_data += "<br><b><a href='?src=\ref[src];operation=add'>Add to Database?</a></b><br>"
|
||||
else
|
||||
temp = "Scan Failed: No Object"
|
||||
|
||||
|
||||
if("print")
|
||||
if(scan_data)
|
||||
temp = "Scan Data Printed."
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
P.name = "Scan Data ([scan_name])"
|
||||
P.info = "<tt>[scan_data]</tt>"
|
||||
P.overlays += "paper_words"
|
||||
else
|
||||
temp = "Print Failed: No Data"
|
||||
if("erase")
|
||||
scan_data = ""
|
||||
if("cancel")
|
||||
scan_process = 0
|
||||
if("add")
|
||||
if(scanning)
|
||||
add_data(scanning)
|
||||
else
|
||||
temp = "Data Transfer Failed: No Object."
|
||||
updateUsrDialog()
|
||||
|
||||
detective
|
||||
icon_state = "old"
|
||||
name = "PowerScan Mk.I"
|
||||
@@ -631,20 +679,21 @@ turf/Entered(mob/living/carbon/human/M)
|
||||
M.shoes.track_blood--
|
||||
src.add_bloody_footprints(M.shoes.track_blood_mob,0,M.dir,M.shoes.name)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src)
|
||||
if(B.track_amt <= 0) continue
|
||||
if(B.type != /obj/effect/decal/cleanable/blood/tracks)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes)
|
||||
M.shoes.add_blood(B.blood_owner)
|
||||
M.shoes.track_blood_mob = B.blood_owner
|
||||
M.shoes.track_blood = max(M.shoes.track_blood,8)
|
||||
else
|
||||
M.add_blood(B.blood_owner)
|
||||
M.track_blood_mob = B.blood_owner
|
||||
M.track_blood = max(M.track_blood,rand(4,8))
|
||||
B.track_amt--
|
||||
break
|
||||
//REMOVED until we improve it.
|
||||
// for(var/obj/effect/decal/cleanable/blood/B in src)
|
||||
// if(B.track_amt <= 0) continue
|
||||
// if(B.type != /obj/effect/decal/cleanable/blood/tracks)
|
||||
// if(istype(M,/mob/living/carbon/human))
|
||||
// if(M.shoes)
|
||||
// M.shoes.add_blood(B.blood_owner)
|
||||
// M.shoes.track_blood_mob = B.blood_owner
|
||||
// M.shoes.track_blood = max(M.shoes.track_blood,8)
|
||||
// else
|
||||
// M.add_blood(B.blood_owner)
|
||||
// M.track_blood_mob = B.blood_owner
|
||||
// M.track_blood = max(M.track_blood,rand(4,8))
|
||||
// B.track_amt--
|
||||
// break
|
||||
. = ..()
|
||||
|
||||
turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info)
|
||||
@@ -654,7 +703,7 @@ turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info)
|
||||
T.desc = "These bloody footprints appear to have been made by [info]."
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
T.blood_DNA.len++
|
||||
T.blood_DNA[T.blood_DNA.len] = list(M.dna.unique_enzymes,M.b_type)
|
||||
T.blood_DNA[T.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
return
|
||||
var/obj/effect/decal/cleanable/blood/tracks/this = new(src)
|
||||
this.icon = 'footprints.dmi'
|
||||
@@ -694,4 +743,19 @@ proc/blood_incompatible(donor,receiver)
|
||||
if("O")
|
||||
if(donor_antigen != "O") return 1
|
||||
//AB is a universal receiver.
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, I suppose."
|
||||
w_class = 1
|
||||
icon = 'toy.dmi'
|
||||
icon_state = "rag"
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(istype(A))
|
||||
user.visible_message("[user] starts to wipe the prints off of [A] with \the [src]!")
|
||||
if(do_after(user,30))
|
||||
user.visible_message("[user] finishes wiping away the evidence!")
|
||||
A.clean_blood()
|
||||
return
|
||||
@@ -322,6 +322,12 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.gib()
|
||||
|
||||
/datum/disease2/effect/greater/hallucinations
|
||||
name = "Hallucinational Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.hallucination += 25
|
||||
|
||||
/datum/disease2/effect/greater/radian
|
||||
name = "Radian's syndrome"
|
||||
stage = 4
|
||||
@@ -452,6 +458,12 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
mob.suiciding = 0
|
||||
|
||||
// lesser syndromes, partly just copypastes
|
||||
/datum/disease2/effect/lesser/hallucinations
|
||||
name = "Hallucinational Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.hallucination += 5
|
||||
|
||||
/datum/disease2/effect/lesser/mind
|
||||
name = "Lazy mind syndrome"
|
||||
stage = 3
|
||||
|
||||
@@ -51,4 +51,9 @@
|
||||
if(prob(20))
|
||||
affected_mob.adjustToxLoss(1)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(25))
|
||||
affected_mob << "\red The world around you feels surreal"
|
||||
if(prob(50))
|
||||
affected_mob.hallucination += 100
|
||||
shake_camera(affected_mob,20)
|
||||
return
|
||||
|
||||
@@ -247,6 +247,10 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
// var/obj/effect/organstructure/organStructure = null //for dem organs
|
||||
var/list/organs = list( ) //List of organs.
|
||||
|
||||
//Yes, yes I did. --SkyMarshal
|
||||
var/list/atom/hallucinations = list()
|
||||
var/halloss = 0
|
||||
var/hallucination = 0
|
||||
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
|
||||
// world << "Contract_disease called by [src] with virus [virus]"
|
||||
|
||||
@@ -1519,7 +1519,7 @@ proc/get_opposite(var/checkdir)
|
||||
if(!text || !character)
|
||||
return 0
|
||||
var/count = 0
|
||||
for(var/i = 1, i < lentext(text), i++)
|
||||
for(var/i = 1, i <= lentext(text), i++)
|
||||
var/a = copytext(text,i,i+1)
|
||||
if(a == character)
|
||||
count++
|
||||
|
||||
@@ -92,31 +92,40 @@
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
return 0
|
||||
else
|
||||
if (H.dna.uni_identity)
|
||||
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
var/new_prints = 0
|
||||
var/prints
|
||||
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
|
||||
for(var/i = 1, i <= src.fingerprints.len, i++)
|
||||
var/list/L = params2list(src.fingerprints[i])
|
||||
if(L.len > 1)
|
||||
if(L[num2text(1)] == md5(H.dna.uni_identity))
|
||||
new_prints = i
|
||||
prints = L[num2text(2)]
|
||||
break
|
||||
else
|
||||
src.fingerprints[i] = "1=" + L[num2text(1)] + "&2=" + stars(L[num2text(2)], rand(80,90))
|
||||
if(L[num2text(1)] == md5(H.dna.uni_identity))
|
||||
new_prints = i
|
||||
prints = L[num2text(2)]
|
||||
break
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
for (var/mob/N in world)
|
||||
if (N.client && N.client.holder)
|
||||
N << "<span class=\"gfartadmin\"><span class=\"prefix\">ERROR:</span><span class=\"message\">Fingerprint application failed! Important data: [src.name] at [T.x], [T.y], [T.z] with the print string [L[1]]</span></span>"
|
||||
var/test_print = stars(L[num2text(2)], rand(80,90))
|
||||
if(stringpercent(test_print) == 32)
|
||||
if(src.fingerprints.len == 1)
|
||||
src.fingerprints = list()
|
||||
else
|
||||
for(var/j = (i + 1), j < (src.fingerprints.len), j++)
|
||||
src.fingerprints[j-1] = src.fingerprints[j]
|
||||
src.fingerprints.len--
|
||||
else
|
||||
src.fingerprints[i] = "1=" + L[num2text(1)] + "&2=" + test_print
|
||||
if(new_prints)
|
||||
src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), rand(15,30))))
|
||||
src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40)))))
|
||||
else if(new_prints == 0)
|
||||
src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), rand(15,30)))
|
||||
src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))
|
||||
for(var/i = 1, i <= src.fingerprints.len, i++)
|
||||
if(length(src.fingerprints[i]) != 69)
|
||||
src.fingerprints.Remove(src.fingerprints[i])
|
||||
return 1
|
||||
else
|
||||
if(src.fingerprintslast != M.key)
|
||||
@@ -130,7 +139,7 @@
|
||||
return 0
|
||||
if (!( src.flags ) & 256)
|
||||
return
|
||||
if (!( src.blood_DNA ))
|
||||
if (src.blood_DNA)
|
||||
if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected.
|
||||
var/obj/item/source2 = src
|
||||
source2.icon_old = src.icon
|
||||
@@ -155,7 +164,7 @@
|
||||
return
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source2)
|
||||
var/list/blood_DNA_temp[1]
|
||||
blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.b_type)
|
||||
blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type)
|
||||
this.blood_DNA = blood_DNA_temp
|
||||
this.virus2 = M.virus2
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
@@ -198,7 +207,8 @@
|
||||
if( istype(src, /turf/simulated) )
|
||||
var/turf/simulated/source1 = src
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
|
||||
this.blood_DNA = M.dna.unique_enzymes
|
||||
this.blood_DNA = list(M.dna.unique_enzymes, M.dna.b_type)
|
||||
this.OriginalMob = M.dna.original_name
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
this.viruses += newDisease
|
||||
@@ -245,6 +255,25 @@
|
||||
source2.blood_DNA = null
|
||||
var/icon/I = new /icon(source2.icon_old, source2.icon_state)
|
||||
source2.icon = I
|
||||
if(src.fingerprints && src.fingerprints.len)
|
||||
var/done = 0
|
||||
while(!done)
|
||||
done = 1
|
||||
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
|
||||
var/list/prints = params2list(src.fingerprints[i])
|
||||
var/test_print = prints["2"]
|
||||
var/new_print = stars(test_print, rand(1,20))
|
||||
if(stringpercent(new_print) == 32)
|
||||
if(src.fingerprints.len == 1)
|
||||
src.fingerprints = list()
|
||||
else
|
||||
for(var/j = (i + 1), j < (src.fingerprints.len), j++)
|
||||
src.fingerprints[j-1] = src.fingerprints[j]
|
||||
src.fingerprints.len--
|
||||
done = 0
|
||||
break
|
||||
else
|
||||
src.fingerprints[i] = "1=" + prints["1"] + "&2=" + new_print
|
||||
return
|
||||
|
||||
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = traitor
|
||||
kill_objective.find_target()
|
||||
for(var/j, j < traitor.objectives.len, j++)
|
||||
for(var/j, j < (traitor.objectives.len + 1), j++)
|
||||
var/compare = istype(traitor.objectives[j],/datum/objective/assassinate)
|
||||
if(compare)
|
||||
var/datum/objective/assassinate/test = traitor.objectives[j]
|
||||
@@ -129,7 +129,7 @@
|
||||
var/datum/objective/protect/protect_objective = new
|
||||
protect_objective.owner = traitor
|
||||
protect_objective.find_target()
|
||||
for(var/j, j < traitor.objectives.len, j++)
|
||||
for(var/j, j < (traitor.objectives.len + 1), j++)
|
||||
var/compare = istype(traitor.objectives[j],/datum/objective/assassinate)
|
||||
if(compare)
|
||||
var/datum/objective/assassinate/test = traitor.objectives[j]
|
||||
@@ -157,7 +157,7 @@
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = traitor
|
||||
steal_objective.find_target()
|
||||
for(var/j, j < traitor.objectives.len, j++)
|
||||
for(var/j, j < (traitor.objectives.len + 1), j++)
|
||||
var/compare = istype(traitor.objectives[j],/datum/objective/steal)
|
||||
if(compare)
|
||||
var/datum/objective/steal/test = traitor.objectives[j]
|
||||
|
||||
@@ -144,7 +144,10 @@
|
||||
..()
|
||||
spawn( 5 )
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
if(!istype(src,/obj/machinery/sleeper/syndicate))
|
||||
icon_state = "sleeper_0-r"
|
||||
else
|
||||
icon_state = "syndipod_0-r"
|
||||
return
|
||||
return
|
||||
|
||||
@@ -193,9 +196,14 @@
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
if(!istype(src,/obj/machinery/sleeper/syndicate))
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
else
|
||||
src.icon_state = "syndipod_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "syndipod_1-r"
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
@@ -259,8 +267,11 @@
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
if(orient == "RIGHT" && !istype(src,/obj/machinery/sleeper/syndicate))
|
||||
icon_state = "sleeper_0-r"
|
||||
if(orient == "RIGHT")
|
||||
if(!istype(src,/obj/machinery/sleeper/syndicate))
|
||||
icon_state = "sleeper_0-r"
|
||||
else
|
||||
icon_state = "syndipod_0-r"
|
||||
return
|
||||
|
||||
|
||||
@@ -350,7 +361,9 @@
|
||||
icon_state = "sleeper_0-r"
|
||||
src.icon_state = "sleeper_0"
|
||||
else
|
||||
src.icon_state = "syndi_0"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "syndipod_0-r"
|
||||
src.icon_state = "syndipod_0"
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
@@ -390,7 +403,9 @@
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
else
|
||||
src.icon_state = "syndi_1"
|
||||
src.icon_state = "syndipod_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "syndipod_1-r"
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
|
||||
@@ -698,13 +698,8 @@
|
||||
// calculates a path to the current destination
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/mulebot/proc/calc_path(var/turf/avoid = null)
|
||||
if(src.target)
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_ortho, 0, 250, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
else
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder)
|
||||
M << "<span class=\"gfartadmin\"><span class=\"prefix\">ERROR:</span><span class=\"message\">A Mulebot has attempted to path to a null target! This is a bug!</span></span>"
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_ortho, 0, 250, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
|
||||
|
||||
// sets the current destination
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
/obj/machinery/computer/cloning/New()
|
||||
..()
|
||||
spawn(5)
|
||||
src.scanner = locate(/obj/machinery/dna_scannernew, get_step(src, scandir))
|
||||
updatemodules()
|
||||
/*src.scanner = locate(/obj/machinery/dna_scannernew, get_step(src, scandir))
|
||||
src.pod1 = locate(/obj/machinery/clonepod, get_step(src, poddir))
|
||||
|
||||
src.temp = ""
|
||||
@@ -80,10 +81,54 @@
|
||||
src.pod1.connected = src
|
||||
|
||||
if (src.temp == "")
|
||||
src.temp = "System ready."
|
||||
src.temp = "System ready."*/
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||
//world << "UPDATING MODULES"
|
||||
src.scanner = findscanner()//locate(/obj/machinery/dna_scannernew, get_step(src, WEST))
|
||||
src.pod1 = findcloner()//locate(/obj/machinery/clonepod, get_step(src, EAST))
|
||||
//world << "SEARCHING FOR MACHEIN"
|
||||
//src.temp = ""
|
||||
//if (isnull(src.scanner))
|
||||
// src.temp += " <font color=red>SCNR-ERROR</font>"
|
||||
if (!isnull(src.pod1) && !wantspod)
|
||||
src.pod1.connected = src
|
||||
// src.temp += " <font color=red>POD1-ERROR</font>"
|
||||
//else
|
||||
|
||||
//if (src.temp == "")
|
||||
// src.temp = "System ready."
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findscanner()
|
||||
//..()
|
||||
//world << "SEARCHING FOR SCANNER"
|
||||
var/obj/machinery/dna_scannernew/scannerf = null
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
//world << "SEARCHING IN [dir]"
|
||||
scannerf = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
|
||||
if (!isnull(scannerf))
|
||||
//world << "FOUND"
|
||||
break
|
||||
if(isnull(scannerf) && wantsscan)
|
||||
src.temp += " <font color=red>SCNR-ERROR</font>"
|
||||
return scannerf
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findcloner()
|
||||
//..()
|
||||
//world << "SEARCHING FOR POD"
|
||||
var/obj/machinery/clonepod/podf = null
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
//world << "SEARCHING IN [dir]"
|
||||
podf = locate(/obj/machinery/clonepod, get_step(src, dir))
|
||||
if (!isnull(podf))
|
||||
//world << "FOUND"
|
||||
break
|
||||
if(isnull(podf) && wantspod)
|
||||
src.temp += " <font color=red>POD1-ERROR</font>"
|
||||
return podf
|
||||
|
||||
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
|
||||
if (!src.diskette)
|
||||
@@ -110,6 +155,7 @@
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
updatemodules()
|
||||
var/dat = "<h3>Cloning System Control</h3>"
|
||||
dat += "<font size=-1><a href='byond://?src=\ref[src];refresh=1'>Refresh</a></font>"
|
||||
|
||||
|
||||
@@ -211,6 +211,11 @@ About the new airlock wires panel:
|
||||
return
|
||||
else /*if (src.justzap)*/
|
||||
return
|
||||
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
|
||||
user << "\red <B>You feel a powerful shock course through your body!</B>"
|
||||
user.halloss += 10
|
||||
user.stunned += 10
|
||||
return
|
||||
..(user)
|
||||
|
||||
|
||||
@@ -1023,6 +1028,8 @@ About the new airlock wires panel:
|
||||
|
||||
/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob)
|
||||
//world << text("airlock attackby src [] obj [] mob []", src, C, user)
|
||||
if(istype(C, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
if (src.isElectrified())
|
||||
if(src.shock(user, 75))
|
||||
|
||||
@@ -129,6 +129,8 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/device/detective_scanner))
|
||||
return ..()
|
||||
if (src.operating)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -176,18 +176,25 @@
|
||||
newmeat.reagents.add_reagent("nutriment", sourcenutriment / totalslabs) // Thehehe. Fat guys go first
|
||||
allmeat += newmeat
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder && (M.client.holder.level != -3))
|
||||
M << "\red [user.name]/[user.ckey] has gibbed [src.occupant.name]/[src.occupant.ckey]"
|
||||
src.occupant.death(1)
|
||||
src.occupant.ghostize()
|
||||
del(src.occupant)
|
||||
spawn(src.gibtime)
|
||||
playsound(src.loc, 'splat.ogg', 50, 1)
|
||||
operating = 0
|
||||
var/iterator = 0
|
||||
for (var/i=1 to allmeat.len)
|
||||
var/obj/item/meatslab = allmeat[i]
|
||||
var/turf/Tx = locate(src.x - i, src.y, src.z)
|
||||
var/turf/Tx = locate(src.x - i + iterator, src.y, src.z)
|
||||
if(Tx.density)
|
||||
iterator += 1
|
||||
Tx = locate(src.x - i + iterator, src.y, src.z)
|
||||
meatslab.loc = src.loc
|
||||
meatslab.throw_at(Tx,i,3)
|
||||
if (!Tx.density)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(Tx,i)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(Tx,i + iterator)
|
||||
src.operating = 0
|
||||
update_icon()
|
||||
|
||||
@@ -11,44 +11,38 @@
|
||||
if(busy)
|
||||
M << "\red Someone's already washing something here."
|
||||
return
|
||||
|
||||
var/turf/location = M.loc
|
||||
if(!isturf(location)) return
|
||||
usr << "\blue You start washing up."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
if(do_after(M,40))
|
||||
M.clean_blood()
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
C.clean_blood()
|
||||
/*
|
||||
if(C.r_hand)
|
||||
C.r_hand.clean_blood() // The hand you attack with is empty anyway, the other one should not be washed while doing this.
|
||||
if(C.l_hand)
|
||||
C.l_hand.clean_blood()
|
||||
|
||||
if(C.wear_mask)
|
||||
C.wear_mask.clean_blood() //- NOPE, Washing machine -Errorage
|
||||
*/
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
/*if(C:w_uniform)
|
||||
C:w_uniform.clean_blood() //- NOPE, Washing machine -Errorage
|
||||
if(C:wear_suit)
|
||||
C:wear_suit.clean_blood() //- NOPE, Washing machine -Errorage
|
||||
if(C:shoes)
|
||||
C:shoes.clean_blood()*/ //- NOPE, Washing machine -Errorage
|
||||
if(C:gloves)
|
||||
C:gloves.clean_blood()
|
||||
/*if(C:head)
|
||||
C:head.clean_blood()*/ //- NOPE, Washing machine -Errorage
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue [M] washes up using \the [src]."))
|
||||
busy = 0
|
||||
|
||||
if(M.loc != location) return //Person has moved away from the sink
|
||||
|
||||
M.clean_blood()
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
C.clean_blood()
|
||||
/*
|
||||
if(C.r_hand)
|
||||
C.r_hand.clean_blood() // The hand you attack with is empty anyway, the other one should not be washed while doing this.
|
||||
if(C.l_hand)
|
||||
C.l_hand.clean_blood()
|
||||
|
||||
if(C.wear_mask)
|
||||
C.wear_mask.clean_blood() //- NOPE, Washing machine -Errorage
|
||||
*/
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
/*if(C:w_uniform)
|
||||
C:w_uniform.clean_blood() //- NOPE, Washing machine -Errorage
|
||||
if(C:wear_suit)
|
||||
C:wear_suit.clean_blood() //- NOPE, Washing machine -Errorage
|
||||
if(C:shoes)
|
||||
C:shoes.clean_blood()*/ //- NOPE, Washing machine -Errorage
|
||||
if(C:gloves)
|
||||
C:gloves.clean_blood()
|
||||
/*if(C:head)
|
||||
C:head.clean_blood()*/ //- NOPE, Washing machine -Errorage
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue [M] washes up using \the [src]."))
|
||||
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(busy)
|
||||
@@ -83,27 +77,21 @@
|
||||
"\red You have wet \the [O], it shocks you!")
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!isturf(location)) return
|
||||
|
||||
var/obj/item/I = O
|
||||
if(!I || !istype(I,/obj/item)) return
|
||||
|
||||
usr << "\blue You start washing up."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
if(do_after(user,40))
|
||||
if(!I) return //Item's been destroyed while washing
|
||||
|
||||
O.clean_blood()
|
||||
user.visible_message( \
|
||||
"\blue [user] washes \a [I] using \the [src].", \
|
||||
"\blue You wash \a [I] using \the [src].")
|
||||
busy = 0
|
||||
|
||||
if(user.loc != location) return //User has moved
|
||||
if(!I) return //Item's been destroyed while washing
|
||||
if(user.get_active_hand() != I) return //Person has switched hands or the item in their hands
|
||||
|
||||
O.clean_blood()
|
||||
user.visible_message( \
|
||||
"\blue [user] washes \a [I] using \the [src].", \
|
||||
"\blue You wash \a [I] using \the [src].")
|
||||
|
||||
shower
|
||||
name = "Shower"
|
||||
desc = "This is dumb."
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define BOOK_VERSION_MIN 1
|
||||
#define BOOK_VERSION_MAX 1
|
||||
#define BOOK_VERSION_MAX 2
|
||||
#define BOOK_PATH "data/books/"
|
||||
|
||||
var/global/datum/book_manager/book_mgr = new()
|
||||
@@ -67,6 +67,10 @@ datum/archived_book
|
||||
id // the id of the book (like an isbn number)
|
||||
dat // Actual page content
|
||||
|
||||
author_real // author's real_name
|
||||
author_key // author's byond key
|
||||
list/icon/photos // in-game photos used
|
||||
|
||||
// loads the book corresponding by the specified id
|
||||
datum/archived_book/New(var/path)
|
||||
if(isnull(path))
|
||||
@@ -88,6 +92,12 @@ datum/archived_book/New(var/path)
|
||||
F["id"] >> id
|
||||
F["dat"] >> dat
|
||||
|
||||
F["author_real"] >> author_real
|
||||
F["author_key"] >> author_key
|
||||
F["photos"] >> photos
|
||||
if(!photos)
|
||||
photos = new()
|
||||
|
||||
// let's sanitize it here too!
|
||||
for(var/tag in paper_blacklist)
|
||||
if(findtext(dat,"<"+tag))
|
||||
@@ -105,6 +115,10 @@ datum/archived_book/proc/save()
|
||||
F["id"] << id
|
||||
F["dat"] << dat
|
||||
|
||||
F["author_real"] << author_real
|
||||
F["author_key"] << author_key
|
||||
F["photos"] << photos
|
||||
|
||||
#undef BOOK_VERSION_MIN
|
||||
#undef BOOK_VERSION_MAX
|
||||
#undef BOOK_PATH
|
||||
|
||||
@@ -73,33 +73,55 @@
|
||||
var/category
|
||||
|
||||
New()
|
||||
var/list/books = book_mgr.getall()
|
||||
var/list/catbooks = new()
|
||||
// get books in category
|
||||
for(var/datum/archived_book/B in books)
|
||||
if(!category || (category != B.category))
|
||||
continue;
|
||||
catbooks += B
|
||||
world << "cat [category]: [B.title]"
|
||||
if(catbooks.len <= 3)
|
||||
// if 3 or less books, fill shelf with that
|
||||
for(var/datum/archived_book/AB in catbooks)
|
||||
var/obj/item/weapon/book/B = new(src)
|
||||
B.name = "Book: [AB.title]"
|
||||
B.title = AB.title
|
||||
B.author = AB.author
|
||||
B.dat = AB.dat
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
else
|
||||
// otherwise, pick 3 random books
|
||||
for(var/i = 1 to 3)
|
||||
var/datum/archived_book/AB = pick(catbooks)
|
||||
var/obj/item/weapon/book/B = new(src)
|
||||
B.name = "Book: [AB.title]"
|
||||
B.title = AB.title
|
||||
B.author = AB.author
|
||||
B.dat = AB.dat
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
spawn(2) // allow library comp to exist
|
||||
var/list/books = book_mgr.getall()
|
||||
var/list/catbooks = new()
|
||||
// see if we have a library computer
|
||||
var/obj/machinery/librarycomp/comp
|
||||
if(istype(loc.loc, /area))
|
||||
comp = locate() in loc.loc
|
||||
// get books in category
|
||||
for(var/datum/archived_book/B in books)
|
||||
if(!category || (category != B.category))
|
||||
continue;
|
||||
catbooks += B
|
||||
if(catbooks.len <= 3)
|
||||
// if 3 or less books, fill shelf with that
|
||||
for(var/datum/archived_book/AB in catbooks)
|
||||
var/obj/item/weapon/book/B = new(src)
|
||||
B.name = "Book: [AB.title]"
|
||||
B.title = AB.title
|
||||
B.author = AB.author
|
||||
B.dat = AB.dat
|
||||
B.gen_pages()
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
B.ssbn = AB.id
|
||||
B.author_real = AB.author_real
|
||||
B.author_key = AB.author_key
|
||||
B.photos = AB.photos
|
||||
|
||||
// add to inventory
|
||||
if(comp)
|
||||
comp.inventory += B
|
||||
else
|
||||
// otherwise, pick 3 random books
|
||||
for(var/i = 1 to 3)
|
||||
var/datum/archived_book/AB = pick(catbooks)
|
||||
var/obj/item/weapon/book/B = new(src)
|
||||
B.name = "Book: [AB.title]"
|
||||
B.title = AB.title
|
||||
B.author = AB.author
|
||||
B.dat = AB.dat
|
||||
B.gen_pages()
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
B.ssbn = AB.id
|
||||
B.author_real = AB.author_real
|
||||
B.author_key = AB.author_key
|
||||
B.photos = AB.photos
|
||||
|
||||
// add to inventory
|
||||
if(comp)
|
||||
comp.inventory += B
|
||||
|
||||
attackby(obj/O as obj, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/book))
|
||||
@@ -201,13 +223,75 @@
|
||||
unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
|
||||
title // The real name of the book.
|
||||
|
||||
attack_self(var/mob/user as mob)
|
||||
author_real // author's real_name
|
||||
author_key // author's byond key
|
||||
ssbn // the ssbn, if a downloaded book
|
||||
|
||||
list/pages = new() // individual pages as a list of text
|
||||
cur_page = 1 // current page being read
|
||||
list/icon/photos // in-game photos used
|
||||
|
||||
proc/navbar()
|
||||
return "<div style='position:absolute;bottom:0;color:#666;background:white;font-style:italic;margin-top:1em;margin-bottom:1em;width:100%'>" \
|
||||
+ "<div style='float:left'>"+(cur_page > 1 \
|
||||
? "<a href='?src=\ref[src];page=[1]'><</a>" \
|
||||
+ "<a href='?src=\ref[src];page=[cur_page-1]'><</a>" \
|
||||
: "") \
|
||||
+ "</div><div style='float:right'>"+(cur_page < pages.len \
|
||||
? "<a href='?src=\ref[src];page=[cur_page+1]'>></a>" \
|
||||
+ "<a href='?src=\ref[src];page=[pages.len]'>></a>" \
|
||||
: "") \
|
||||
+ "</div><div style='text-align:center'>[cur_page]/[pages.len]</div></div>"
|
||||
|
||||
// should be called if dat is changed
|
||||
proc/gen_pages()
|
||||
// split into pages
|
||||
cur_page = 1
|
||||
pages = dd_text2list(dat, "<page>")
|
||||
var/PN = 1
|
||||
for(var/page in pages)
|
||||
// look for photos and process
|
||||
var/i = 1
|
||||
while(i <= lentext(page))
|
||||
i = findtext(page, "<photo ", i)
|
||||
if(i == 0)
|
||||
break
|
||||
var/e_s = findtext(page, " ", i+7)
|
||||
if(e_s == 0) e_s = INFINITY
|
||||
var/e_c = findtext(page, ">", i+7)
|
||||
if(e_c == 0) e_c = INFINITY
|
||||
var/e = min(e_s, e_c) // find the closest of the two
|
||||
if(e == INFINITY) break
|
||||
var/i_num = text2num(copytext(page, i+7, e))
|
||||
page = copytext(page, 1, i) + "<img src='book_[i_num].png'" + copytext(page, e)
|
||||
i = e + 1
|
||||
pages[PN] = page
|
||||
PN++
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
if(href_list["page"])
|
||||
cur_page = text2num(href_list["page"])
|
||||
attack_self(usr, 0)
|
||||
|
||||
proc/cache_imgs(mob/user as mob)
|
||||
for(var/icon/I in photos)
|
||||
user << browse_rsc(I, "book_[photos.Find(I)].png")
|
||||
|
||||
attack_self(var/mob/user as mob, opening=1)
|
||||
if(src.dat)
|
||||
user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
if(title)
|
||||
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
|
||||
else
|
||||
user.visible_message("[user] opens a book titled \"[src.name]\" and begins reading intently.")
|
||||
cache_imgs(user)
|
||||
user << browse("<div style='color:#666;font-style:italic;margin-bottom:1em'><div style='float:left'>[title]</div><div style='float:right'>[author]</div></div><div style='clear:both;overflow:scroll'>[pages[cur_page]]</div>[pages.len > 1 ? navbar() : ""]", "window=book;size=600x500")
|
||||
|
||||
if(opening)
|
||||
if(title)
|
||||
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
|
||||
else
|
||||
user.visible_message("[user] opens a book titled \"[src.name]\" and begins reading intently.")
|
||||
|
||||
onclose(user, "book")
|
||||
else
|
||||
user << "This book is completely blank!"
|
||||
@@ -220,11 +304,12 @@
|
||||
var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
|
||||
switch(choice)
|
||||
if("Title")
|
||||
var/title = input("Write a new title:") as text|null
|
||||
if(!title)
|
||||
var/ntitle = input("Write a new title:") as text|null
|
||||
if(!ntitle)
|
||||
return
|
||||
else
|
||||
src.name = sanitize(title)
|
||||
title = sanitize(ntitle)
|
||||
name = "Book: [title]"
|
||||
if("Contents")
|
||||
var/t = "[src.dat]"
|
||||
do
|
||||
@@ -248,6 +333,7 @@
|
||||
return
|
||||
|
||||
src.dat = t
|
||||
gen_pages()
|
||||
if("Author")
|
||||
var/nauthor = input("Write the author's name:") as text|null
|
||||
if(!nauthor)
|
||||
@@ -609,9 +695,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<FONT color=red>No scanner found within wireless network range.</FONT><BR>"
|
||||
else if(!scanner.cache)
|
||||
dat += "<FONT color=red>No data found in scanner memory.</FONT><BR>"
|
||||
else if(scanner.cache.ssbn && (scanner.cache.author_real != user.real_name && scanner.cache.author_key != user.client.ckey))
|
||||
dat += "<FONT color=red>This book contains copy protection preventing you from re-uploading this to the database.</FONT><BR>"
|
||||
else
|
||||
dat += "<TT>Data marked for upload...</TT><BR>"
|
||||
dat += "<TT>Title: </TT>[scanner.cache.name]<BR>"
|
||||
dat += "<TT>Data marked for [scanner.cache.ssbn ? "re-" : ""]upload...</TT><BR>"
|
||||
dat += "<TT>Title: </TT><A href='?src=\ref[src];settitle=1'>[scanner.cache.title]</A><BR>"
|
||||
if(!scanner.cache.author)
|
||||
scanner.cache.author = "Anonymous"
|
||||
dat += "<TT>Author: </TT><A href='?src=\ref[src];setauthor=1'>[scanner.cache.author]</A><BR>"
|
||||
@@ -704,8 +792,13 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
if(href_list["delbook"])
|
||||
var/obj/item/weapon/book/b = locate(href_list["delbook"])
|
||||
inventory.Remove(b)
|
||||
if(href_list["settitle"])
|
||||
var/newtitle = input("Enter the book name: ", "Book Upload", scanner.cache.title) as text|null
|
||||
if(newtitle)
|
||||
scanner.cache.title = sanitize(newtitle)
|
||||
scanner.cache.name = "Book: [scanner.cache.title]"
|
||||
if(href_list["setauthor"])
|
||||
var/newauthor = input("Enter the author's name: ") as text|null
|
||||
var/newauthor = input("Enter the author's name: ", "Book Upload", scanner.cache.author) as text|null
|
||||
if(newauthor)
|
||||
scanner.cache.author = sanitize(newauthor)
|
||||
if(href_list["setcategory"])
|
||||
@@ -743,11 +836,22 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dbcon.Disconnect()
|
||||
else
|
||||
var/datum/archived_book/B = new()
|
||||
B.title = scanner.cache.name
|
||||
if(scanner.cache.title)
|
||||
B.title = scanner.cache.title
|
||||
else
|
||||
B.title = scanner.cache.name
|
||||
B.author = scanner.cache.author
|
||||
B.dat = scanner.cache.dat
|
||||
B.category = upload_category
|
||||
B.id = book_mgr.freeid()
|
||||
if(scanner.cache.ssbn)
|
||||
B.id = scanner.cache.ssbn
|
||||
else
|
||||
B.id = book_mgr.freeid()
|
||||
B.author_real = scanner.cache.author_real
|
||||
B.author_key = scanner.cache.author_key
|
||||
if(scanner.cache.photos.len >= 8)
|
||||
scanner.cache.photos.len = 8
|
||||
B.photos = scanner.cache.photos
|
||||
B.save()
|
||||
|
||||
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
|
||||
@@ -775,6 +879,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
B.title = title
|
||||
B.author = author
|
||||
B.dat = content
|
||||
B.gen_pages()
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
src.visible_message("[src]'s printer hums as it produces a completely bound book. How did it do that?")
|
||||
break
|
||||
@@ -789,7 +894,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
B.title = AB.title
|
||||
B.author = AB.author
|
||||
B.dat = AB.dat
|
||||
B.gen_pages()
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
B.author_real = AB.author_real
|
||||
B.author_key = AB.author_key
|
||||
B.photos = AB.photos
|
||||
src.visible_message("[src]'s printer hums as it produces a completely bound book. How did it do that?")
|
||||
|
||||
if(href_list["orderbyid"])
|
||||
@@ -873,18 +982,236 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
var/obj/item/weapon/book/template
|
||||
var/list/icon_names
|
||||
var/i_preview = 1
|
||||
var/printing = 0
|
||||
|
||||
proc/newGenericBook()
|
||||
template = new(src)
|
||||
template.title = "Print Job #" + "[rand(100, 999)]"
|
||||
template.author = "Anonymous"
|
||||
template.name = "Book: [template.title]"
|
||||
template.icon_state = "book[rand(1,7)]"
|
||||
template.dat = ""
|
||||
template.gen_pages()
|
||||
template.photos = new()
|
||||
icon_names = new()
|
||||
i_preview = 1
|
||||
|
||||
attackby(var/obj/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
|
||||
src.visible_message("[src] begins to hum as it warms up its printing drums.")
|
||||
sleep(rand(200,400))
|
||||
src.visible_message("[src] whirs as it prints and binds a new book.")
|
||||
var/obj/item/weapon/book/b = new(src.loc)
|
||||
b.dat = O:info
|
||||
b.name = "Print Job #" + "[rand(100, 999)]"
|
||||
b.icon_state = "book[rand(1,7)]"
|
||||
|
||||
if(template)
|
||||
template.dat += "<page>[O:info]"
|
||||
template.gen_pages()
|
||||
else
|
||||
template = new(src)
|
||||
template.title = O.name == initial(O.name) ? "Print Job #" + "[rand(100, 999)]" : O.name
|
||||
template.name = "Book: [template.title]"
|
||||
template.icon_state = "book[rand(1,7)]"
|
||||
template.dat = O:info
|
||||
template.gen_pages()
|
||||
template.photos = new()
|
||||
icon_names = new()
|
||||
i_preview = 1
|
||||
del(O)
|
||||
updateUsrDialog()
|
||||
else if(istype(O, /obj/item/weapon/photo))
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
user.visible_message("[user] loads a photo into [src].", "You load a photo into [src].")
|
||||
|
||||
if(!template)
|
||||
newGenericBook()
|
||||
if(template.photos.len >= 8)
|
||||
user << "\red The photo tray is already full!"
|
||||
O.loc = src.loc
|
||||
return
|
||||
|
||||
var/icon/imported = new(O.icon)
|
||||
imported.Crop(6,8,27,27)
|
||||
imported.Scale(32,32)
|
||||
template.photos += imported
|
||||
icon_names += O.name
|
||||
del(O)
|
||||
updateUsrDialog()
|
||||
else if(istype(O, /obj/item/weapon/book))
|
||||
if(template)
|
||||
user << "\red The binder already has a book in the buffer!"
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
user.visible_message("[user] loads a book into [src] for editing.", "You load a book into [src] for editing.")
|
||||
|
||||
var/obj/machinery/librarycomp/C = locate() in loc.loc
|
||||
if(C)
|
||||
if(C.inventory.Find(O))
|
||||
C.inventory -= O
|
||||
template = O
|
||||
icon_names = new()
|
||||
for(var/i = 1 to template.photos.len)
|
||||
icon_names += "Photo [i]"
|
||||
updateUsrDialog()
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/machinery/bookbinder/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/bookbinder/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/bookbinder/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(src.stat)
|
||||
user << "[name] does not seem to be responding to your button mashing."
|
||||
return
|
||||
|
||||
var/dat = "<HEAD><TITLE>Book Binder</TITLE></HEAD><TT><b>NT Publishing House</b><hr>"
|
||||
|
||||
if(printing)
|
||||
dat += "[src] is currently printing."
|
||||
else
|
||||
// general settings
|
||||
dat += "<a href='?src=\ref[src];new=1'>New Book</a>"
|
||||
|
||||
if(template)
|
||||
template.cache_imgs(user)
|
||||
|
||||
dat += " <a href='?src=\ref[src];delete=1'>Delete Book</a><hr>"
|
||||
|
||||
dat += "Title: <a href='?src=\ref[src];title=1'>[template.title]</a><br>"
|
||||
dat += "Author: <a href='?src=\ref[src];author=1'>[template.author]</a><hr>"
|
||||
|
||||
// articles
|
||||
dat += "Pages:<ol>"
|
||||
var/ID = 1
|
||||
for(var/P in template.pages)
|
||||
dat += "<li><a href='?src=\ref[src];p_edit=[ID]'>Page [ID]</a>"
|
||||
dat += " <a href='?src=\ref[src];p_preview=[ID]'>Preview</a>"
|
||||
dat += " <a href='?src=\ref[src];p_delete=[ID]'>Delete</a></li>"
|
||||
ID++
|
||||
|
||||
dat += "</ol><a href='?src=\ref[src];p_new=1'>New Page</a><hr>"
|
||||
|
||||
// images
|
||||
dat += "Images:<ol>"
|
||||
ID = 1
|
||||
for(var/icon/I in template.photos)
|
||||
dat += "<li><a href='?src=\ref[src];i_view=[ID]'>[ID]: [icon_names[ID]]</a>"
|
||||
dat += " <a href='?src=\ref[src];i_delete=[ID]'>Delete</a>"
|
||||
ID++
|
||||
dat += "</ol>"
|
||||
if(i_preview >= 1 && i_preview <= template.photos.len)
|
||||
var/iconname = "book_preview.png"
|
||||
user << browse_rsc(template.photos[i_preview],iconname)
|
||||
dat += "[i_preview] ([icon_names[i_preview]]): <img src='[iconname]'>"
|
||||
dat += "<hr><A href='?src=\ref[src];print=1'>Print</a>"
|
||||
|
||||
dat += "</TT>"
|
||||
user << browse(dat, "window=bookbinder")
|
||||
onclose(user, "bookbinder")
|
||||
|
||||
|
||||
/obj/machinery/bookbinder/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
if(href_list["new"])
|
||||
if(template)
|
||||
var/R = alert("There is already a book in the buffer. Do you want to delete it and start over?", "Book Binder", "Delete", "Cancel")
|
||||
if(R == "Cancel")
|
||||
return
|
||||
del(template)
|
||||
newGenericBook()
|
||||
updateUsrDialog()
|
||||
if(href_list["delete"])
|
||||
if(template)
|
||||
del(template)
|
||||
updateUsrDialog()
|
||||
if(href_list["print"])
|
||||
printing = 1
|
||||
updateUsrDialog()
|
||||
src.visible_message("[src] begins to hum as it warms up its printing drums.")
|
||||
sleep(rand(50,100))
|
||||
src.visible_message("[src] whirs as it prints and binds a new book.")
|
||||
|
||||
if(!template.ssbn)
|
||||
template.author_real = usr.real_name
|
||||
if(usr.client)
|
||||
template.author_key = usr.client.ckey
|
||||
template.loc = src.loc
|
||||
template = null
|
||||
printing = 0
|
||||
updateUsrDialog()
|
||||
if(href_list["p_new"])
|
||||
template.dat += "<page>"
|
||||
template.gen_pages()
|
||||
updateUsrDialog()
|
||||
|
||||
if(href_list["title"])
|
||||
var/n_name = input(usr, "What would you like to title your book?", "Book Binder", template.title) as text|null
|
||||
if(n_name)
|
||||
template.title = sanitize(n_name)
|
||||
template.name = "Book: [template.title]"
|
||||
updateUsrDialog()
|
||||
if(href_list["author"])
|
||||
var/n_name = input(usr, "Who would you like your pen name to be?", "Book Binder", template.author) as text|null
|
||||
if(n_name)
|
||||
template.author = sanitize(n_name)
|
||||
updateUsrDialog()
|
||||
|
||||
if(href_list["p_edit"])
|
||||
var/PN = text2num(href_list["p_edit"])
|
||||
var/list/pages = dd_text2list(template.dat, "<page>")
|
||||
var/t = pages[PN]
|
||||
do
|
||||
t = input(usr, "What text do you wish to add?", "Book Binder P.[PN]", t) as message
|
||||
|
||||
if(lentext(t) >= MAX_BOOK_MESSAGE_LEN)
|
||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
||||
if(cont == "no")
|
||||
break
|
||||
while(lentext(t) > MAX_BOOK_MESSAGE_LEN)
|
||||
|
||||
// check for exploits
|
||||
for(var/tag in paper_blacklist)
|
||||
if(findtext(t,"<"+tag))
|
||||
usr << "\blue You think to yourself, \"Hm.. this is only paper...\""
|
||||
return
|
||||
|
||||
// the actual pages list is formatted and shouldn't be directly editted
|
||||
pages[PN] = t
|
||||
template.dat = dd_list2text(pages, "<page>")
|
||||
template.gen_pages()
|
||||
updateUsrDialog()
|
||||
if(href_list["p_delete"])
|
||||
var/i = text2num(href_list["p_delete"])
|
||||
var/list/pages = dd_text2list(template.dat, "<page>")
|
||||
pages.Cut(i, i+1)
|
||||
template.dat = dd_list2text(pages, "<page>")
|
||||
template.gen_pages()
|
||||
updateUsrDialog()
|
||||
if(href_list["p_preview"])
|
||||
var/i = text2num(href_list["p_preview"])
|
||||
var/dat = template.pages[i]
|
||||
usr << browse(dat, "window=bookbinder_preview;size=600x500")
|
||||
onclose(usr, "bookbinder_preview")
|
||||
|
||||
if(href_list["i_view"])
|
||||
i_preview = text2num(href_list["i_view"])
|
||||
updateUsrDialog()
|
||||
if(href_list["i_delete"])
|
||||
var/i = text2num(href_list["i_delete"])
|
||||
template.photos.Cut(i, i+1)
|
||||
icon_names.Cut(i, i+1)
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -132,6 +132,8 @@ MASS SPECTROMETER
|
||||
return
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(!(locate(A) in oview(1,user)))
|
||||
return
|
||||
if(src.loc != user)
|
||||
return 0
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/playsleepseconds = 0.0
|
||||
var/list/storedinfo = new/list()
|
||||
var/list/timestamp = new/list()
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
throwforce = 2
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
@@ -23,18 +23,18 @@
|
||||
var/ending = copytext(msg, length(msg))
|
||||
src.timestamp+= src.timerecorded
|
||||
if (M.stuttering)
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
return
|
||||
if (M.getBrainLoss() >= 60)
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
return
|
||||
if (ending == "?")
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
return
|
||||
else if (ending == "!")
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
return
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
return
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -69,12 +69,12 @@
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
src.icon_state = "taperecorderrecording"
|
||||
if(src.timerecorded < 3600 && src.playing == 0)
|
||||
if(src.timerecorded < 10800 && src.playing == 0)
|
||||
usr << "\blue Recording started."
|
||||
src.recording = 1
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(src.timerecorded, src.timerecorded<3600)
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording started."
|
||||
for(src.timerecorded, src.timerecorded<10800)
|
||||
if(src.recording == 0)
|
||||
break
|
||||
src.timerecorded++
|
||||
@@ -96,7 +96,7 @@
|
||||
if (src.recording == 1)
|
||||
src.recording = 0
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording stopped."
|
||||
usr << "\blue Recording stopped."
|
||||
src.icon_state = "taperecorderidle"
|
||||
return
|
||||
@@ -149,7 +149,7 @@
|
||||
src.playing = 1
|
||||
src.icon_state = "taperecorderplaying"
|
||||
usr << "\blue Playing started."
|
||||
for(var/i=1,src.timerecorded<3600,sleep(10 * (src.playsleepseconds) ))
|
||||
for(var/i=1,src.timerecorded<10800,sleep(10 * (src.playsleepseconds) ))
|
||||
if (src.playing == 0)
|
||||
break
|
||||
if (src.storedinfo.len < i)
|
||||
@@ -219,12 +219,12 @@
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
src.icon_state = "taperecorderrecording"
|
||||
if(src.timerecorded < 3600 && src.playing == 0)
|
||||
if(src.timerecorded < 10800 && src.playing == 0)
|
||||
usr << "\blue Recording started."
|
||||
src.recording = 1
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(src.timerecorded, src.timerecorded<3600)
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording started."
|
||||
for(src.timerecorded, src.timerecorded<10800)
|
||||
if(src.recording == 0)
|
||||
break
|
||||
src.timerecorded++
|
||||
@@ -241,7 +241,7 @@
|
||||
if (src.recording == 1)
|
||||
src.recording = 0
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording stopped."
|
||||
usr << "\blue Recording stopped."
|
||||
src.icon_state = "taperecorderidle"
|
||||
return
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the display case.", usr)
|
||||
src.health -= 2
|
||||
src.add_fingerprint(user)
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
@@ -195,6 +195,8 @@
|
||||
return
|
||||
|
||||
/obj/item/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/packageWrap))
|
||||
var/location = get_turf(src.loc)
|
||||
if(istype(src,/obj/item/weapon/storage) && istype(src.loc, /mob)) //Put it into the bag
|
||||
@@ -439,7 +441,7 @@ mob/proc/flash_weak_pain()
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
M.eye_blurry += rand(3,4)
|
||||
M.eye_stat += rand(2,4)
|
||||
M.eye_stat += rand(5,9)
|
||||
if (M.eye_stat >= 10)
|
||||
M.eye_blurry += 15+(0.1*M.eye_blurry)
|
||||
M.disabilities |= 1
|
||||
|
||||
@@ -119,7 +119,7 @@ RCD
|
||||
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
return
|
||||
else if(mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
|
||||
if(istype(A, /turf/simulated/wall) && matter >= 4)
|
||||
if(istype(A, /turf/simulated/wall) && !istype(A, /turf/simulated/wall/r_wall) && matter >= 4)
|
||||
user << "Deconstructing Wall (4)..."
|
||||
playsound(src.loc, 'click.ogg', 50, 1)
|
||||
if(do_after(user, 40))
|
||||
|
||||
@@ -45,13 +45,10 @@ FINGERPRINT CARD
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!src.registered)
|
||||
src.registered = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
|
||||
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
|
||||
src.name = "[src.registered]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
else
|
||||
..()
|
||||
src.registered = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
|
||||
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
|
||||
src.name = "[src.registered]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
|
||||
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -357,6 +357,9 @@ CIRCULAR SAW
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/verb/print_data()
|
||||
set src in view(usr, 1)
|
||||
if(usr.stat == 2)
|
||||
src << "No."
|
||||
return
|
||||
|
||||
var/scan_data = ""
|
||||
var/n = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/obj/item/clothing/suit/storage/
|
||||
/obj/item/clothing/suit/storage
|
||||
var/obj/screen/storage/boxes
|
||||
var/obj/screen/close/closer
|
||||
var/obj/slot1
|
||||
@@ -95,7 +95,6 @@
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
|
||||
|
||||
if (src == user.l_hand)
|
||||
src.orient_objs(3, 5, 3, 3)
|
||||
else if (src == user.r_hand)
|
||||
@@ -119,9 +118,8 @@
|
||||
cx = tx
|
||||
cy--
|
||||
//Foreach goto(56)
|
||||
src.closer.screen_loc = text("[],[]", mx, my)
|
||||
src.closer.screen_loc = text("[],[]", mx+1, my)
|
||||
return
|
||||
|
||||
/*/obj/item/clothing/suit/storage/New()
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
M << browse(null, "window=vote")
|
||||
M.client.showvote = 0
|
||||
|
||||
if(winner == "none")
|
||||
winner = "default"
|
||||
|
||||
calcwin()
|
||||
|
||||
if(mode == 2)
|
||||
@@ -362,6 +365,7 @@
|
||||
return
|
||||
//world << "You're voting for [N] options!"
|
||||
var/i
|
||||
vote.choices = list()
|
||||
for(i=1; i<=N; i++)
|
||||
var/addvote = input(usr, "What is option #[i]?", "Enter Option #[i]") as text
|
||||
vote.choices += addvote
|
||||
|
||||
@@ -2240,6 +2240,7 @@
|
||||
return
|
||||
|
||||
var/i
|
||||
vote.choices = list()
|
||||
for(i=1; i<=N; i++)
|
||||
var/addvote = input(usr, "What is option #[i]?", "Enter Option #[i]") as text
|
||||
vote.choices += addvote
|
||||
|
||||
@@ -1450,6 +1450,8 @@ datum
|
||||
M:adjustOxyLoss(-3)
|
||||
M:heal_organ_damage(3,3)
|
||||
M:adjustToxLoss(-3)
|
||||
M:halloss = 0
|
||||
M:hallucination -= 5
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1531,6 +1533,19 @@ datum
|
||||
for(var/mob/living/carbon/metroid/M in T)
|
||||
M.adjustToxLoss(rand(15,30))
|
||||
|
||||
LSD
|
||||
name = "LSD"
|
||||
id = "LSD"
|
||||
description = "A hallucinogen"
|
||||
reagent_state = LIQUID
|
||||
color = "#B31008" // rgb: 139, 166, 233
|
||||
|
||||
on_mob_life(var/mob/M)
|
||||
if(!M) M = holder.my_atom
|
||||
M:hallucination += 5
|
||||
..()
|
||||
return
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nanites
|
||||
@@ -1822,7 +1837,7 @@ datum
|
||||
|
||||
coco
|
||||
name = "Coco Powder"
|
||||
id = "Coco Powder"
|
||||
id = "coco"
|
||||
description = "A fatty, bitter paste made from coco beans."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
|
||||
@@ -417,6 +417,12 @@ datum
|
||||
required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5)
|
||||
result_amount = 2
|
||||
|
||||
LSD
|
||||
name = "LSD"
|
||||
id = "LSD"
|
||||
result = "LSD"
|
||||
required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
|
||||
result_amount = 5
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// foam and foam precursor
|
||||
|
||||
@@ -13,15 +13,17 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
|
||||
mob/living/carbon/var
|
||||
image/halimage
|
||||
image/halbody
|
||||
obj/halitem
|
||||
hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
|
||||
handling_hal = 0
|
||||
hal_crit = 0
|
||||
|
||||
mob/living/carbon/proc/handle_hallucinations()
|
||||
if(handling_hal) return
|
||||
handling_hal = 1
|
||||
while(hallucination > 20)
|
||||
sleep(rand(200,500))
|
||||
sleep(rand(200,500)/(hallucination/25))
|
||||
var/halpick = rand(1,100)
|
||||
switch(halpick)
|
||||
if(0 to 15)
|
||||
@@ -33,77 +35,79 @@ mob/living/carbon/proc/handle_hallucinations()
|
||||
if(16 to 25)
|
||||
//Strange items
|
||||
//src << "Traitor Items"
|
||||
halitem = new
|
||||
var/list/slots_free = list("1,1","3,1")
|
||||
if(l_hand) slots_free -= "1,1"
|
||||
if(r_hand) slots_free -= "3,1"
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(!H.belt) slots_free += "3,0"
|
||||
if(!H.l_store) slots_free += "4,0"
|
||||
if(!H.r_store) slots_free += "5,0"
|
||||
if(slots_free.len)
|
||||
halitem.screen_loc = pick(slots_free)
|
||||
halitem.layer = 50
|
||||
switch(rand(1,6))
|
||||
if(1) //revolver
|
||||
halitem.icon = 'gun.dmi'
|
||||
halitem.icon_state = "revolver"
|
||||
halitem.name = "Revolver"
|
||||
if(2) //c4
|
||||
halitem.icon = 'syndieweapons.dmi'
|
||||
halitem.icon_state = "c4small_0"
|
||||
halitem.name = "Mysterious Package"
|
||||
if(prob(25))
|
||||
halitem.icon_state = "c4small_1"
|
||||
if(3) //sword
|
||||
halitem.icon = 'weapons.dmi'
|
||||
halitem.icon_state = "sword1"
|
||||
halitem.name = "Sword"
|
||||
if(4) //stun baton
|
||||
halitem.icon = 'weapons.dmi'
|
||||
halitem.icon_state = "stunbaton"
|
||||
halitem.name = "Stun Baton"
|
||||
if(5) //emag
|
||||
halitem.icon = 'card.dmi'
|
||||
halitem.icon_state = "emag"
|
||||
halitem.name = "Cryptographic Sequencer"
|
||||
if(6) //flashbang
|
||||
halitem.icon = 'grenade.dmi'
|
||||
halitem.icon_state = "flashbang1"
|
||||
halitem.name = "Flashbang"
|
||||
if(client) client.screen += halitem
|
||||
spawn(rand(100,250))
|
||||
del halitem
|
||||
if(!halitem)
|
||||
halitem = new
|
||||
var/list/slots_free = list("1,1","3,1")
|
||||
if(l_hand) slots_free -= "1,1"
|
||||
if(r_hand) slots_free -= "3,1"
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(!H.belt) slots_free += "3,0"
|
||||
if(!H.l_store) slots_free += "4,0"
|
||||
if(!H.r_store) slots_free += "5,0"
|
||||
if(slots_free.len)
|
||||
halitem.screen_loc = pick(slots_free)
|
||||
halitem.layer = 50
|
||||
switch(rand(1,6))
|
||||
if(1) //revolver
|
||||
halitem.icon = 'gun.dmi'
|
||||
halitem.icon_state = "revolver"
|
||||
halitem.name = "Revolver"
|
||||
if(2) //c4
|
||||
halitem.icon = 'syndieweapons.dmi'
|
||||
halitem.icon_state = "c4small_0"
|
||||
halitem.name = "Mysterious Package"
|
||||
if(prob(25))
|
||||
halitem.icon_state = "c4small_1"
|
||||
if(3) //sword
|
||||
halitem.icon = 'weapons.dmi'
|
||||
halitem.icon_state = "sword1"
|
||||
halitem.name = "Sword"
|
||||
if(4) //stun baton
|
||||
halitem.icon = 'weapons.dmi'
|
||||
halitem.icon_state = "stunbaton"
|
||||
halitem.name = "Stun Baton"
|
||||
if(5) //emag
|
||||
halitem.icon = 'card.dmi'
|
||||
halitem.icon_state = "emag"
|
||||
halitem.name = "Cryptographic Sequencer"
|
||||
if(6) //flashbang
|
||||
halitem.icon = 'grenade.dmi'
|
||||
halitem.icon_state = "flashbang1"
|
||||
halitem.name = "Flashbang"
|
||||
if(client) client.screen += halitem
|
||||
spawn(rand(100,250))
|
||||
del halitem
|
||||
if(26 to 40)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
var/possible_points = list()
|
||||
for(var/turf/simulated/floor/F in view(src,world.view))
|
||||
possible_points += F
|
||||
var/turf/simulated/floor/target = pick(possible_points)
|
||||
if(!halimage)
|
||||
var/possible_points = list()
|
||||
for(var/turf/simulated/floor/F in view(src,world.view))
|
||||
possible_points += F
|
||||
var/turf/simulated/floor/target = pick(possible_points)
|
||||
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
//src << "Space"
|
||||
halimage = image('space.dmi',target,"[rand(1,25)]",TURF_LAYER)
|
||||
if(2)
|
||||
//src << "Fire"
|
||||
halimage = image('fire.dmi',target,"1",TURF_LAYER)
|
||||
if(3)
|
||||
//src << "C4"
|
||||
halimage = image('syndieweapons.dmi',target,"c4small_1",OBJ_LAYER+0.01)
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
//src << "Space"
|
||||
halimage = image('space.dmi',target,"[rand(1,25)]",TURF_LAYER)
|
||||
if(2)
|
||||
//src << "Fire"
|
||||
halimage = image('fire.dmi',target,"1",TURF_LAYER)
|
||||
if(3)
|
||||
//src << "C4"
|
||||
halimage = image('syndieweapons.dmi',target,"c4small_1",OBJ_LAYER+0.01)
|
||||
|
||||
|
||||
if(client) client.images += halimage
|
||||
spawn(rand(10,50)) //Only seen for a brief moment.
|
||||
if(client) client.images -= halimage
|
||||
halimage = null
|
||||
if(client) client.images += halimage
|
||||
spawn(rand(10,50)) //Only seen for a brief moment.
|
||||
if(client) client.images -= halimage
|
||||
halimage = null
|
||||
|
||||
|
||||
if(41 to 65)
|
||||
//Strange audio
|
||||
src << "Strange Audio"
|
||||
//src << "Strange Audio"
|
||||
switch(rand(1,12))
|
||||
if(1) src << 'airlock.ogg'
|
||||
if(2)
|
||||
@@ -128,11 +132,45 @@ mob/living/carbon/proc/handle_hallucinations()
|
||||
src << 'Taser.ogg'
|
||||
//Rare audio
|
||||
if(12)
|
||||
switch(rand(1,4))
|
||||
if(1) src << 'ghost.ogg'
|
||||
if(2) src << 'ghost2.ogg'
|
||||
if(3) src << 'Heart Beat.ogg'
|
||||
if(4) src << 'screech.ogg'
|
||||
var/list/creepyasssounds = list('ghost.ogg', 'ghost2.ogg', 'Heart Beat.ogg', 'screech.ogg',\
|
||||
'behind_you1.ogg', 'behind_you2.ogg', 'far_noise.ogg', 'growl1.ogg', 'growl2.ogg',\
|
||||
'growl3.ogg', 'im_here1.ogg', 'im_here2.ogg', 'i_see_you1.ogg', 'i_see_you2.ogg',\
|
||||
'look_up1.ogg', 'look_up2.ogg', 'over_here1.ogg', 'over_here2.ogg', 'over_here3.ogg',\
|
||||
'turn_around1.ogg', 'turn_around2.ogg', 'veryfar_noise.ogg', 'wail.ogg')
|
||||
src << pick(creepyasssounds)
|
||||
if(66 to 70)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
if(!halbody)
|
||||
var/possible_points = list()
|
||||
for(var/turf/simulated/floor/F in view(src,world.view))
|
||||
possible_points += F
|
||||
var/turf/simulated/floor/target = pick(possible_points)
|
||||
switch(rand(1,5))
|
||||
if(1)
|
||||
halbody = image('human.dmi',target,"husk_l",TURF_LAYER)
|
||||
if(2,3)
|
||||
halbody = image('human.dmi',target,"husk_s",TURF_LAYER)
|
||||
if(4)
|
||||
halbody = image('alien.dmi',target,"alienother",TURF_LAYER)
|
||||
if(5)
|
||||
halbody = image('xcomalien.dmi',target,"chryssalid",TURF_LAYER)
|
||||
|
||||
if(client) client.images += halbody
|
||||
spawn(rand(50,80)) //Only seen for a brief moment.
|
||||
if(client) client.images -= halbody
|
||||
halbody = null
|
||||
if(71 to 75)
|
||||
//Fake death
|
||||
src.sleeping_willingly = 1
|
||||
src.sleeping = 1
|
||||
hal_crit = 1
|
||||
hal_screwyhud = 1
|
||||
spawn(rand(50,100))
|
||||
src.sleeping_willingly = 0
|
||||
src.sleeping = 0
|
||||
hal_crit = 0
|
||||
hal_screwyhud = 0
|
||||
handling_hal = 0
|
||||
|
||||
|
||||
@@ -172,4 +210,193 @@ proc/check_panel(mob/M)
|
||||
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
|
||||
if(M.hallucination < 15)
|
||||
return 1
|
||||
return 0*/
|
||||
return 0 */
|
||||
|
||||
/obj/fake_attacker
|
||||
icon = null
|
||||
icon_state = null
|
||||
name = ""
|
||||
desc = ""
|
||||
density = 0
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
var/mob/living/carbon/human/my_target = null
|
||||
var/weapon_name = null
|
||||
var/obj/item/weap = null
|
||||
var/image/stand_icon = null
|
||||
var/image/currentimage = null
|
||||
var/icon/base = null
|
||||
var/s_tone
|
||||
var/mob/living/clone = null
|
||||
var/image/left
|
||||
var/image/right
|
||||
var/image/up
|
||||
var/collapse
|
||||
var/image/down
|
||||
|
||||
var/health = 100
|
||||
|
||||
attackby(var/obj/item/weapon/P as obj, mob/user as mob)
|
||||
step_away(src,my_target,2)
|
||||
for(var/mob/M in oviewers(world.view,my_target))
|
||||
M << "\red <B>[my_target] flails around wildly.</B>"
|
||||
my_target.show_message("\red <B>[src] has been attacked by [my_target] </B>", 1) //Lazy.
|
||||
|
||||
//src.health -= P.power
|
||||
|
||||
|
||||
return
|
||||
|
||||
HasEntered(var/mob/M, somenumber)
|
||||
if(M == my_target)
|
||||
step_away(src,my_target,2)
|
||||
if(prob(30))
|
||||
for(var/mob/O in oviewers(world.view , my_target))
|
||||
O << "\red <B>[my_target] stumbles around.</B>"
|
||||
|
||||
New()
|
||||
spawn(300)
|
||||
if(my_target)
|
||||
my_target.hallucinations -= src
|
||||
del(src)
|
||||
step_away(src,my_target,2)
|
||||
proccess()
|
||||
|
||||
|
||||
proc/updateimage()
|
||||
// del src.currentimage
|
||||
|
||||
|
||||
if(src.dir == NORTH)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(up,src)
|
||||
else if(src.dir == SOUTH)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(down,src)
|
||||
else if(src.dir == EAST)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(right,src)
|
||||
else if(src.dir == WEST)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(left,src)
|
||||
my_target << currentimage
|
||||
|
||||
|
||||
proc/proccess()
|
||||
if(!my_target) spawn(5) .()
|
||||
if(src.health < 0)
|
||||
collapse()
|
||||
return
|
||||
if(get_dist(src,my_target) > 1)
|
||||
src.dir = get_dir(src,my_target)
|
||||
step_towards(src,my_target)
|
||||
updateimage()
|
||||
else
|
||||
if(prob(15))
|
||||
if(weapon_name)
|
||||
my_target << sound(pick('genhit1.ogg', 'genhit2.ogg', 'genhit3.ogg'))
|
||||
my_target.show_message("\red <B>[my_target] has been attacked with [weapon_name] by [src.name] </B>", 1)
|
||||
my_target.halloss += 8
|
||||
if(prob(20)) my_target.eye_blurry += 3
|
||||
if(prob(33))
|
||||
if(!locate(/obj/effect/overlay) in my_target.loc)
|
||||
fake_blood(my_target)
|
||||
else
|
||||
my_target << sound(pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'))
|
||||
my_target.show_message("\red <B>[src.name] has punched [my_target]!</B>", 1)
|
||||
my_target.halloss += 4
|
||||
if(prob(33))
|
||||
if(!locate(/obj/effect/overlay) in my_target.loc)
|
||||
fake_blood(my_target)
|
||||
|
||||
if(prob(15))
|
||||
step_away(src,my_target,2)
|
||||
spawn(5) .()
|
||||
|
||||
proc/collapse()
|
||||
collapse = 1
|
||||
updateimage()
|
||||
|
||||
/proc/fake_blood(var/mob/target)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
|
||||
O.name = "blood"
|
||||
var/image/I = image('blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
|
||||
target << I
|
||||
spawn(300)
|
||||
del(O)
|
||||
return
|
||||
|
||||
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_magazine/a357,\
|
||||
/obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword,\
|
||||
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/emp_kit,\
|
||||
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
|
||||
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
|
||||
/obj/item/clothing/mask/gas/voice, /obj/item/clothing/glasses/thermal,\
|
||||
/obj/item/device/chameleon, /obj/item/weapon/card/emag, /obj/item/device/hacktool,\
|
||||
/obj/item/weapon/storage/toolbox/syndicate, /obj/item/weapon/aiModule,\
|
||||
/obj/item/device/radio/headset/traitor, /obj/item/weapon/plastique,\
|
||||
/obj/item/weapon/syndie/c4explosive, /obj/item/device/powersink,\
|
||||
/obj/machinery/singularity_beacon/syndicate, /obj/item/weapon/storage/syndie_kit,\
|
||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||
|
||||
/proc/fake_attack(var/mob/target)
|
||||
var/list/possible_clones = new/list()
|
||||
var/mob/living/carbon/human/clone = null
|
||||
var/clone_weapon = null
|
||||
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.stat || H.lying) continue
|
||||
possible_clones += H
|
||||
|
||||
if(!possible_clones.len) return
|
||||
clone = pick(possible_clones)
|
||||
//var/obj/fake_attacker/F = new/obj/fake_attacker(outside_range(target))
|
||||
var/obj/fake_attacker/F = new/obj/fake_attacker(target.loc)
|
||||
if(clone.l_hand)
|
||||
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
|
||||
clone_weapon = clone.l_hand.name
|
||||
F.weap = clone.l_hand
|
||||
else if (clone.r_hand)
|
||||
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
|
||||
clone_weapon = clone.r_hand.name
|
||||
F.weap = clone.r_hand
|
||||
|
||||
F.name = clone.name
|
||||
F.my_target = target
|
||||
F.weapon_name = clone_weapon
|
||||
target.hallucinations += F
|
||||
|
||||
|
||||
F.left = image(clone,dir = WEST)
|
||||
F.right = image(clone,dir = EAST)
|
||||
F.up = image(clone,dir = NORTH)
|
||||
F.down = image(clone,dir = SOUTH)
|
||||
|
||||
// F.base = new /icon(clone.stand_icon)
|
||||
// F.currentimage = new /image(clone)
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
F.left = new /icon(clone.stand_icon,dir=WEST)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.left.Blend(i)
|
||||
F.up = new /icon(clone.stand_icon,dir=NORTH)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.up.Blend(i)
|
||||
F.down = new /icon(clone.stand_icon,dir=SOUTH)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.down.Blend(i)
|
||||
F.right = new /icon(clone.stand_icon,dir=EAST)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.right.Blend(i)
|
||||
|
||||
target << F.up
|
||||
*/
|
||||
|
||||
F.updateimage()
|
||||
@@ -1,4 +1,10 @@
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(halloss > 0 && (!gibbed))
|
||||
//hallucination = 0
|
||||
halloss = 0
|
||||
// And the suffocation was a hallucination (lazy)
|
||||
//oxyloss = 0
|
||||
return
|
||||
if(src.stat == 2)
|
||||
return
|
||||
if(src.healths)
|
||||
|
||||
@@ -2376,7 +2376,7 @@ It can still be worn/put on as normal.
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
return
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss()
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
|
||||
|
||||
|
||||
/mob/living/carbon/human/abiotic(var/full_body = 0)
|
||||
|
||||
@@ -150,6 +150,24 @@
|
||||
|
||||
|
||||
handle_disabilities()
|
||||
if(hallucination > 0)
|
||||
|
||||
if(hallucinations.len == 0 && hallucination >= 20 && health > 0)
|
||||
if(prob(5))
|
||||
fake_attack(src)
|
||||
//for(var/atom/a in hallucinations)
|
||||
// a.hallucinate(src)
|
||||
if(!handling_hal && hallucination > 20)
|
||||
spawn handle_hallucinations() //The not boring kind!
|
||||
hallucination -= 2
|
||||
//if(health < 0)
|
||||
// for(var/obj/a in hallucinations)
|
||||
// del a
|
||||
else
|
||||
halloss = 0
|
||||
for(var/atom/a in hallucinations)
|
||||
del a
|
||||
|
||||
if (disabilities & 2)
|
||||
if ((prob(1) && paralysis < 1 && r_epil < 1))
|
||||
src << "\red You have a seizure!"
|
||||
@@ -724,7 +742,7 @@
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(3)
|
||||
if (prob(10) && health) spawn(0) emote("snore")
|
||||
if (prob(10) && health && !hal_crit) spawn(0) emote("snore")
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
@@ -953,7 +971,7 @@
|
||||
|
||||
|
||||
|
||||
if (src.sleep)
|
||||
if (src.sleep && !hal_crit)
|
||||
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
|
||||
src.sleep.overlays = null
|
||||
if(src.sleeping_willingly)
|
||||
@@ -979,6 +997,10 @@
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
if(hal_screwyhud == 1)
|
||||
healths.icon_state = "health6"
|
||||
if(hal_screwyhud == 2)
|
||||
healths.icon_state = "health7"
|
||||
|
||||
if (nutrition_icon)
|
||||
switch(nutrition)
|
||||
@@ -998,8 +1020,8 @@
|
||||
if(resting || lying || sleeping) rest.icon_state = "rest[(resting || lying || sleeping) ? 1 : 0]"
|
||||
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (toxin || hal_screwyhud == 4) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen || hal_screwyhud == 3) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(!src.nodamage)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss - src.halloss
|
||||
else
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
|
||||
@@ -50,15 +50,16 @@
|
||||
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
src << "To use something, simply double-click it."
|
||||
src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
|
||||
src << "Remember to <b>adjust your camera network</b> if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects."
|
||||
src << "Remember to <b>adjust your camera network</b> if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects.<br>"
|
||||
src << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
|
||||
src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
|
||||
src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
|
||||
src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
|
||||
src << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
|
||||
|
||||
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
src << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
|
||||
src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
|
||||
src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
|
||||
src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
|
||||
src << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
|
||||
job = "AI"
|
||||
|
||||
spawn(0)
|
||||
|
||||
@@ -233,6 +233,8 @@
|
||||
H.icon_state = "head_f_l"
|
||||
H.overlays += owner.face_lying
|
||||
H.transfer_identity(owner)
|
||||
H.pixel_x = -10
|
||||
H.pixel_y = 6
|
||||
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
|
||||
@@ -873,8 +873,8 @@
|
||||
/obj/machinery/power/apc/proc/malfoccupy(var/mob/living/silicon/ai/malf)
|
||||
if(!istype(malf))
|
||||
return
|
||||
if(src.z != 1)
|
||||
return
|
||||
if(src.z != 1)
|
||||
return
|
||||
|
||||
src.occupant = new /mob/living/silicon/ai(src,malf.laws,null,1)
|
||||
src.occupant.adjustOxyLoss(malf.getOxyLoss())
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
name = "conveyor belt"
|
||||
desc = "A conveyor belt."
|
||||
anchored = 1
|
||||
layer = 2.7
|
||||
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
|
||||
var/operable = 1 // true if can operate (no broken segments in this belt run)
|
||||
var/forwards // this is the default (forward) direction, set by the map dir, can be 0
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
TOILET
|
||||
|
||||
/obj/item/weapon/storage/toilet
|
||||
name = "toilet"
|
||||
w_class = 4.0
|
||||
anchored = 1.0
|
||||
density = 0.0
|
||||
var/status = 0.0
|
||||
var/clogged = 0.0
|
||||
anchored = 1.0
|
||||
icon = 'stationobjs.dmi'
|
||||
icon_state = "toilet"
|
||||
item_state = "syringe_kit"
|
||||
|
||||
/obj/item/weapon/storage/toilet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (src.contents.len >= 7)
|
||||
user << "The toilet is clogged!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/disk/nuclear))
|
||||
user << "This is far too important to flush!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/storage/))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
playsound(src.loc, 'slosh.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O << text("\blue [] gives [] a swirlie!", user, W)
|
||||
return
|
||||
var/t
|
||||
for(var/obj/item/weapon/O in src)
|
||||
t += O.w_class
|
||||
t += W.w_class
|
||||
if (t > 30)
|
||||
user << "You cannot fit the item inside."
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [] has put [] in []!", user, W, src), 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/toilet/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't help relieve anyone before the game starts."
|
||||
return
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat))
|
||||
return
|
||||
if (M == usr)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] sits on the toilet.", user)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] is seated on the toilet by []!", M, user)
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/toilet/attack_hand(mob/user as mob)
|
||||
for(var/mob/M in src.loc)
|
||||
if (M.buckled)
|
||||
if (M != user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] is zipped up by [].", M, user)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] zips up.", M)
|
||||
// world << "[M] is no longer buckled to [src]"
|
||||
M.anchored = 0
|
||||
M.buckled = null
|
||||
src.add_fingerprint(user)
|
||||
if((src.clogged < 1) || (src.contents.len < 7) || (user.loc != src.loc))
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O << text("\blue [] flushes the toilet.", user)
|
||||
src.clogged = 0
|
||||
src.contents.len = 0
|
||||
else if((src.clogged >= 1) || (src.contents.len >= 7) || (user.buckled != src.loc))
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O << text("\blue The toilet is clogged!")
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
TOILET
|
||||
|
||||
/obj/item/weapon/storage/toilet
|
||||
name = "toilet"
|
||||
w_class = 4.0
|
||||
anchored = 1.0
|
||||
density = 0.0
|
||||
var/status = 0.0
|
||||
var/clogged = 0.0
|
||||
anchored = 1.0
|
||||
icon = 'stationobjs.dmi'
|
||||
icon_state = "toilet"
|
||||
item_state = "syringe_kit"
|
||||
|
||||
/obj/item/weapon/storage/toilet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (src.contents.len >= 7)
|
||||
user << "The toilet is clogged!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/disk/nuclear))
|
||||
user << "This is far too important to flush!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/storage/))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
playsound(src.loc, 'slosh.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O << text("\blue [] gives [] a swirlie!", user, W)
|
||||
return
|
||||
var/t
|
||||
for(var/obj/item/weapon/O in src)
|
||||
t += O.w_class
|
||||
t += W.w_class
|
||||
if (t > 30)
|
||||
user << "You cannot fit the item inside."
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [] has put [] in []!", user, W, src), 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/toilet/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't help relieve anyone before the game starts."
|
||||
return
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat))
|
||||
return
|
||||
if (M == usr)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] sits on the toilet.", user)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] is seated on the toilet by []!", M, user)
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/toilet/attack_hand(mob/user as mob)
|
||||
for(var/mob/M in src.loc)
|
||||
if (M.buckled)
|
||||
if (M != user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] is zipped up by [].", M, user)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\blue [] zips up.", M)
|
||||
// world << "[M] is no longer buckled to [src]"
|
||||
M.anchored = 0
|
||||
M.buckled = null
|
||||
src.add_fingerprint(user)
|
||||
if((src.clogged < 1) || (src.contents.len < 7) || (user.loc != src.loc))
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O << text("\blue [] flushes the toilet.", user)
|
||||
src.clogged = 0
|
||||
src.contents.len = 0
|
||||
else if((src.clogged >= 1) || (src.contents.len >= 7) || (user.buckled != src.loc))
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O << text("\blue The toilet is clogged!")
|
||||
return
|
||||
|
||||
|
||||
*/
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 1.6 KiB |
File diff suppressed because it is too large
Load Diff
BIN
sound/scary/behind_you1.ogg
Normal file
BIN
sound/scary/behind_you1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/behind_you2.ogg
Normal file
BIN
sound/scary/behind_you2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/far_noise.ogg
Normal file
BIN
sound/scary/far_noise.ogg
Normal file
Binary file not shown.
BIN
sound/scary/growl1.ogg
Normal file
BIN
sound/scary/growl1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/growl2.ogg
Normal file
BIN
sound/scary/growl2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/growl3.ogg
Normal file
BIN
sound/scary/growl3.ogg
Normal file
Binary file not shown.
BIN
sound/scary/i_see_you1.ogg
Normal file
BIN
sound/scary/i_see_you1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/i_see_you2.ogg
Normal file
BIN
sound/scary/i_see_you2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/im_here1.ogg
Normal file
BIN
sound/scary/im_here1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/im_here2.ogg
Normal file
BIN
sound/scary/im_here2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/look_up1.ogg
Normal file
BIN
sound/scary/look_up1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/look_up2.ogg
Normal file
BIN
sound/scary/look_up2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/over_here1.ogg
Normal file
BIN
sound/scary/over_here1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/over_here2.ogg
Normal file
BIN
sound/scary/over_here2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/over_here3.ogg
Normal file
BIN
sound/scary/over_here3.ogg
Normal file
Binary file not shown.
BIN
sound/scary/turn_around1.ogg
Normal file
BIN
sound/scary/turn_around1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/turn_around2.ogg
Normal file
BIN
sound/scary/turn_around2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/veryfar_noise.ogg
Normal file
BIN
sound/scary/veryfar_noise.ogg
Normal file
Binary file not shown.
BIN
sound/scary/wail.ogg
Normal file
BIN
sound/scary/wail.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user