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

This commit is contained in:
Aryn
2012-06-02 01:43:32 -06:00
181 changed files with 8893 additions and 6998 deletions
+125 -120
View File
@@ -3,10 +3,11 @@
atom/var/list/suit_fibers
atom/proc/add_fibers(mob/living/carbon/human/M)
if(M.gloves)
if(M.gloves.transfer_blood) //bloodied gloves transfer blood to touched objects
if(add_blood(M.gloves.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
M.gloves.transfer_blood--
if(M.gloves && istype(M.gloves,/obj/item/clothing/))
var/obj/item/clothing/gloves/G = M.gloves
if(G.transfer_blood) //bloodied gloves transfer blood to touched objects
if(add_blood(G.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
G.transfer_blood--
else if(M.bloody_hands)
if(add_blood(M.bloody_hands_mob))
M.bloody_hands--
@@ -133,10 +134,8 @@ obj/machinery/computer/forensic_scanning
authenticated = 1
updateDialog()
return
var/obj/item/weapon/card/id/I = M.equipped()
if (I && istype(I))
if(src.check_access(I))
authenticated = 1
if (allowed(M))
authenticated = 1
//usr << "\green Access Granted"
//if(!authenticated)
//usr << "\red Access Denied"
@@ -166,7 +165,7 @@ obj/machinery/computer/forensic_scanning
I.loc = src
else
usr << "Invalid Object Rejected."
if("card")
if("card") //Processing a fingerprint card.
var/mob/M = usr
var/obj/item/I = M.equipped()
if(!(I && istype(I,/obj/item/weapon/f_card)))
@@ -186,7 +185,7 @@ obj/machinery/computer/forensic_scanning
process_card()
else
usr << "\red Invalid Object Rejected."
if("database")
if("database") //Viewing all records in each database
canclear = 1
if(href_list["delete_record"])
delete_dossier(href_list["delete_record"])
@@ -211,7 +210,7 @@ obj/machinery/computer/forensic_scanning
for(var/atom in misc)
var/list/data_entry = misc[atom]
temp += "<a href='?src=\ref[src];operation=auxiliary;identifier=[atom]'>{[data_entry[3]]}</a><br>"
if("record")
if("record") //Viewing a record from the "files" database.
canclear = 0
if(files)
temp = "<b>Criminal Evidence Database</b><br><br>"
@@ -245,7 +244,7 @@ obj/machinery/computer/forensic_scanning
else
temp = "ERROR. Database not found!<br>"
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
if("databaseprint")
if("databaseprint") //Printing from the "files" database.
if(files)
var/obj/item/weapon/paper/P = new(loc)
P.name = "Database File (Dossier [files.Find(href_list["identifier"])])"
@@ -274,12 +273,11 @@ obj/machinery/computer/forensic_scanning
var/list/blood = outputs[3]
if(blood && blood.len)
P.info += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
for(var/named in blood)
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [blood[named]], DNA: [named]<br>"
else
usr << "ERROR. Database not found!<br>"
if("auxiliary")
if("auxiliary") //Viewing a record from the "misc" database.
canclear = 0
if(misc)
temp = "<b>Auxiliary Evidence Database</b><br><br>"
@@ -289,19 +287,18 @@ obj/machinery/computer/forensic_scanning
if(fibers && fibers.len)
temp += "&nbsp<b>Fibers:</b><br>"
for(var/j = 1, j <= fibers.len, j++)
temp += "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]"
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]<br>"
var/list/blood = outputs[2]
if(blood && blood.len)
temp += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
for(var/named in blood)
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [blood[named]], DNA: [named]<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_aux=[href_list["identifier"]]'>{Delete This Record}</a>"
temp += "<br><a href='?src=\ref[src];operation=auxiliaryprint;identifier=[href_list["identifier"]]'>{Print}</a>"
else
temp = "ERROR. Database not found!<br>"
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
if("auxiliaryprint")
if("auxiliaryprint") //Printing from the "misc" database.
if(misc)
var/obj/item/weapon/paper/P = new(loc)
var/list/outputs = misc[href_list["identifier"]]
@@ -313,13 +310,12 @@ obj/machinery/computer/forensic_scanning
if(fibers && fibers.len)
P.info += "&nbsp<b>Fibers:</b><br>"
for(var/j = 1, j <= fibers.len, j++)
P.info += "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]"
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fibers[j]]<br>"
var/list/blood = outputs[2]
if(blood && blood.len)
P.info += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
for(var/named in blood)
P.info += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [blood[named]], DNA: [named]<br>"
else
usr << "ERROR. Database not found!<br>"
if("scan")
@@ -393,7 +389,7 @@ obj/machinery/computer/forensic_scanning
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))
if(istype(scanning,/obj/item/device/detective_scanner) || (istype(scanning, /obj/item/device/pda) && scanning:cartridge && scanning:cartridge.access_security))
scan_data += "<br><b>Data transfered from Scanner to Database.</b><br>"
add_data_scanner(scanning)
else if(!scanning.fingerprints)
@@ -402,7 +398,7 @@ obj/machinery/computer/forensic_scanning
temp = "Scan Failed: No Object"
if("print")
if("print") //Printing scan data
if(scan_data)
temp = "Scan Data Printed."
var/obj/item/weapon/paper/P = new(loc)
@@ -415,7 +411,7 @@ obj/machinery/computer/forensic_scanning
scan_data = ""
if("cancel")
scan_process = 0
if("add")
if("add") //Adding an object (Manually) to the database.
if(scanning)
add_data(scanning)
else
@@ -426,12 +422,19 @@ obj/machinery/computer/forensic_scanning
return
proc/add_data_scanner(var/obj/item/device/detective_scanner/W)
if(W.stored)
for(var/atom in W.stored)
var/list/data = W.stored[atom]
add_data_master(atom,data[1],data[2],data[3],data[4])
W.stored = list()
proc/add_data_scanner(var/obj/item/device/W)
if(istype(W, /obj/item/device/detective_scanner))
if(W:stored)
for(var/atom in W:stored)
var/list/data = W:stored[atom]
add_data_master(atom,data[1],data[2],data[3],data[4])
W:stored = list()
else if(istype(W, /obj/item/device/pda) && W:cartridge && W:cartridge.access_security)
if(W:cartridge.stored)
for(var/atom in W:cartridge.stored)
var/list/data = W:cartridge.stored[atom]
add_data_master(atom,data[1],data[2],data[3],data[4])
W:cartridge.stored = list()
return
proc/add_data(var/atom/scanned_atom)
@@ -447,89 +450,88 @@ obj/machinery/computer/forensic_scanning
//What follows is massive. It cross references all stored data in the scanner with the other stored data,
//and what is already in the computer. Not sure how bad the lag may/may not be.
if(!atom_fingerprints) //No prints
if(!misc)
misc = list()
var/list/data_entry = misc[atom_reference]
if(data_entry)
var/list/fibers = data_entry[1]
if(!fibers)
fibers = list()
if(atom_suit_fibers)
for(var/j = 1, j <= atom_suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add!
fibers += atom_suit_fibers[j]
var/list/blood = data_entry[2]
if(!blood)
blood = list()
if(atom_blood_DNA)
for(var/main_blood in atom_blood_DNA)
if(!blood[main_blood])
blood[main_blood] = atom_blood_DNA[blood]
return 1
if(!misc)
misc = list()
var/list/data_entry = misc[atom_reference]
if(data_entry)
var/list/fibers = data_entry[1]
if(!fibers)
fibers = list()
if(atom_suit_fibers)
for(var/j = 1, j <= atom_suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add!
fibers += atom_suit_fibers[j]
var/list/blood = data_entry[2]
if(!blood)
blood = list()
if(atom_blood_DNA)
for(var/main_blood in atom_blood_DNA)
if(!blood[main_blood])
blood[main_blood] = atom_blood_DNA[blood]
else
var/list/templist[3]
templist[1] = atom_suit_fibers
templist[2] = atom_blood_DNA
templist[3] = atom_name
misc[atom_reference] = templist //Store it!
return 0
//Has prints.
if(!files)
files = list()
for(var/main_print in atom_fingerprints)
var/list/data_entry = files[main_print]
if(data_entry)//The print is already in here!
var/list/internal_atom = data_entry[atom_reference] //Lets see if we can find the current object
if(internal_atom)
//We must be on a roll! Just update what needs to be updated.
var/list/internal_prints = internal_atom[1]
for(var/print in atom_fingerprints) //Sorry for the double loop! D:
var/associated_print = internal_prints[print]
var/reference_print = atom_fingerprints[print]
if(associated_print && associated_print != reference_print) //It does not match
internal_prints[print] = stringmerge(associated_print, reference_print)
else if(!associated_print)
internal_prints[print] = reference_print
//If the main print was updated, lets update the master as well.
if(print == main_print && (!associated_print || (associated_print && associated_print != reference_print)))
update_fingerprints(main_print, internal_prints[print])
//Fibers.
var/list/fibers = internal_atom[2]
if(!fibers)
fibers = list()
if(atom_suit_fibers)
for(var/j = 1, j < atom_suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add!
fibers += atom_suit_fibers[j]
//Blood.
var/list/blood = internal_atom[3]
if(!blood)
blood = list()
if(atom_blood_DNA)
for(var/main_blood in atom_blood_DNA)
if(!blood[main_blood])
blood[main_blood] = atom_blood_DNA[blood]
if(atom_fingerprints)
if(!files)
files = list()
for(var/main_print in atom_fingerprints)
data_entry = files[main_print]
if(data_entry)//The print is already in here!
var/list/internal_atom = data_entry[atom_reference] //Lets see if we can find the current object
if(internal_atom)
//We must be on a roll! Just update what needs to be updated.
var/list/internal_prints = internal_atom[1]
for(var/print in atom_fingerprints) //Sorry for the double loop! D:
var/associated_print = internal_prints[print]
var/reference_print = atom_fingerprints[print]
if(associated_print && associated_print != reference_print) //It does not match
internal_prints[print] = stringmerge(associated_print, reference_print)
else if(!associated_print)
internal_prints[print] = reference_print
//If the main print was updated, lets update the master as well.
if(print == main_print && (!associated_print || (associated_print && associated_print != reference_print)))
update_fingerprints(main_print, internal_prints[print])
//Fibers.
var/list/fibers = internal_atom[2]
if(!fibers)
fibers = list()
if(atom_suit_fibers)
for(var/j = 1, j < atom_suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add!
fibers += atom_suit_fibers[j]
//Blood.
var/list/blood = internal_atom[3]
if(!blood)
blood = list()
if(atom_blood_DNA)
for(var/main_blood in atom_blood_DNA)
if(!blood[main_blood])
blood[main_blood] = atom_blood_DNA[blood]
continue
//It's not in there! We gotta add it.
update_fingerprints(main_print, atom_fingerprints[main_print])
var/list/data_point[4]
data_point[1] = atom_fingerprints
data_point[2] = atom_suit_fibers
data_point[3] = atom_blood_DNA
data_point[4] = atom_name
data_entry[atom_reference] = data_point
continue
//It's not in there! We gotta add it.
update_fingerprints(main_print, atom_fingerprints[main_print])
//No print at all! New data entry, go!
var/list/data_point[4]
data_point[1] = atom_fingerprints
data_point[2] = atom_suit_fibers
data_point[3] = atom_blood_DNA
data_point[4] = atom_name
data_entry[atom_reference] = data_point
continue
//No print at all! New data entry, go!
var/list/data_point[4]
data_point[1] = atom_fingerprints
data_point[2] = atom_suit_fibers
data_point[3] = atom_blood_DNA
data_point[4] = atom_name
var/list/new_file[1]
new_file[1] = atom_fingerprints[main_print]
new_file[atom_reference] = data_point
files[main_print] = new_file
var/list/new_file[1]
new_file[1] = atom_fingerprints[main_print]
new_file[atom_reference] = data_point
files[main_print] = new_file
return 1
/********************************
***END DO NOT DIRECTLY CALL ME***
@@ -540,7 +542,7 @@ obj/machinery/computer/forensic_scanning
if(master)
master[1] = stringmerge(master[1],new_print)
else
CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal")
CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal (and give him this call stack)")
return
proc/process_card() //Same as above, but for fingerprint cards
@@ -613,10 +615,11 @@ turf/Exited(mob/living/carbon/human/M)
M.track_blood--
src.add_bloody_footprints(M.track_blood_mob,1,M.dir,get_tracks(M),M.track_blood_type)
else if(istype(M,/mob/living/carbon/human))
if(M.shoes)
if(M.shoes.track_blood > 0)
M.shoes.track_blood--
src.add_bloody_footprints(M.shoes.track_blood_mob,1,M.dir,M.shoes.name,M.shoes.track_blood_type) // And bloody tracks end here
if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes))
var/obj/item/clothing/shoes/S = M.shoes
if(S.track_blood > 0)
S.track_blood--
src.add_bloody_footprints(S.track_blood_mob,1,M.dir,S.name,S.track_blood_type) // And bloody tracks end here
. = ..()
turf/Entered(mob/living/carbon/human/M)
if(istype(M,/mob/living) && !istype(M,/mob/living/carbon/metroid))
@@ -631,10 +634,11 @@ turf/Entered(mob/living/carbon/human/M)
M.track_blood--
src.add_bloody_footprints(M.track_blood_mob,0,M.dir,get_tracks(M),M.track_blood_type)
else if(istype(M,/mob/living/carbon/human))
if(M.shoes && !istype(src,/turf/space))
if(M.shoes.track_blood > 0)
M.shoes.track_blood--
src.add_bloody_footprints(M.shoes.track_blood_mob,0,M.dir,M.shoes.name,M.shoes.track_blood_type)
if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes) && !istype(src,/turf/space))
var/obj/item/clothing/shoes/S = M.shoes
if(S.track_blood > 0)
S.track_blood--
src.add_bloody_footprints(S.track_blood_mob,0,M.dir,S.name,S.track_blood_type)
for(var/obj/effect/decal/cleanable/B in src)
@@ -649,11 +653,12 @@ turf/Entered(mob/living/carbon/human/M)
track_type = "oil"
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)
M.shoes.track_blood_type = track_type
if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes))
var/obj/item/clothing/shoes/S = M.shoes
S.add_blood(B.blood_owner)
S.track_blood_mob = B.blood_owner
S.track_blood = max(S.track_blood,8)
S.track_blood_type = track_type
else
M.add_blood(B.blood_owner)
M.track_blood_mob = B.blood_owner
@@ -768,7 +773,7 @@ proc/blood_incompatible(donor,receiver)
..()
afterattack(atom/A as obj|turf|area, mob/user as mob)
if(istype(A))
if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!")
if(do_after(user,30))
user.visible_message("[user] finishes wiping off the [A]!")
@@ -776,7 +781,7 @@ proc/blood_incompatible(donor,receiver)
return
examine()
if (!( usr ))
if (!usr)
return
usr << "That's \a [src]."
usr << desc
+29 -20
View File
@@ -1,8 +1,6 @@
//CONTAINS:
//Evidence bags and stuff
///////////
//Shamelessly ripped from Mini's old code.
/obj/item/weapon/evidencebag
name = "evidence bag"
desc = "An empty evidence bag."
@@ -10,34 +8,43 @@
icon_state = "evidenceobj"
w_class = 1
/* buggy and stuff
/obj/item/weapon/evidencebag/attackby(obj/item/weapon/O, mob/user as mob)
return src.afterattack(O, user)
*/
/obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob)
if(!in_range(O,user))
return
if(istype(O, /obj/item/weapon/storage) && O in user)
return ..()
if(!(O && istype(O)) || O.anchored == 1)
user << "You can't put that inside the [src]!"
user << "You can't put that inside \the [src]!"
return ..()
if(O in user)
if(istype(O, /obj/item/weapon/evidencebag))
user << "You find putting an evidence bag in another evidence bag to be slightly absurd."
return
if(O in user && (user.l_hand != O && user.r_hand != O)) //If it is in their inventory, but not in their hands, don't grab it off of them.
user << "You are wearing that."
return
if(src.contents.len > 0)
if(contents.len)
user << "The [src] already has something inside it."
return ..()
if(istype(O.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/U = O.loc
user.client.screen -= O
U.contents.Remove(O)
if(istype(O.loc,/obj/item/clothing/suit/storage/))
var/obj/item/clothing/suit/storage/U = O.loc
user.client.screen -= O
U.contents.Remove(O)
user << "You put the [O] inside the [src]."
user.visible_message("\The [user] puts \a [O] into \a [src]", "You put \the [O] inside \the [src].",\
"You hear a rustle as someone puts something into a plastic bag.")
icon_state = "evidence"
src.overlays += O
overlays += O
desc = "An evidence bag containing \a [O]. [O.desc]"
O.loc = src
w_class = O.w_class
@@ -45,17 +52,19 @@
/obj/item/weapon/evidencebag/attack_self(mob/user as mob)
if (src.contents.len > 0)
var/obj/item/I = src.contents[1]
user << "You take the [I] out of the [src]."
src.overlays -= I
I.loc = get_turf(user.loc)
if (contents.len)
var/obj/item/I = contents[1]
user.visible_message("\The [user] takes \a [I] out of \a [src]", "You take \the [I] out of \the [src].",\
"You hear someone rustle around in a plastic bag, and remove something.")
overlays -= I
user.put_in_hands(I)
w_class = 1
src.icon_state = "evidenceobj"
icon_state = "evidenceobj"
desc = "An empty evidence bag."
else
user << "[src] is empty."
src.icon_state = "evidenceobj"
user << "\The [src] is empty."
icon_state = "evidenceobj"
return
/obj/item/weapon/storage/box/evidence
+18
View File
@@ -515,6 +515,17 @@ var/global/BSACooldown = 0
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Emergency Response Team;jobban4=\ref[M]'>[dd_replacetext("Emergency Response Team", " ", "&nbsp")]</a></td>"
//Misc (Grey)
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='B5B5B5'><th colspan='10'>Misc Positions</th></tr><tr align='center'>"
//Records
if(jobban_isbanned(M, "Records"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Records;jobban4=\ref[M]'><font color=red>[dd_replacetext("Records", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Records;jobban4=\ref[M]'>[dd_replacetext("Records", " ", "&nbsp")]</a></td>"
/* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment
if(jobban_isbanned(M, "malf AI") || isbanned_dept)
@@ -601,6 +612,13 @@ var/global/BSACooldown = 0
var/datum/job/temp = job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("miscdept")
joblist += "pAI"
for(var/jobPos in nonhuman_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
else
joblist += href_list["jobban3"]
+43
View File
@@ -0,0 +1,43 @@
//By Carnwennan
//This system was made as an alternative to all the in-game lists and variables used to log stuff in-game.
//lists and variables are great. However, they have several major flaws:
//Firstly, they use memory. TGstation has one of the highest memory usage of all the ss13 branches.
//Secondly, they are usually stored in an object. This means that they aren't centralised. It also means that
//the data is lost when the object is deleted! This is especially annoying for things like the singulo engine!
#define INVESTIGATE_DIR "data/investigate/"
//SYSTEM
/proc/investigate_subject2file(var/subject)
switch(subject)
if("singulo")
return file("[INVESTIGATE_DIR]singulo.html")
if("silicon")
return file("[INVESTIGATE_DIR]silicon.html")
else
return
/proc/investigate_reset()
if(fdel(INVESTIGATE_DIR)) return 1
return 0
/atom/proc/investigate_log(var/message, var/subject)
if(!message) return
var/F = investigate_subject2file(subject)
if(!F) return
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("singulo","silicon") )
set name = "Investigate"
set category = "Admin"
if(!holder) return
var/F = investigate_subject2file(subject)
if(!F)
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
return
src << browse(F,"window=investigate;size=800x300")
+3 -1
View File
@@ -105,6 +105,7 @@
//Admin Observer
if (holder.level >= -1)
verbs += /client/proc/investigate_show
verbs += /client/proc/cmd_admin_say
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadmin_self
@@ -423,10 +424,11 @@
verbs -= /client/proc/deadmin_self
verbs -= /client/proc/jumptocoord
verbs -= /client/proc/everyone_random
verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs -= /client/proc/getserverlog
verbs -= /client/proc/cinematic //show a cinematic sequence
verbs -= /client/proc/admin_memo
verbs -= /client/proc/investigate_show
verbs -= /client/proc/cmd_admin_change_custom_event
verbs -= /client/proc/admin_invis
verbs -= /client/proc/callprocgen
+20 -5
View File
@@ -62,17 +62,32 @@
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
proc/activate() //What the device does when turned on
return
proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
return
proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
return
proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
return
proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
return
proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var
return
proc/holder_movement() //Called when the holder is moved
return
proc/interact(mob/user as mob) //Called when attack_self is called
return
proc/process_cooldown()
process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
@@ -88,7 +103,7 @@
return 1
proc/pulse(var/radio = 0)
pulse(var/radio = 0)
if(holder && (wires & WIRE_PULSE))
holder.process_activation(src, 1, 0)
if(holder && (wires & WIRE_PULSE_SPECIAL))
@@ -219,4 +234,4 @@ Desc: If true is an object that can be attached to an assembly holder but is a s
//Remember to have it set its loc somewhere in here
*/
*/
+9 -6
View File
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
/obj/item/device/assembly_holder
name = "Assembly"
desc = "Holds various devices"//Fix this by adding dynamic desc
@@ -18,10 +16,15 @@
var/obj/item/device/assembly/a_right = null
var/obj/special_assembly = null
proc
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
attach_special(var/obj/O, var/mob/user)
process_activation(var/obj/item/device/D)
proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
return
proc/attach_special(var/obj/O, var/mob/user)
return
proc/process_activation(var/obj/item/device/D)
return
IsAssemblyHolder()
+15 -10
View File
@@ -11,9 +11,6 @@
item_state = "flashbang"
w_class = 2.0
force = 2.0
throw_speed = 4
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY
var/obj/item/weapon/reagent_containers/glass/beaker_one
var/obj/item/weapon/reagent_containers/glass/beaker_two
var/obj/item/device/assembly/attached_device
@@ -27,6 +24,10 @@
var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle")
var/affected_area = 3
var/mob/attacher = "Unknown"
throw_speed = 4
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BELT
attackby(var/obj/item/weapon/W, var/mob/user)
if(path || !active)
@@ -784,7 +785,7 @@
/obj/structure/table,
/obj/structure/closet/secure_closet,
/obj/structure/closet,
/obj/machinery/sink,
/obj/structure/sink,
/obj/item/weapon/storage,
/obj/machinery/atmospherics/unary/cryo_cell,
/obj/item/weapon/chem_grenade,
@@ -1304,7 +1305,8 @@
amount_per_transfer_from_this = 5
volume = 30
possible_transfer_amounts = null
flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob)
return src.attack_hand(user)
@@ -1349,9 +1351,9 @@
possible_transfer_amounts = null
flags = FPRINT
var/mode = 1
var/charge_cost = 100
var/charge_cost = 50
var/charge_tick = 0
var/recharge_time = 10 //Time it takes for shots to recharge (in seconds)
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
New()
..()
@@ -1372,13 +1374,13 @@
if(R && R.cell)
if(mode == 1 && reagents.total_volume < 30) //Don't recharge reagents and drain power if the storage is full.
R.cell.use(charge_cost) //Take power from borg...
reagents.add_reagent("tricordrazine",10) //And fill hypo with reagent.
reagents.add_reagent("tricordrazine",5) //And fill hypo with reagent.
if(mode == 2 && reagents.total_volume < 30)
R.cell.use(charge_cost)
reagents.add_reagent("inaprovaline", 10)
reagents.add_reagent("inaprovaline", 5)
if(mode == 3 && reagents.total_volume < 30)
R.cell.use(charge_cost)
reagents.add_reagent("spaceacillin", 10)
reagents.add_reagent("spaceacillin", 5)
//update_icon()
return 1
@@ -1402,16 +1404,19 @@
playsound(src.loc, 'pop.ogg', 50, 0) //Change the mode
if(mode == 1)
mode = 2
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.
reagents.clear_reagents() //Flushes whatever was in the storage previously, so you don't get chems all mixed up.
user << "\blue Synthesizer is now producing 'Inaprovaline'."
return
if(mode == 2)
mode = 3
charge_tick = 0
reagents.clear_reagents()
user << "\blue Synthesizer is now producing 'Spaceacillin'."
return
if(mode == 3)
mode = 1
charge_tick = 0
reagents.clear_reagents()
user << "\blue Synthesizer is now producing 'Tricordrazine'."
return
+1
View File
@@ -4,6 +4,7 @@
name = "ears"
w_class = 1.0
throwforce = 2
slot_flags = SLOT_EARS
var/twoeared = 0
/obj/item/clothing/ears/attack_hand(mob/user as mob)
+2 -1
View File
@@ -296,7 +296,8 @@
icon = 'weapons.dmi'
icon_state = "baton"
item_state = "classic_baton"
flags = FPRINT | ONBELT | TABLEPASS
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 10
/obj/item/clothing/under/pirate
+1
View File
@@ -5,6 +5,7 @@
icon = 'glasses.dmi'
w_class = 2.0
flags = GLASSESCOVERSEYES
slot_flags = SLOT_EYES
var/vision_flags = 0
var/darkness_view = 0//Base human is 2
var/invisa_view = 0
+1
View File
@@ -12,6 +12,7 @@
var/wired = 0
var/obj/item/weapon/cell/cell = 0
body_parts_covered = HANDS
slot_flags = SLOT_GLOVES
/obj/item/clothing/gloves/boxing
+20 -20
View File
@@ -3,7 +3,7 @@
name = "head"
icon = 'hats.dmi'
body_parts_covered = HEAD
var/list/allowed = list()
slot_flags = SLOT_HEAD
/obj/item/clothing/head/cakehat
name = "cake-hat"
@@ -83,8 +83,24 @@
icon_state = "beret"
flags = FPRINT | TABLEPASS
/obj/item/clothing/head/chaplain_hood
name = "chaplain's hood"
desc = "It's hood that covers the head. It keeps you warm during the space winters."
icon_state = "chaplain_hood"
flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR
/obj/item/clothing/head/hasturhood
name = "hastur's hood"
desc = "It's unspeakably stylish"
icon_state = "hasturhood"
flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR
/obj/item/clothing/head/nursehat
name = "nurse's hat"
desc = "It allows quick identification of trained medical personnel."
icon_state = "nursehat"
flags = FPRINT|TABLEPASS
// CHUMP HELMETS: COOKING THEM DESTROYS THE CHUMP HELMET SPAWN.
/obj/item/clothing/head/helmet/cueball
name = "cueball helmet"
@@ -109,6 +125,8 @@
item_state = "helmet"
var/flipped = 0
// CHUMP HELMETS: COOKING THEM DESTROYS THE CHUMP HELMET SPAWN.
/obj/item/clothing/head/syndicatefake
name = "red space-helmet replica"
desc = "A plastic replica of a red space space helmet. This is a toy, it is not made for use in space!"
@@ -118,24 +136,6 @@
flags = FPRINT | TABLEPASS | BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
/obj/item/clothing/head/chaplain_hood
name = "chaplain's hood"
desc = "It's hood that covers the head. It keeps you warm during the space winters."
icon_state = "chaplain_hood"
flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR
/obj/item/clothing/head/hasturhood
name = "hastur's hood"
desc = "It's unspeakably stylish"
icon_state = "hasturhood"
flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR
/obj/item/clothing/head/nursehat
name = "nurse's hat"
desc = "It allows quick identification of trained medical personnel."
icon_state = "nursehat"
flags = FPRINT|TABLEPASS
/obj/item/clothing/head/helmet/cardborg
name = "cardborg helmet"
desc = "A helmet made out of a box."
+1
View File
@@ -8,6 +8,7 @@
heat_transfer_coefficient = 0.30
permeability_coefficient = 0.90
flags = FPRINT | TABLEPASS
slot_flags = SLOT_ICLOTHING
var/has_sensor = 1//For the crew computer 2 = unable to change mode
var/sensor_mode = 0
/*
+1
View File
@@ -73,6 +73,7 @@
desc = "A face-covering mask that can be connected to an air supply."
icon_state = "gas_alt"
flags = FPRINT|TABLEPASS|SUITSPACE|MASKCOVERSMOUTH|MASKCOVERSEYES
flags_inv = HIDEEARS|HIDEEYES
w_class = 3.0
see_face = 0.0
item_state = "gas_alt"
+1
View File
@@ -5,6 +5,7 @@
gender = PLURAL //Carn: for grammarically correct text-parsing
body_parts_covered = FEET
slot_flags = SLOT_FEET
protective_temperature = 500
heat_transfer_coefficient = 0.10
@@ -0,0 +1,37 @@
/obj/item/clothing/head/helmet/space/engineer
name = "environment suit helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off."
flags = FPRINT | TABLEPASS | HEADSPACE | HEADCOVERSEYES
see_face = 0.0
flags_inv = HIDEEARS
icon_state = "engspace_helmet"
item_state = "engspace_helmet"
protective_temperature = 5000
armor = list(melee = 20, bullet = 5, laser = 10,energy = 5, bomb = 15, bio = 100, rad = 75)
var/up = 0
/obj/item/clothing/head/helmet/space/engineer/ce
name = "chief engineer's environment suit helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off."
icon_state = "cespace_helmet"
item_state = "cespace_helmet"
/obj/item/clothing/suit/space/engineer
name = "environment suit"
desc = "An environment suit that protects against hazardous, low pressure environments. Has radiation shielding."
icon_state = "engspace_suit"
item_state = "engspace_suit"
protective_temperature = 5000 //For not dieing near a fire, but still not being great in a full inferno
slowdown = 2
armor = list(melee = 20, bullet = 5, laser = 10,energy = 5, bomb = 15, bio = 100, rad = 75)
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
/obj/item/device/radio, /obj/item/device/analyzer)
//yes, you can fit everything and your dog in it.
//i figure this might mitigate some of the inevitable bitching about it being a downgrade from the rig.
/obj/item/clothing/suit/space/engineer/ce
name = "chief engineer's environment suit"
desc = "An environment suit that protects against hazardous, low pressure environments. Has radiation shielding and Chief Engineer colours."
icon_state = "cespace_suit"
item_state = "cespace_suit"
+69
View File
@@ -0,0 +1,69 @@
/obj/item/clothing/head/helmet/space/ert
name = "emergency response team helmet"
desc = "A helmet worn by members of the NanoTrasen Emergency Response Team. Armoured and space ready."
icon_state = "ert_commander"
item_state = "helm-command"
armor = list(melee = 50, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60)
/obj/item/clothing/suit/space/ert
name = "emergency response team suit"
desc = "A suit worn by members of the NanoTrasen Emergency Response Team. Armoured, space ready, and fire resistant."
icon_state = "ert_commander"
item_state = "suit-command"
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60)
protective_temperature = 10000
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
/obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \
/obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun)
//Commander
/obj/item/clothing/head/helmet/space/ert/commander
name = "emergency response team commander helmet"
desc = "A helmet worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
icon_state = "ert_commander"
item_state = "helm-command"
/obj/item/clothing/suit/space/ert/commander
name = "emergency response team commander suit"
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant."
icon_state = "ert_commander"
item_state = "suit-command"
//Security
/obj/item/clothing/head/helmet/space/ert/security
name = "emergency response team security helmet"
desc = "A helmet worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready."
icon_state = "ert_security"
item_state = "syndicate-helm-black-red"
/obj/item/clothing/suit/space/ert/security
name = "emergency response team security suit"
desc = "A suit worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured, space ready, and fire resistant."
icon_state = "ert_security"
item_state = "syndicate-black-red"
//Engineer
/obj/item/clothing/head/helmet/space/ert/engineer
name = "emergency response team engineer helmet"
desc = "A helmet worn by engineering members of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
icon_state = "ert_engineer"
/obj/item/clothing/suit/space/ert/engineer
name = "emergency response team engineer suit"
desc = "A suit worn by the engineering of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant."
icon_state = "ert_engineer"
//Medical
/obj/item/clothing/head/helmet/space/ert/medical
name = "emergency response team medical helmet"
desc = "A helmet worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
icon_state = "ert_medical"
/obj/item/clothing/suit/space/ert/medical
name = "emergency response team medical suit"
desc = "A suit worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
icon_state = "ert_medical"
-29
View File
@@ -15,29 +15,12 @@
item_state = "rig0-mining"
color = "mining"
/obj/item/clothing/head/helmet/space/rig/elite
name = "advanced RIG helmet"
icon_state = "rig0-white"
item_state = "rig0-white"
color = "white"
/obj/item/clothing/head/helmet/space/rig/engspace_helmet
name = "engineering space helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off."
icon_state = "engspace_helmet"
item_state = "engspace_helmet"
see_face = 0.0
var/up = 0
/obj/item/clothing/head/helmet/space/rig/cespace_helmet
name = "chief engineer's space helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off."
icon_state = "cespace_helmet"
item_state = "cespace_helmet"
see_face = 0.0
var/up = 0
/obj/item/clothing/head/helmet/space/rig/security
name = "security RIG helmet"
icon_state = "rig0-security"
@@ -63,18 +46,6 @@
name = "advanced RIG suit"
protective_temperature = 10000
/obj/item/clothing/suit/space/rig/engspace_suit
name = "engineering space suit"
icon_state = "engspace_suit"
item_state = "engspace_suit"
/obj/item/clothing/suit/space/rig/cespace_suit
name = "chief engineer's space suit"
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation and fire shielding, and Chief Engineer colours."
icon_state = "cespace_suit"
item_state = "cespace_suit"
protective_temperature = 10000
/obj/item/clothing/suit/space/rig/security
name = "security RIG suit"
desc = "A suit specially designed for security to offer minor protection from environmental hazards, and greater protection from human hazards"
+2 -1
View File
@@ -3,5 +3,6 @@
name = "suit"
var/fire_resist = T0C+100
flags = FPRINT | TABLEPASS
var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/weapon/tank/emergency_oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
slot_flags = SLOT_OCLOTHING
+1 -1
View File
@@ -96,7 +96,7 @@
icon_state = "johann_erzatz_1"
volume = 50
/obj/item/weapon/lighter/zippo/fluff/li_tsun_1 //mangled: Li Tsun
/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 //mangled: Li Matsuda
name = "blue zippo lighter"
desc = "A zippo lighter made of some blue metal."
icon = 'custom_items.dmi'
+6 -6
View File
@@ -37,14 +37,14 @@ mob/living/carbon/proc/handle_hallucinations()
//src << "Traitor Items"
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"
var/list/slots_free = list(ui_lhand,ui_rhand)
if(l_hand) slots_free -= ui_lhand
if(r_hand) slots_free -= ui_rhand
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(!H.belt) slots_free += ui_belt
if(!H.l_store) slots_free += ui_storage1
if(!H.r_store) slots_free += ui_storage2
if(slots_free.len)
halitem.screen_loc = pick(slots_free)
halitem.layer = 50
+1 -1
View File
@@ -1096,7 +1096,7 @@
reagents.add_reagent("nutriment",12)
afterattack(obj/O as obj, mob/user as mob)
if(istype(O,/obj/machinery/sink) && !wrapped)
if(istype(O,/obj/structure/sink) && !wrapped)
user << "You place [name] under a stream of water..."
loc = get_turf(O)
return Expand()
+243
View File
@@ -0,0 +1,243 @@
/proc/bsi_cast_ray(icon/I, list/start, list/end)
if(abs(start[1] - end[1]) > abs(start[2] - end[2]))
var/dist = abs(start[1] - end[1]) * 2
for(var/i = 1, i <= dist, i++)
var/x = round((start[1] * i / dist) + (end[1] * (1 - i / dist)))
var/y = round((start[2] * i / dist) + (end[2] * (1 - i / dist)))
if(I.GetPixel(x, y) != null)
return list(x, y)
else
var/dist = abs(start[2] - end[2]) * 2
for(var/i = 1, i <= dist, i++)
var/x = round((start[1] * i / dist) + (end[1] * (1 - i / dist)))
var/y = round((start[2] * i / dist) + (end[2] * (1 - i / dist)))
if(I.GetPixel(x, y) != null)
return list(x, y)
return null
/proc/bsi_split_colors(color)
if(color == null)
return list(0, 0, 0, 0)
var/list/colors = list(0, 0, 0, 0)
colors[1] = hex2num(copytext(color, 2, 4))
colors[2] = hex2num(copytext(color, 4, 6))
colors[3] = hex2num(copytext(color, 6, 8))
colors[4] = (length(color) > 7)? hex2num(copytext(color, 8, 10)) : 255
return colors
/proc/bsi_spread(icon/I, list/start_point)
var/list/queue = list()
queue[++queue.len] = start_point
var/i = 0
while(i++ < length(queue))
var/x = queue[i][1]
var/y = queue[i][2]
var/list/pixel = bsi_split_colors(I.GetPixel(x, y))
if(pixel[4] == 0)
continue
var/list/n = (y < I.Height())? bsi_split_colors(I.GetPixel(x, y + 1)) : list(0, 0, 0, 0)
var/list/s = (y > 1)? bsi_split_colors(I.GetPixel(x, y - 1)) : list(0, 0, 0, 0)
var/list/e = (x < I.Width())? bsi_split_colors(I.GetPixel(x + 1, y)) : list(0, 0, 0, 0)
var/list/w = (x > 1)? bsi_split_colors(I.GetPixel(x - 1, y)) : list(0, 0, 0, 0)
var/value = (i == 1)? 16 : max(n[1] - 1, e[1] - 1, s[1] - 1, w[1] - 1)
if(prob(50))
value = max(0, value - 1)
if(prob(50))
value = max(0, value - 1)
if(prob(50))
value = max(0, value - 1)
if(value <= pixel[1])
continue
var/v2 = 256 - ((16 - value) * (16 - value))
I.DrawBox(rgb(value, v2, pixel[4] - v2, pixel[4]), x, y)
if(n[4] != 0 && n[1] < value - 1)
queue[++queue.len] = list(x, y + 1)
if(s[4] != 0 && s[1] < value - 1)
queue[++queue.len] = list(x, y - 1)
if(e[4] != 0 && e[1] < value - 1)
queue[++queue.len] = list(x + 1, y)
if(w[4] != 0 && w[1] < value - 1)
queue[++queue.len] = list(x - 1, y)
/proc/bsi_generate_mask(icon/source, state)
var/icon/mask = icon(source, state)
mask.MapColors(
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 1, 1,
0, 0, 0, 0)
var/hits = 0
for(var/i = 1, i <= 10, i++)
var/point1
var/point2
if(prob(50))
if(prob(50))
point1 = list(rand(1, mask.Width()), mask.Height())
point2 = list(rand(1, mask.Width()), 1)
else
point2 = list(rand(1, mask.Width()), mask.Height())
point1 = list(rand(1, mask.Width()), 1)
else
if(prob(50))
point1 = list(mask.Width(), rand(1, mask.Height()))
point2 = list(1, rand(1, mask.Height()))
else
point2 = list(mask.Width(), rand(1, mask.Height()))
point1 = list(1, rand(1, mask.Height()))
var/hit = bsi_cast_ray(mask, point1, point2)
if(hit == null)
continue
hits++
bsi_spread(mask, hit)
if(prob(20 + hits * 20))
break
if(hits == 0)
return null
else
return mask
/proc/generate_bluespace_icon(icon/source, state)
var/icon/mask = bsi_generate_mask(source, state)
if(mask == null)
return source
var/icon/unaffected = icon(mask)
unaffected.MapColors(
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 1,
0, 0, 0, 0,
255, 255, 255, 0)
var/icon/temp = icon(source, state) //Mask already contains the original alpha values, avoid squaring them
temp.MapColors(
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 0,
0, 0, 0, 255)
unaffected.Blend(temp, ICON_MULTIPLY)
var/icon/bluespaced = icon(mask)
bluespaced.MapColors(
0, 0, 0, 0,
0, 0, 0, 1,
0, 0, 0, 0,
0, 0, 0, 0,
1, 1, 1, 0)
bluespaced.Blend(icon(source, state), ICON_MULTIPLY)
var/list/frames = list(
list(0.000,20),
list(0.020, 5),
list(0.050, 4),
list(0.080, 5),
list(0.100,10),
list(0.080, 5),
list(0.050, 4),
list(0.020, 5),
list(0.000,20),
list(0.020, 5),
list(0.050, 4),
list(0.080, 5),
list(0.100,10),
list(0.080, 5),
list(0.050, 4),
list(0.020, 5),
list(0.000,20),
list(0.020, 5),
list(0.050, 4),
list(0.080, 5),
list(0.100,10),
list(0.080, 5),
list(0.050, 4),
list(0.020, 5),
)
var/list/colors = list(
list( 75, 75, 75, 0),
list( 25, 25, 25, 0),
list( 75, 75, 75, 0),
list( 25, 25, 75, 0),
list( 75, 75, 300, 0),
list( 25, 25, 300, 0),
list(255, 255, 255, 0),
list( 0, 0, 0, 255),
list( 0, 0, 0, 0),
list( 0, 0, 0, 0),
)
for(var/i = 1, i <= rand(1, 5), i++)
var/f = rand(1, length(frames))
if(frames[f][2] > 1)
frames[f][2]--
frames.Insert(f, 0)
frames[f] = list(0.8, 1)
var/icon/result = generate_color_animation(bluespaced, colors, frames)
result.Blend(unaffected, ICON_UNDERLAY)
return result
/atom/verb/test()
set src in view()
src.icon = generate_bluespace_icon(src.icon, src.icon_state)
/mob/verb/bluespam()
for(var/turf/t in view(5))
var/obj/s = new /obj/square(t)
s.icon = generate_bluespace_icon(s.icon, s.icon_state)
@@ -0,0 +1,96 @@
//----------------------------------------
//
// Return a copy of the provided icon,
// after calling MapColors on it. The
// color values are linearily interpolated
// between the pairs provided, based on
// the ratio argument.
//
//----------------------------------------
/proc/MapColors_interpolate(icon/input, ratio,
rr1, rg1, rb1, ra1, rr2, rg2, rb2, ra2,
gr1, gg1, gb1, ga1, gr2, gg2, gb2, ga2,
br1, bg1, bb1, ba1, br2, bg2, bb2, ba2,
ar1, ag1, ab1, aa1, ar2, ag2, ab2, aa2,
zr1, zg1, zb1, za1, zr2, zg2, zb2, za2)
var/r = ratio
var/i = 1 - ratio
var/icon/I = icon(input)
I.MapColors(
(rr1 * r + rr2 * i) / 255.0, (rg1 * r + rg2 * i) / 255.0, (rb1 * r + rb2 * i) / 255.0, (ra1 * r + ra2 * i) / 255.0,
(gr1 * r + gr2 * i) / 255.0, (gg1 * r + gg2 * i) / 255.0, (gb1 * r + gb2 * i) / 255.0, (ga1 * r + ga2 * i) / 255.0,
(br1 * r + br2 * i) / 255.0, (bg1 * r + bg2 * i) / 255.0, (bb1 * r + bb2 * i) / 255.0, (ba1 * r + ba2 * i) / 255.0,
(ar1 * r + ar2 * i) / 255.0, (ag1 * r + ag2 * i) / 255.0, (ab1 * r + ab2 * i) / 255.0, (aa1 * r + aa2 * i) / 255.0,
(zr1 * r + zr2 * i) / 255.0, (zg1 * r + zg2 * i) / 255.0, (zb1 * r + zb2 * i) / 255.0, (za1 * r + za2 * i) / 255.0)
return I
//----------------------------------------
//
// Extension of the above that takes a
// list of lists of color values, rather
// than a large number of arguments.
//
//----------------------------------------
/proc/MapColors_interpolate_list(icon/I, ratio, list/colors)
var/list/c[10]
//Provide default values for any missing colors (without altering the original list
for(var/i = 1, i <= 10, i++)
c[i] = list(0, 0, 0, (i == 7 || i == 8)? 255 : 0)
if(istype(colors[i], /list))
for(var/j = 1, j <= 4, j++)
if(j <= length(colors[i]) && isnum(colors[i][j]))
c[i][j] = colors[i][j]
return MapColors_interpolate(I, ratio,
colors[ 1][1], colors[ 1][2], colors[ 1][3], colors[ 1][4], // Red 1
colors[ 2][1], colors[ 2][2], colors[ 2][3], colors[ 2][4], // Red 2
colors[ 3][1], colors[ 3][2], colors[ 3][3], colors[ 3][4], // Green 1
colors[ 4][1], colors[ 4][2], colors[ 4][3], colors[ 4][4], // Green 2
colors[ 5][1], colors[ 5][2], colors[ 5][3], colors[ 5][4], // Blue 1
colors[ 6][1], colors[ 6][2], colors[ 6][3], colors[ 6][4], // Blue 2
colors[ 7][1], colors[ 7][2], colors[ 7][3], colors[ 7][4], // Alpha 1
colors[ 8][1], colors[ 8][2], colors[ 8][3], colors[ 8][4], // Alpha 2
colors[ 9][1], colors[ 9][2], colors[ 9][3], colors[ 9][4], // Added 1
colors[10][1], colors[10][2], colors[10][3], colors[10][4]) // Added 2
//----------------------------------------
//
// Take the source image, and return an animated
// version, that transitions between the provided
// color mappings, according to the provided
// pattern.
//
// Colors should be in a format suitable for
// MapColors_interpolate_list, and frames should
// be a list of 'frames', where each frame is itself
// a list, element 1 being the ratio of the first
// color to the second, and element 2 being how
// long the frame lasts, in tenths of a second.
//
//----------------------------------------
/proc/generate_color_animation(icon/icon, list/colors, list/frames)
var/icon/out = icon('uristrunes.dmi', "")
var/frame_num = 1
for(var/frame in frames)
var/icon/I = MapColors_interpolate_list(icon, frame[1], colors)
out.Insert(I, "", 2, frame_num++, 0, frame[2])
return out
+268
View File
@@ -0,0 +1,268 @@
//----------------------------------------
//
// Take a source icon, convert into a mask,
// then create a border around it.
//
// The output then uses the colors and
// alpha values provided.
//
//----------------------------------------
/proc/create_border_image(icon/input, border_color = "#000000", fill_color = "#000000", border_alpha = 255, fill_alpha = 255)
var/icon/I = icon('uristrunes.dmi', "blank")
I.Blend(input, ICON_OVERLAY)
//Discard the image
I.MapColors(0, 0, 0, 0, //-\ Ignore
0, 0, 0, 0, //--> The
0, 0, 0, 0, //-/ Colors
0,255, 0, 1, //Keep alpha channel, any pixel with non-zero alpha gets max green channel
0, 0, 0, 0)
//Loop over the image, calculating the border value, and storing it in the red channel
//Store border's alpha in the blue channel
for(var/x = 1, x <= 32, x++)
for(var/y = 1, y <= 32, y++)
var/p = I.GetPixel(x, y)
if(p == null)
var/n = I.GetPixel(x, y + 1)
var/s = I.GetPixel(x, y - 1)
var/e = I.GetPixel(x + 1, y)
var/w = I.GetPixel(x - 1, y)
var/ne = I.GetPixel(x + 1, y + 1)
var/se = I.GetPixel(x + 1, y - 1)
var/nw = I.GetPixel(x - 1, y + 1)
var/sw = I.GetPixel(x - 1, y - 1)
var/sum_adj = ((n == "#00ff00"? 1 : 0) \
+ (s == "#00ff00"? 1 : 0) \
+ (e == "#00ff00"? 1 : 0) \
+ (w == "#00ff00"? 1 : 0))
var/sum_diag = ((ne == "#00ff00"? 1 : 0) \
+ (se == "#00ff00"? 1 : 0) \
+ (nw == "#00ff00"? 1 : 0) \
+ (sw == "#00ff00"? 1 : 0))
if(sum_adj)
I.DrawBox(rgb(255, 0, 200, 0), x, y)
else if(sum_diag)
I.DrawBox(rgb(255, 0, 100, 0), x, y)
else
I.DrawBox(rgb(0, 0, 0, 0), x, y)
else if(p != "#00ff00")
var/a = 255
if(length(p) == 9) // "#rrggbbaa", we want the aa
a = hex2num(copytext(p, 8))
I.DrawBox(rgb(255 - a, a, 255 - a, a), x, y)
//Map the red and green channels to the desired output colors
I.MapColors(border_color, fill_color, rgb(0, 0, 0, border_alpha), rgb(0, 0, 0, fill_alpha), "#00000000")
return I
//----------------------------------------
//
// Take a source icon, convert into a mask,
// and border. Color them according to args,
// and animate.
//
//----------------------------------------
/proc/animate_rune_full(icon/input, rr1, rg1, rb1, ra1, rr2, rg2, rb2, ra2, br1, bg1, bb1, ba1, br2, bg2, bb2, ba2, ar1, ag1, ab1, aa1, ar2, ag2, ab2, aa2, or1, og1, ob1, oa1, or2, og2, ob2, oa2, frames)
var/list/colors[10]
colors[ 1] = list(rr1, rg1, rb1, ra1) //Rune color 1
colors[ 2] = list(rr2, rg2, rb2, ra2) //Rune color 2
colors[ 3] = list(br1, bg1, bb1, ba1) //Border color 1
colors[ 4] = list(br2, bg2, bb2, ba2) //Border color 2
colors[ 5] = list( 0, 0, 0, 0) //Unused
colors[ 6] = list( 0, 0, 0, 0) //Unused
colors[ 7] = list(ar1, ag1, ab1, aa1) //Alpha color 1
colors[ 8] = list(ar2, ag2, ab2, aa2) //Alpha color 2
colors[ 9] = list(or1, og1, ob1, oa1) //Added color 1
colors[10] = list(or2, og2, ob2, oa2) //Added color 2
var/icon/base = create_border_image(input, "#00ff0000", "#ff000000")
return generate_color_animation(base, colors, frames)
//----------------------------------------
//
// Calls the above, but accepts colors in
// the form of "#RRGGBBAA", and provides
// default values.
//
// Main limit is that it doesn't accept
// negative values, which you probably
// don't need anyway. Also missing a few
// color inputs, which would also be rarely
// used.
//
//----------------------------------------
/proc/animate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000", rune_color2 = "#00000000", border_color2 = "#d8380000", alpha = 255, alpha2 = 255, frames = rune_animation)
var/rr1 = hex2num(copytext(rune_color, 2, 4))
var/rg1 = hex2num(copytext(rune_color, 4, 6))
var/rb1 = hex2num(copytext(rune_color, 6, 8))
var/ra1 = hex2num(copytext(rune_color, 8, 10))
var/rr2 = hex2num(copytext(rune_color2, 2, 4))
var/rg2 = hex2num(copytext(rune_color2, 4, 6))
var/rb2 = hex2num(copytext(rune_color2, 6, 8))
var/ra2 = hex2num(copytext(rune_color2, 8, 10))
var/br1 = hex2num(copytext(border_color, 2, 4))
var/bg1 = hex2num(copytext(border_color, 4, 6))
var/bb1 = hex2num(copytext(border_color, 6, 8))
var/ba1 = hex2num(copytext(border_color, 8, 10))
var/br2 = hex2num(copytext(border_color2, 2, 4))
var/bg2 = hex2num(copytext(border_color2, 4, 6))
var/bb2 = hex2num(copytext(border_color2, 6, 8))
var/ba2 = hex2num(copytext(border_color2, 8, 10))
return animate_rune_full(input, rr1, rg1, rb1, ra1, rr2, rg2, rb2, ra2, br1, bg1, bb1, ba1, br2, bg2, bb2, ba2, 0, 0, 0, alpha, 0, 0, 0, alpha2, 0, 0, 0, 0, 0, 0, 0, 0, frames)
/proc/inanimate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000")
var/icon/base = create_border_image(input, "#00ff0000", "#ff000000")
base.MapColors(rune_color, border_color, "#00000000", "#000000ff", "#00000000")
return base
var/list/rune_animation = list(
list(0.000, 5),
list(0.020, 1),
list(0.050, 1),
list(0.090, 1),
list(0.140, 1),
list(0.200, 1),
list(0.270, 1),
list(0.340, 1),
list(0.420, 1),
list(0.500, 1),
list(0.590, 1),
list(0.675, 1),
list(0.750, 1),
list(0.900, 1),
list(1.000, 6),
list(0.875, 1),
list(0.750, 1),
list(0.625, 1),
list(0.500, 1),
list(0.375, 1),
list(0.250, 1),
list(0.125, 1),
)
/var/list/rune_cache = list()
/proc/get_rune(rune_bits, animated = 0)
var/lookup = "[rune_bits]-[animated]"
if(lookup in rune_cache)
return rune_cache[lookup]
var/icon/base = icon('uristrunes.dmi', "")
for(var/i = 0, i < 10, i++)
if(rune_bits & (1 << i))
base.Blend(icon('uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
var/icon/result
if(animated == 1)
result = animate_rune(base)
else
result = inanimate_rune(base)
rune_cache[lookup] = result
return result
// Testing procs and Fun procs
/mob/verb/create_rune()
var/obj/o = new(locate(x, y, z))
o.icon = get_rune(rand(1, 1023), 1)
/mob/verb/runes_15x15()
for(var/turf/t in range(7))
var/obj/o = new /obj(t)
o.icon = get_rune(rand(1, 1023), 1)
/*
/mob/verb/create_rune_custom(rune as num, color1 as color, border1 as color, color2 as color, border2 as color, alpha1 as num, alpha2 as num)
var/icon/I = icon('uristrunes.dmi', "blank")
for(var/i = 0, i < 10, i++)
if(rune & (1 << i))
I.Blend(icon('uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
var/obj/o = new(locate(x, y, z))
o.icon = animate_rune(I, color1, border1, color2, border2, alpha1, alpha2)
/mob/verb/spam()
for(var/turf/t in range(4))
var/icon/I = icon('uristrunes.dmi', "blank")
var/rune = rand(1, 1023)
for(var/i = 0, i < 10, i++)
if(rune & (1 << i))
I.Blend(icon('uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
var/obj/o = new(t)
o.icon = animate_rune_full(I, rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255),
rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255),
rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255),
rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255),
0, 0, 0, rand(0, 255),
0, 0, 0, rand(0, 255),
0, 0, 0, 0,
0, 0, 0, 0,
list(
list(0.000, 5),
list(0.020, 1),
list(0.050, 1),
list(0.090, 1),
list(0.140, 1),
list(0.200, 1),
list(0.270, 1),
list(0.340, 1),
list(0.420, 1),
list(0.500, 1),
list(0.590, 1),
list(0.675, 1),
list(0.750, 1),
list(0.900, 1),
list(1.000, 6),
list(0.875, 1),
list(0.750, 1),
list(0.625, 1),
list(0.500, 1),
list(0.375, 1),
list(0.250, 1),
list(0.125, 1),
))
*/
+4 -2
View File
@@ -154,7 +154,8 @@ proc/move_mining_shuttle()
name = "Miner's pickaxe"
icon = 'items.dmi'
icon_state = "pickaxe"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 15.0
throwforce = 4.0
item_state = "pickaxe"
@@ -238,7 +239,8 @@ proc/move_mining_shuttle()
name = "Shovel"
icon = 'items.dmi'
icon_state = "shovel"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 8.0
throwforce = 4.0
item_state = "shovel"
+2 -1
View File
@@ -6,7 +6,8 @@
name = "Mining Satchel"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of ore pieces it can carry.
flags = FPRINT | TABLEPASS | ONBELT
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
/obj/item/weapon/satchel/attack_self(mob/user as mob)
@@ -601,11 +601,12 @@
..()
if(M.gloves)
if(M.gloves.cell)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
@@ -367,11 +367,12 @@
..()
if(M.gloves)
if(M.gloves.cell)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
@@ -33,7 +33,7 @@
M.client.mob = new/mob/living/carbon/alien/humanoid/special/snakeman(new/obj/effect/snake_egg(src.loc))
visible_message("[src] injects [M] with an egg.")
visible_message("The egg absorbs [M]")
M.mutations |= HUSK
M.mutations |= NOCLONE
M.update_body()
M.death()
else
+9 -13
View File
@@ -204,10 +204,9 @@
if(src == M && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
src.visible_message( \
text("\blue [src] examines [].",src.gender==MALE?"himself":"herself"), \
"\blue You check yourself for injuries." \
)
visible_message("\blue [src] examines [get_gender_form("itsself")].", \
"\blue You check yourself for injuries.", \
"You hear a rustle, as someone checks about their person.")
for(var/datum/organ/external/org in damaged)
var/status = ""
@@ -222,9 +221,11 @@
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "bleeding"
status = "blugeoned"
if(brutedamage > 40)
status = "mangled"
if(org.bleeding && brutedamage)
status += ",[burndamage ? "" : " and"] bleeding[burndamage ? "," : ""]"
if(brutedamage > 0 && burndamage > 0)
status += " and "
if(burndamage > 40)
@@ -242,11 +243,6 @@
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1)
src.show_message(text("\blue You finish checking yourself."),1)
else
var/t_him = "it"
if (src.gender == MALE)
t_him = "him"
else if (src.gender == FEMALE)
t_him = "her"
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
@@ -259,9 +255,9 @@
AdjustWeakened(-3)
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
M.visible_message( \
"\blue [M] shakes [src] trying to wake [t_him] up!", \
"\blue You shake [src] trying to wake [t_him] up!", \
)
"\blue \The [M] shakes \the [src] trying to wake [get_gender_form("it")] up!", \
"\blue You shake \the [src] trying to wake [get_gender_form("it")] up!", \
"You hear someone get shaken.")
/mob/living/carbon/proc/eyecheck()
return 0
@@ -27,32 +27,16 @@
skipears = src.head.flags_inv & HIDEEARS
// crappy hacks because you can't do \his[src] etc. I'm sorry this proc is so unreadable, blame the text macros :<
var/t_He = "It" //capitalised for use at the start of each line.
var/t_his = "its"
var/t_him = "it"
var/t_has = "has"
var/t_is = "is"
var/list/proper_forms = get_visible_gender()
var/t_He = proper_forms["It"] //capitalised for use at the start of each line.
var/t_his = proper_forms["its"]
var/t_him = proper_forms["it"]
var/t_has = proper_forms["has"]
var/t_is = proper_forms["is"]
var/msg = "<span class='info'>*---------*\nThis is "
if( skipjumpsuit && (wear_mask || skipmask) ) //big suits/masks make it hard to tell their gender
t_He = "They"
t_his = "their"
t_him = "them"
t_has = "have"
t_is = "are"
else
if(src.icon)
msg += "\icon[src.icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
switch(src.gender)
if(MALE)
t_He = "He"
t_his = "his"
t_him = "him"
if(FEMALE)
t_He = "She"
t_his = "her"
t_him = "her"
if(icon)
msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
msg += "<EM>\a [src]</EM>[examine_text ? ", [examine_text]":""]!\n"
+68 -35
View File
@@ -27,19 +27,19 @@
var/list/skills = null
// var/b_type
var/obj/item/clothing/suit/wear_suit = null
var/obj/item/clothing/under/w_uniform = null
var/obj/item/clothing/shoes/shoes = null
var/obj/item/weapon/belt = null
var/obj/item/clothing/gloves/gloves = null
var/obj/item/clothing/glasses/glasses = null
var/obj/item/clothing/head/head = null
var/obj/item/clothing/ears/l_ear = null
var/obj/item/clothing/ears/r_ear = null
var/obj/item/wear_suit = null
var/obj/item/w_uniform = null
var/obj/item/shoes = null
var/obj/item/belt = null
var/obj/item/gloves = null
var/obj/item/glasses = null
var/obj/item/head = null
var/obj/item/l_ear = null
var/obj/item/r_ear = null
var/obj/item/weapon/card/id/wear_id = null
var/obj/item/weapon/r_store = null
var/obj/item/weapon/l_store = null
var/obj/item/weapon/s_store = null
var/obj/item/r_store = null
var/obj/item/l_store = null
var/obj/item/s_store = null
var/icon/stand_icon = null
var/icon/lying_icon = null
@@ -150,7 +150,8 @@
..()
spawn(5) // Failsafe for.. weirdness.
rebuild_appearance()
update_clothing()
update_body()
/*var/known_languages = list()
known_languages.Add("english")*/
@@ -552,7 +553,7 @@
return
if (!istype(W, /obj/item))
return
if (!( W.flags & ONBACK ))
if (!( W.slot_flags & SLOT_BACK ))
return
if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
@@ -576,7 +577,10 @@
if (emptyHand)
wear_suit.DblClick()
return
if (!( istype(W, /obj/item/clothing/suit) ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_OCLOTHING ))
return
return
u_equip(W)
wear_suit = W
@@ -586,7 +590,9 @@
if (emptyHand)
gloves.DblClick()
return
if (!( istype(W, /obj/item/clothing/gloves) ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_GLOVES ))
return
u_equip(W)
gloves = W
@@ -596,7 +602,9 @@
if (emptyHand)
shoes.DblClick()
return
if (!( istype(W, /obj/item/clothing/shoes) ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_FEET ))
return
u_equip(W)
shoes = W
@@ -606,7 +614,9 @@
if (emptyHand)
belt.DblClick()
return
if (!W || !W.flags || !( W.flags & ONBELT ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_BELT ))
return
u_equip(W)
belt = W
@@ -616,7 +626,9 @@
if (emptyHand)
glasses.DblClick()
return
if (!( istype(W, /obj/item/clothing/glasses) ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_EYES ))
return
u_equip(W)
glasses = W
@@ -626,10 +638,9 @@
if (emptyHand)
head.DblClick()
return
if (( istype(W, /obj/item/weapon/paper) ))
u_equip(W)
head = W
else if (!( istype(W, /obj/item/clothing/head) ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_HEAD ))
return
u_equip(W)
head = W
@@ -681,7 +692,10 @@
if (emptyHand)
w_uniform.DblClick()
return
if (!( istype(W, /obj/item/clothing/under) ))
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_ICLOTHING ))
return
return
u_equip(W)
w_uniform = W
@@ -693,7 +707,9 @@
return
if (!w_uniform)
return
if (!istype(W, /obj/item/weapon/card/id) && !istype(W, /obj/item/device/pda) )
if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_ID ))
return
u_equip(W)
wear_id = W
@@ -703,19 +719,25 @@
if (emptyHand)
l_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
if (!istype(W, /obj/item))
return
u_equip(W)
l_store = W
if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
return
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
u_equip(W)
l_store = W
if("storage2")
if (r_store)
if (emptyHand)
r_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform )))
if (!istype(W, /obj/item))
return
u_equip(W)
r_store = W
if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
return
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
u_equip(W)
r_store = W
if("suit storage")
if (s_store)
if (emptyHand)
@@ -917,8 +939,8 @@
body_overlays_standing += body_standing
// face_lying and face_standing are the face icons, not a flag
body_overlays_lying += face_standing // yes, the vars are named wrong, I didn't do it -- CIB
body_overlays_standing += face_lying
body_overlays_lying += face_lying
body_overlays_standing += face_standing
@@ -1216,12 +1238,12 @@
if(lying)
icon = lying_icon
overlays += body_overlays_standing
overlays += body_overlays_lying
if(!lying)
icon = stand_icon
overlays += body_overlays_standing
overlays += body_overlays_lying
overlays += clothing_overlays
@@ -2743,3 +2765,14 @@ It can still be worn/put on as normal.
reset_view(0)
remoteobserve = null
src.tkdisable = 0
/mob/living/carbon/human/get_visible_gender()
var/skip_gender = (wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
if( !skip_gender ) //big suits/masks make it hard to tell their gender
switch(gender)
if(MALE)
return list("It" = "He", "its" = "his", "it" = "he", "has" = "has", "is" = "is", "itself" = "himself")
if(FEMALE)
return list("It" = "She", "its" = "her", "it" = "she", "has" = "has", "is" = "is", "itself" = "herself")
return list("It" = "They", "its" = "their", "it" = "them", "has" = "have", "is" = "are", "itself" = "themselves")
@@ -9,11 +9,13 @@
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
@@ -153,10 +153,11 @@ emp_act
if(H.wear_suit) H.wear_suit.add_blood(src)
else if(H.w_uniform) H.w_uniform.add_blood(src)
if(H.shoes) H.shoes.add_blood(src)
if (H.gloves)
H.gloves.add_blood(H)
H.gloves.transfer_blood = 2
H.gloves.bloody_hands_mob = H
if (H.gloves && istype(H.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = H.gloves
G.add_blood(H)
G.transfer_blood = 2
G.bloody_hands_mob = H
else
H.add_blood(H)
H.bloody_hands = 2
@@ -197,4 +198,4 @@ emp_act
if(src.wear_suit) src.wear_suit.add_blood(src)
if(src.w_uniform) src.w_uniform.add_blood(src)
UpdateDamageIcon()
UpdateDamageIcon()
+17 -5
View File
@@ -35,13 +35,13 @@
// TODO: this check and the lyingcheck variable should probably be removed in favor of the visual_lying check
if((lyingcheck != lying) || (buckle_check != (buckled ? 1 : 0))) //This is a fix for falling down / standing up not updating icons. Instead of going through and changing every
spawn(5)
update_lying() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
update_clothing() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
lyingcheck = lying //to lying, so if lying ever changes, update_clothing() will run like normal.
if(stat == 2)
if(!lying && !buckled)
lying = 1
update_lying()
update_clothing()
return
life_tick++
@@ -138,7 +138,7 @@
if (stat != 0)
if(!lying)
lying = 1 //Seriously, stay down :x
update_lying()
update_clothing()
@@ -1348,8 +1348,20 @@
else
blind.layer = 0
if ((disabilities & 1 && ((glasses && !glasses.prescription) || !glasses)) || (glasses && glasses.prescription && !(disabilities & 1)))
client.screen += hud_used.vimpaired
if(disabilities & 1)
if(!glasses)
client.screen += hud_used.vimpaired
else if (glasses && istype(glasses,/obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = glasses
if(!G.prescription)
client.screen += hud_used.vimpaired
else
client.screen += hud_used.vimpaired
else
if(glasses && istype(glasses,/obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = glasses
if(G.prescription)
client.screen += hud_used.vimpaired
if (eye_blurry)
client.screen += hud_used.blurry
@@ -384,7 +384,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
bruteloss += rand(1, 3)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
@@ -463,11 +463,13 @@
if(M.gloves)
if(M.gloves.cell)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
@@ -210,11 +210,13 @@
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
stuttering = 5
-16
View File
@@ -1,19 +1,3 @@
/mob/living/Life()
..()
// While I'm doing a terriblly lazy way of initalizing things, why don't I make it so people's preferences tag along with them. This could be useful in fixing the fucking cloned-as-unknown thing, making me not have to dynamically load them during tensioner, and of course, storing metadata.
//Whoever wrote this should go suck a choad. This was causing runtimes, asshat. IN ADDITION, YOU PUT IT IN THE LIFE PROC YOU ASSHAT
// if(!src.storedpreferences)
// src.storedpreferences = new
// storedpreferences.savefile_load(src, 0)
return
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
@@ -7,6 +7,7 @@
w_class = 100.0
item_state = "electronic"
flags = FPRINT|TABLEPASS | CONDUCT
var/list/modules = list()
var/obj/item/emag = null
var/obj/item/borg/upgrade/jetpack = null
@@ -60,12 +61,12 @@
..()
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo
src.modules += new /obj/item/weapon/reagent_containers/borghypo(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/large(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.modules += new /obj/item/weapon/reagent_containers/syringe
src.modules += new /obj/item/weapon/extinguisher/mini
src.emag = new /obj/item/weapon/circular_saw
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
src.modules += new /obj/item/weapon/extinguisher/mini(src)
src.emag = new /obj/item/weapon/circular_saw(src)
return
@@ -143,8 +144,8 @@
New()
..()
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/trashbag
src.modules += new/obj/item/weapon/mop
src.modules += new /obj/item/weapon/trashbag(src)
src.modules += new/obj/item/weapon/mop(src)
src.emag = new /obj/item/weapon/cleaner(src)
var/datum/reagents/R = new/datum/reagents(1000)
+7 -3
View File
@@ -48,14 +48,18 @@
if (!message)
return
var/obj/machinery/hologram/holopad/T = client.eye//Client eye centers on an object.
if(istype(T)&&T.hologram&&T.master==src)//If there is a hologram and its master is the user.
if(!isAI(src))
return
var/mob/living/silicon/ai/A = src
var/obj/machinery/hologram/holopad/T = A.current//Client eye centers on an object.
if(istype(T) && T.hologram && T.master==src)
var/message_a = say_quote(message)
//Human-like, sorta, heard by those who understand humans.
var/rendered_a = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
//Speach distorted, heard by those who do not understand AIs.
//Speech distorted, heard by those who do not understand AIs.
message = stars(message)
var/message_b = say_quote(message)
var/rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
+11 -23
View File
@@ -64,28 +64,6 @@
src << msg
return
// Show a message to all mobs in sight of this one
// This would be for visible actions by the src mob
// message is the message output to anyone who can see e.g. "[src] does something!"
// self_message (optional) is what the src mob sees e.g. "You do something!"
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
/mob/visible_message(var/message, var/self_message, var/blind_message)
for(var/mob/M in viewers(src))
var/msg = message
if(self_message && M==src)
msg = self_message
M.show_message( msg, 1, blind_message, 2)
// Show a message to all mobs in sight of this atom
// Use for objects performing visible actions
// message is output to anyone who can see, e.g. "The [src] does something!"
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
/atom/proc/visible_message(var/message, var/blind_message)
for(var/mob/M in viewers(src))
M.show_message( message, 1, blind_message, 2)
/mob/proc/findname(msg)
for(var/mob/M in world)
if (M.real_name == text("[]", msg))
@@ -1158,7 +1136,7 @@ note dizziness decrements automatically in the mob's Life() proc.
if(!isemptylist(args))
for(var/file in args)
src << browse_rsc(file)
return 1
return 1
return 0
@@ -1182,3 +1160,13 @@ note dizziness decrements automatically in the mob's Life() proc.
// Call this proc whenever something about the clothing of a mob changes. Normally, you
// don't need to call this by hand, as the equip procs will do it for you.
..()
/mob/proc/get_visible_gender()
//Returns the proper words to use based on the mob's visible gender. Used in text creation.
return list("It" = "It", "its" = "its", "it" = "it", "has" = "has", "is" = "is", "itself" = "itself")
/mob/proc/get_gender_form(var/form)
if(!istext(form))
return
var/list/proper_forms = get_visible_gender()
return proper_forms[form]
+2
View File
@@ -98,6 +98,8 @@
var/real_name = null
var/original_name = null //Original name is only used in ghost chat! It is not to be edited by anything!
var/flavor_text = ""
var/med_record = ""
var/sec_record = ""
var/blinded = null
var/bhunger = 0//Carbon
var/ajourn = 0
+48 -10
View File
@@ -301,7 +301,7 @@
proc/ManifestLateSpawn(var/mob/living/carbon/human/H, icon/H_icon) // Attempted fix to add late joiners to various databases -- TLE
// This is basically ripped wholesale from the normal code for adding people to the databases during a fresh round
// This is basically ripped wholesale from the normal code for adding people to the databases during a fresh round //Erth Mark
if (!isnull(H.mind) && (H.mind.assigned_role != "MODE"))
var/datum/data/record/G = new()
var/datum/data/record/M = new()
@@ -310,10 +310,11 @@
var/obj/item/weapon/card/id/C = H.wear_id
if (C)
G.fields["rank"] = C.assignment
G.fields["real_rank"] = H.mind.assigned_role
else
if(H.mind && H.mind.assigned_role)
G.fields["rank"] = H.mind.assigned_role
G.fields["rank"] = H.mind.role_alt_title ? H.mind.role_alt_title : H.mind.assigned_role
G.fields["real_rank"] = H.mind.assigned_role
else
G.fields["rank"] = "Unassigned"
@@ -334,21 +335,58 @@
G.fields["m_stat"] = "Stable"
M.fields["b_type"] = text("[]", H.dna.b_type)
M.fields["b_dna"] = H.dna.unique_enzymes
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
var/minor_dis = null
if(H.disabilities)
if(H.disabilities & 1)
minor_dis += "Myopia, "
if(H.disabilities & 4)
minor_dis += "Persistant Cough, "
if(H.disabilities & 16)
minor_dis += "Stuttering, "
if(minor_dis)
M.fields["mi_dis"] = minor_dis
else
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No additional minor disability notes."
var/major_dis = null
if(H.disabilities)
if(H.disabilities & 2)
major_dis += "Epilepsy, "
if(H.disabilities & 8)
major_dis += "Tourette's Syndrome, "
if(H.disabilities & 32)
major_dis += "Deafness, "
if(major_dis)
M.fields["ma_dis"] = major_dis
else
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No additional major disability notes."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["alg_d"] = "No additional allergy notes."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["notes"] = "No notes."
M.fields["cdi_d"] = "No additional disease notes."
if(H.med_record && !jobban_isbanned(H, "Records"))
M.fields["notes"] = H.med_record
else
M.fields["notes"] = "No notes found."
S.fields["criminal"] = "None"
S.fields["mi_crim"] = "None"
S.fields["mi_crim_d"] = "No minor crime convictions."
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
if(H.sec_record && !jobban_isbanned(H, "Records"))
S.fields["notes"] = H.sec_record
else
S.fields["notes"] = "No notes."
//Begin locked reporting
L.fields["name"] = H.real_name
+71 -2
View File
@@ -126,6 +126,9 @@ datum/preferences
var/flavor_text = ""
var/med_record = ""
var/sec_record = ""
// slot stuff (Why were they var/var? --SkyMarshal)
var/slotname
var/curslot = 0
@@ -320,6 +323,10 @@ datum/preferences
dat += "<hr><b><a href=\"byond://?src=\ref[user];preferences=1;disabilities=-1\">Disabilities</a></b><br>"
if(jobban_isbanned(user, "Records"))
dat += "<hr><b>You are banned from using character records.</b><br>"
else
dat += "<hr><b><a href=\"byond://?src=\ref[user];preferences=1;records=1\">Character Records</a></b><br>"
dat += "<hr><b>Flavor Text</b><br>"
dat += "<a href='byond://?src=\ref[user];preferences=1;flavor_text=1'>Change</a><br>"
if(lentext(flavor_text) <= 40)
@@ -392,6 +399,33 @@ datum/preferences
user << browse(HTML, "window=disabil;size=350x300")
return
proc/SetRecords(mob/user)
var/HTML = "<body>"
HTML += "<tt><center>"
HTML += "<b>Set Character Records</b><br>"
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;med_record=1\">Medical Records</a><br>"
if(lentext(med_record) <= 40)
HTML += "<br>[med_record]<br>"
else
HTML += "<br>[copytext(med_record, 1, 37)]...<br>"
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;sec_record=1\">Security Records</a><br>"
if(lentext(sec_record) <= 40)
HTML += "<br>[sec_record]<br>"
else
HTML += "<br>[copytext(sec_record, 1, 37)]...<br>"
HTML += "<br>"
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;records=-1\">\[Done\]</a>"
HTML += "</center></tt>"
user << browse(null, "window=preferences")
user << browse(HTML, "window=records;size=350x300")
return
proc/GetAltTitle(datum/job/job)
return job_alt_titles.Find(job.title) > 0 \
? job_alt_titles[job.title] \
@@ -890,10 +924,9 @@ datum/preferences
be_random_name = !be_random_name
if(link_tags["flavor_text"])
var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message
var/msg = copytext(sanitize(input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message),1,MAX_NAME_LEN)
if(msg != null)
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = html_encode(msg)
flavor_text = msg
@@ -984,6 +1017,7 @@ datum/preferences
midis = 1
ghost_ears = 1
disabilities = 0
if(link_tags["disabilities"])
if(text2num(link_tags["disabilities"]) >= -1)
if(text2num(link_tags["disabilities"]) >= 0)
@@ -993,6 +1027,39 @@ datum/preferences
else
user << browse(null, "window=disabil")
if(link_tags["records"])
if(text2num(link_tags["records"]) >= 1)
SetRecords(user)
return
else
user << browse(null, "window=records")
if(link_tags["med_record"])
var/medmsg = copytext(sanitize(input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message),1,MAX_NAME_LEN)
if(medmsg != null)
medmsg = html_encode(medmsg)
med_record = medmsg
SetRecords(user)
if(link_tags["sec_record"])
var/secmsg = copytext(sanitize(input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message),1,MAX_NAME_LEN)
if(secmsg != null)
secmsg = html_encode(secmsg)
sec_record = secmsg
SetRecords(user)
if(link_tags["flavor_text"])
var/msg = copytext(sanitize(input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message),1,MAX_NAME_LEN)
if(msg != null)
msg = html_encode(msg)
flavor_text = msg
ShowChoices(user)
proc/copy_to(mob/living/carbon/human/character, safety = 0)
@@ -1002,6 +1069,8 @@ datum/preferences
character.original_name = real_name //Original name is only used in ghost chat! It is not to be edited by anything!
character.flavor_text = flavor_text
character.med_record = med_record
character.sec_record = sec_record
character.gender = gender
+4
View File
@@ -98,6 +98,8 @@ datum/preferences/proc/savefile_save(mob/user, slot)
F["name_is_always_random"] << src.be_random_name
F["flavor_text"] << flavor_text
F["med_record"] << med_record
F["sec_record"] << sec_record
F["gender"] << src.gender
F["age"] << src.age
@@ -196,6 +198,8 @@ datum/preferences/proc/savefile_load(mob/user, slot)
F["age"] >> src.age
F["flavor_text"] >> flavor_text
F["med_record"] >> med_record
F["sec_record"] >> sec_record
F["hair_red"] >> src.r_hair
F["hair_green"] >> src.g_hair
+2 -1
View File
@@ -9,7 +9,8 @@
throw_range = 10
var/obj/item/weapon/pen/haspen //The stored pen.
var/obj/item/weapon/paper/toppaper //The topmost piece of paper.
flags = FPRINT | TABLEPASS | ONBELT
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
pressure_resistance = 10
/obj/item/weapon/clipboard/New()
+260 -261
View File
@@ -11,278 +11,277 @@
throw_range = 15
layer = 4
pressure_resistance = 1
slot_flags = SLOT_HEAD
see_face = 1
body_parts_covered = HEAD
protective_temperature = 0
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
var/list/stamped
var/see_face = 1
var/body_parts_covered = HEAD
var/protective_temperature = 0
var/rigged = 0
var/spam_flag = 0
const/ar/deffont = "Verdana"
const/ar/signfont = "Times New Roman"
const/ar/crayonfont = "Comic Sans MS"
var/const/deffont = "Verdana"
var/const/signfont = "Times New Roman"
var/const/crayonfont = "Comic Sans MS"
New()
..()
src.pixel_y = rand(-8, 8)
src.pixel_x = rand(-9, 9)
spawn(2)
if(src.info)
src.overlays += "paper_words"
updateinfolinks()
return
update_icon()
/obj/item/weapon/paper/New()
..()
src.pixel_y = rand(-8, 8)
src.pixel_x = rand(-9, 9)
spawn(2)
if(src.info)
src.overlays += "paper_words"
return
examine()
set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
verb/rename()
set name = "Rename paper"
set category = "Object"
set src in usr
if ((usr.mutations & CLUMSY) && prob(50))
usr << "\red You cut yourself on the paper."
return
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN)
n_name = copytext(n_name, 1, 32)
if ((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
attack_self(mob/living/user as mob)
examine()
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
playsound(src.loc, 'bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
return
attack_ai(var/mob/living/silicon/ai/user as mob)
var/dist
if (istype(user) && user.current) //is AI
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)
if (dist < 2)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
proc
addtofield(var/id, var/text, var/links = 0)
var/locid = 0
var/laststart = 1
var/textindex = 1
while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck
var/istart = 0
if(links)
istart = findtext(info_links, "<span class=\"paper_field\">", laststart)
else
istart = findtext(info, "<span class=\"paper_field\">", laststart)
if(istart==0)
return // No field found with matching id
laststart = istart+1
locid++
if(locid == id)
var/iend = 1
if(links)
iend = findtext(info_links, "</span>", istart)
else
iend = findtext(info, "</span>", istart)
//textindex = istart+26
textindex = iend
break
if(links)
var/before = copytext(info_links, 1, textindex)
var/after = copytext(info_links, textindex)
info_links = before + text + after
else
var/before = copytext(info, 1, textindex)
var/after = copytext(info, textindex)
info = before + text + after
updateinfolinks()
updateinfolinks()
info_links = info
var/i = 0
for(i=1,i<=fields,i++)
addtofield(i, "<font face=\"[deffont]\"><A href='?src=\ref[src];write=[i]'>write</A></font>", 1)
info_links = info_links + "<font face=\"[deffont]\"><A href='?src=\ref[src];write=end'>write</A></font>"
parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0)
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
t = dd_replacetext(t, "\[center\]", "<center>")
t = dd_replacetext(t, "\[/center\]", "</center>")
t = dd_replacetext(t, "\[br\]", "<BR>")
t = dd_replacetext(t, "\[b\]", "<B>")
t = dd_replacetext(t, "\[/b\]", "</B>")
t = dd_replacetext(t, "\[i\]", "<I>")
t = dd_replacetext(t, "\[/i\]", "</I>")
t = dd_replacetext(t, "\[u\]", "<U>")
t = dd_replacetext(t, "\[/u\]", "</U>")
t = dd_replacetext(t, "\[large\]", "<font size = \"4\">")
t = dd_replacetext(t, "\[/large\]", "</font>")
t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
if(!iscrayon)
t = dd_replacetext(t, "\[*\]", "<li>")
t = dd_replacetext(t, "\[hr\]", "<HR>")
t = dd_replacetext(t, "\[small\]", "<font size = \"1\">")
t = dd_replacetext(t, "\[/small\]", "</font>")
t = dd_replacetext(t, "\[list\]", "<ul>")
t = dd_replacetext(t, "\[/list\]", "</ul>")
t = "<font face=\"[deffont]\" color=[P.colour]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!
t = dd_replacetext(t, "\[*\]", "")
t = dd_replacetext(t, "\[hr\]", "")
t = dd_replacetext(t, "\[small\]", "")
t = dd_replacetext(t, "\[/small\]", "")
t = dd_replacetext(t, "\[list\]", "")
t = dd_replacetext(t, "\[/list\]", "")
t = "<font face=\"[crayonfont]\" color=[P.colour]><b>[t]</b></font>"
//Count the fields
var/laststart = 1
while(1)
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
if(i==0)
break
laststart = i+1
fields++
return t
openhelp(mob/user as mob)
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
<BODY>
<b><center>Crayon&Pen commands</center></b><br>
<br>
\[br\] : Creates a linebreak.<br>
\[center\] - \[/center\] : Centers the text.<br>
\[b\] - \[/b\] : Makes the text <b>bold</b>.<br>
\[i\] - \[/i\] : Makes the text <i>italic</i>.<br>
\[u\] - \[/u\] : Makes the text <u>underlined</u>.<br>
\[large\] - \[/large\] : Increases the <font size = \"4\">size</font> of the text.<br>
\[sign\] : Inserts a signature of your name in a foolproof way.<br>
\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.<br>
<br>
<b><center>Pen exclusive commands</center></b><br>
\[small\] - \[/small\] : Decreases the <font size = \"1\">size</font> of the text.<br>
\[list\] - \[/list\] : A list.<br>
\[*\] : A dot used for lists.<br>
\[hr\] : Adds a horizontal rule.
</BODY></HTML>"}, "window=paper_help")
Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if(href_list["write"])
var/id = href_list["write"]
var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text
var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))
if(!istype(i, /obj/item/toy/crayon))
return
iscrayon = 1
if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write
return
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
if(id!="end")
addtofield(text2num(id), t) // He wants to edit a field, let him.
else
info += t // Oh, he wants to edit to the end of the file, let him.
updateinfolinks()
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") // Update the window
if(!overlays.Find("paper_words"))
overlays += "paper_words"
attackby(obj/item/weapon/P as obj, mob/user as mob)
..()
var/clown = 0
if(user.mind && (user.mind.assigned_role == "Clown"))
clown = 1
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
//openhelp(user)
return
else if(istype(P, /obj/item/weapon/stamp))
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P))
return
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
switch(P.type)
if(/obj/item/weapon/stamp/captain)
overlays += "paper_stamped_cap"
if(/obj/item/weapon/stamp/hop)
overlays += "paper_stamped_hop"
if(/obj/item/weapon/stamp/hos)
overlays += "paper_stamped_hos"
if(/obj/item/weapon/stamp/ce)
overlays += "paper_stamped_ce"
if(/obj/item/weapon/stamp/rd)
overlays += "paper_stamped_rd"
if(/obj/item/weapon/stamp/cmo)
overlays += "paper_stamped_cmo"
if(/obj/item/weapon/stamp/denied)
overlays += "paper_stamped_denied"
if(/obj/item/weapon/stamp/clown)
if (!clown)
usr << "\red You are totally unable to use the stamp. HONK!"
return
else
overlays += "paper_stamped_clown"
else
overlays += "paper_stamped"
if(!stamped)
stamped = new
stamped += P.type
user << "\blue You stamp the paper with your rubber stamp."
add_fingerprint(user)
return
/obj/item/weapon/paper/update_icon()
if(src.info)
src.overlays += "paper_words"
return
/obj/item/weapon/paper/examine()
set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
/obj/item/weapon/paper/verb/rename()
set name = "Rename paper"
set category = "Object"
set src in usr
if ((usr.mutations & CLUMSY) && prob(50))
usr << "\red You cut yourself on the paper."
return
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN)
if ((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
/obj/item/weapon/paper/attack_self(mob/living/user as mob)
examine()
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
playsound(src.loc, 'bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
return
/obj/item/weapon/paper/attack_ai(var/mob/living/silicon/ai/user as mob)
var/dist
if (istype(user) && user.current) //is AI
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)
if (dist < 2)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
/obj/item/weapon/paper/proc/addtofield(var/id, var/text, var/links = 0)
var/locid = 0
var/laststart = 1
var/textindex = 1
while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck
var/istart = 0
if(links)
istart = findtext(info_links, "<span class=\"paper_field\">", laststart)
else
istart = findtext(info, "<span class=\"paper_field\">", laststart)
if(istart==0)
return // No field found with matching id
laststart = istart+1
locid++
if(locid == id)
var/iend = 1
if(links)
iend = findtext(info_links, "</span>", istart)
else
iend = findtext(info, "</span>", istart)
//textindex = istart+26
textindex = iend
break
if(links)
var/before = copytext(info_links, 1, textindex)
var/after = copytext(info_links, textindex)
info_links = before + text + after
else
var/before = copytext(info, 1, textindex)
var/after = copytext(info, textindex)
info = before + text + after
updateinfolinks()
/obj/item/weapon/paper/proc/updateinfolinks()
info_links = info
var/i = 0
for(i=1,i<=fields,i++)
addtofield(i, "<font face=\"[deffont]\"><A href='?src=\ref[src];write=[i]'>write</A></font>", 1)
info_links = info_links + "<font face=\"[deffont]\"><A href='?src=\ref[src];write=end'>write</A></font>"
/obj/item/weapon/paper/proc/parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0)
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
t = dd_replacetext(t, "\[center\]", "<center>")
t = dd_replacetext(t, "\[/center\]", "</center>")
t = dd_replacetext(t, "\[br\]", "<BR>")
t = dd_replacetext(t, "\[b\]", "<B>")
t = dd_replacetext(t, "\[/b\]", "</B>")
t = dd_replacetext(t, "\[i\]", "<I>")
t = dd_replacetext(t, "\[/i\]", "</I>")
t = dd_replacetext(t, "\[u\]", "<U>")
t = dd_replacetext(t, "\[/u\]", "</U>")
t = dd_replacetext(t, "\[large\]", "<font size = \"4\">")
t = dd_replacetext(t, "\[/large\]", "</font>")
t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
if(!iscrayon)
t = dd_replacetext(t, "\[*\]", "<li>")
t = dd_replacetext(t, "\[hr\]", "<HR>")
t = dd_replacetext(t, "\[small\]", "<font size = \"1\">")
t = dd_replacetext(t, "\[/small\]", "</font>")
t = dd_replacetext(t, "\[list\]", "<ul>")
t = dd_replacetext(t, "\[/list\]", "</ul>")
t = "<font face=\"[deffont]\" color=[P.colour]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!
t = dd_replacetext(t, "\[*\]", "")
t = dd_replacetext(t, "\[hr\]", "")
t = dd_replacetext(t, "\[small\]", "")
t = dd_replacetext(t, "\[/small\]", "")
t = dd_replacetext(t, "\[list\]", "")
t = dd_replacetext(t, "\[/list\]", "")
t = "<font face=\"[crayonfont]\" color=[P.colour]><b>[t]</b></font>"
//Count the fields
var/laststart = 1
while(1)
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
if(i==0)
break
laststart = i+1
fields++
return t
/obj/item/weapon/paper/proc/openhelp(mob/user as mob)
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
<BODY>
<b><center>Crayon&Pen commands</center></b><br>
<br>
\[br\] : Creates a linebreak.<br>
\[center\] - \[/center\] : Centers the text.<br>
\[b\] - \[/b\] : Makes the text <b>bold</b>.<br>
\[i\] - \[/i\] : Makes the text <i>italic</i>.<br>
\[u\] - \[/u\] : Makes the text <u>underlined</u>.<br>
\[large\] - \[/large\] : Increases the <font size = \"4\">size</font> of the text.<br>
\[sign\] : Inserts a signature of your name in a foolproof way.<br>
\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.<br>
<br>
<b><center>Pen exclusive commands</center></b><br>
\[small\] - \[/small\] : Decreases the <font size = \"1\">size</font> of the text.<br>
\[list\] - \[/list\] : A list.<br>
\[*\] : A dot used for lists.<br>
\[hr\] : Adds a horizontal rule.
</BODY></HTML>"}, "window=paper_help")
/obj/item/weapon/paper/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if(href_list["write"])
var/id = href_list["write"]
var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text
var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))
if(!istype(i, /obj/item/toy/crayon))
return
iscrayon = 1
if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write
return
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
if(id!="end")
addtofield(text2num(id), t) // He wants to edit a field, let him.
else
info += t // Oh, he wants to edit to the end of the file, let him.
updateinfolinks()
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") // Update the window
if(!overlays.Find("paper_words"))
overlays += "paper_words"
/obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob)
..()
var/clown = 0
if(user.mind && (user.mind.assigned_role == "Clown"))
clown = 1
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
//openhelp(user)
return
else if(istype(P, /obj/item/weapon/stamp))
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P))
return
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
switch(P.type)
if(/obj/item/weapon/stamp/captain)
overlays += "paper_stamped_cap"
if(/obj/item/weapon/stamp/hop)
overlays += "paper_stamped_hop"
if(/obj/item/weapon/stamp/hos)
overlays += "paper_stamped_hos"
if(/obj/item/weapon/stamp/ce)
overlays += "paper_stamped_ce"
if(/obj/item/weapon/stamp/rd)
overlays += "paper_stamped_rd"
if(/obj/item/weapon/stamp/cmo)
overlays += "paper_stamped_cmo"
if(/obj/item/weapon/stamp/denied)
overlays += "paper_stamped_denied"
if(/obj/item/weapon/stamp/clown)
if (!clown)
usr << "\red You are totally unable to use the stamp. HONK!"
return
else
overlays += "paper_stamped_clown"
else
overlays += "paper_stamped"
if(!stamped)
stamped = new
stamped += P.type
user << "\blue You stamp the paper with your rubber stamp."
add_fingerprint(user)
return
+2 -1
View File
@@ -3,7 +3,8 @@
name = "pen"
icon = 'bureaucracy.dmi'
icon_state = "pen"
flags = FPRINT | ONBELT | TABLEPASS
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 0
w_class = 1.0
throw_speed = 7
+1 -1
View File
@@ -10,7 +10,7 @@
throw_speed = 7
throw_range = 15
m_amt = 60
var/color = "cargo"
color = "cargo"
pressure_resistance = 5
/obj/item/weapon/stamp/captain
+1 -1
View File
@@ -2,7 +2,7 @@
icon = 'AM_Engine.dmi'
density = 1
anchored = 1.0
flags = 512.0
flags = ON_BORDER
/obj/machinery/power/am_engine/bits
name = "Antimatter Engine"
+43 -42
View File
@@ -20,6 +20,7 @@
process()
if(P)
if(P.air_contents.toxins <= 0)
investigate_log("<font color='red'>out of fuel</font>.","singulo")
P.air_contents.toxins = 0
eject()
else
@@ -33,6 +34,7 @@
toggle_power()
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
"You turn the [src.name] [active? "on":"off"].")
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [P?"Fuel: [round(P.air_contents.toxins/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
return
else
user << "\red The controls are locked!"
@@ -97,48 +99,47 @@
return ..()
proc
eject()
var/obj/item/weapon/tank/plasma/Z = src.P
if (!Z)
return
Z.loc = get_turf(src)
Z.layer = initial(Z.layer)
src.P = null
if(active)
toggle_power()
else
updateicon()
receive_pulse(var/pulse_strength)
if(P && active)
var/power_produced = 0
power_produced = P.air_contents.toxins*pulse_strength*20
add_avail(power_produced)
last_power = power_produced
return
proc/eject()
locked = 0
var/obj/item/weapon/tank/plasma/Z = src.P
if (!Z)
return
updateicon()
overlays = null
if(P)
overlays += image('singularity.dmi', "ptank")
if(stat & (NOPOWER|BROKEN))
return
if(active)
overlays += image('singularity.dmi', "on")
toggle_power()
active = !active
if(active)
icon_state = "ca_on"
flick("ca_active", src)
else
icon_state = "ca"
flick("ca_deactive", src)
Z.loc = get_turf(src)
Z.layer = initial(Z.layer)
src.P = null
if(active)
toggle_power()
else
updateicon()
return
proc/receive_pulse(var/pulse_strength)
if(P && active)
var/power_produced = 0
power_produced = P.air_contents.toxins*pulse_strength*20
add_avail(power_produced)
last_power = power_produced
return
return
proc/updateicon()
overlays = null
if(P)
overlays += image('singularity.dmi', "ptank")
if(stat & (NOPOWER|BROKEN))
return
if(active)
overlays += image('singularity.dmi', "on")
proc/toggle_power()
active = !active
if(active)
icon_state = "ca_on"
flick("ca_active", src)
else
icon_state = "ca"
flick("ca_deactive", src)
updateicon()
return
@@ -40,6 +40,9 @@
..()
return
Del()
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z])","singulo")
..()
update_icon()
if (active && !(stat & (NOPOWER|BROKEN)))
@@ -56,12 +59,14 @@
src.active = 0
user << "You turn off the [src]."
src.use_power = 1
investigate_log("turned <font color='red'>off</font> by [user.key]","singulo")
else
src.active = 1
user << "You turn on the [src]."
src.shot_number = 0
src.fire_delay = 100
src.use_power = 2
investigate_log("turned <font color='green'>on</font> by [user.key]","singulo")
update_icon()
else
user << "\red The controls are locked!"
@@ -88,6 +88,8 @@ field_generator power level display
"You turn on the [src.name].", \
"You hear heavy droning")
turn_on()
investigate_log("<font color='green'>activated</font> by [user.key].","singulo")
src.add_fingerprint(user)
else
user << "The [src] needs to be firmly secured to the floor first."
@@ -215,6 +217,7 @@ field_generator power level display
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] shuts down!")
turn_off()
investigate_log("ran out of power and <font color='red'>deactivated</font>","singulo")
src.power = 0
return 0
@@ -0,0 +1,4 @@
/area/engine/engineering/poweralert(var/state, var/source)
if (state != poweralm)
investigate_log("has a power alarm!","singulo")
..()
@@ -152,6 +152,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return
Move()
..()
if(master && master.active)
master.toggle_power()
investigate_log("was moved whilst active; it <font color='red'>powered down</font>.","singulo")
ex_act(severity)
switch(severity)
if(1.0)
@@ -182,9 +188,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
update_icon()
switch(construction_state)
if(0)
icon_state="[reference]"
if(1)
if(0,1)
icon_state="[reference]"
if(2)
icon_state="[reference]w"
@@ -376,7 +380,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
del(src)
return
proc
update_state()
return 0
@@ -49,7 +49,6 @@
if(use_power)
icon_state = "[reference]p"
else
icon_state = "[reference]c"
switch(construction_state)
if(0)
icon_state = "[reference]"
@@ -57,7 +56,7 @@
icon_state = "[reference]"
if(2)
icon_state = "[reference]w"
if(3)
else
icon_state = "[reference]c"
return
@@ -79,34 +78,34 @@
return
if(href_list["togglep"])
src.toggle_power()
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr.key]","singulo")
message_admins("[usr] toggled particle accelerator power to [active ? "on" : "off"].")
log_admin("[usr] toggled particle accelerator power to [active ? "on" : "off"].")
if(href_list["scan"])
else if(href_list["scan"])
src.part_scan()
if(href_list["strengthup"])
src.strength++
else if(href_list["strengthup"])
strength++
if(strength > 2)
strength = 2
else
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
message_admins("[usr] increased particle accelerator power to [strength].")
log_admin("[usr] increased particle accelerator power to [strength].")
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength++
part.strength = strength
part.update_icon()
if(src.strength > 2)
src.strength = 2
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = 2
part.update_icon()
message_admins("[usr] increased particle accelerator power to [strength].")
log_admin("[usr] increased particle accelerator power to [strength].")
if(href_list["strengthdown"])
src.strength--
else if(href_list["strengthdown"])
strength--
if(strength < 0)
strength = 0
else
message_admins("[usr] decreased particle accelerator power to [strength].")
log_admin("[usr] decreased particle accelerator power to [strength].")
investigate_log("decreased to <font color='green'>[strength]</font> by [usr.key]","singulo")
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength--
part.strength = strength
part.update_icon()
if(src.strength < 0)
src.strength = 0
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = 0
part.update_icon()
message_admins("[usr] decreased particle accelerator power to [strength].")
log_admin("[usr] decreased particle accelerator power to [strength].")
src.updateDialog()
src.update_icon()
return
@@ -124,14 +123,15 @@
process()
if(src.active)
//a part is missing!
if( length(connected_parts) < 6 )
investigate_log("lost a connected part; It <font color='red'>powered down</font>.","singulo")
src.toggle_power()
return
//emit some particles
for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts)
if(PE)
PE.emit_particle(src.strength)
// for(var/obj/structure/particle_accelerator/fuel_chamber/PF in connected_parts)
// PF.doshit()
// for(var/obj/structure/particle_accelerator/power_box/PB in connected_parts)
// PB.doshit()
//finish up putting the fuel run and power use things in here
return
@@ -42,6 +42,7 @@ var/global/list/uneatable = list(
count = 1
break
if(!count) message_admins("A singulo has been created without containment fields active ([x],[y],[z])",1)
investigate_log("was created. [count?"":"<font color='red'>No containment fields were active</font>"]","singulo")
src.energy = starting_energy
if(temp)
@@ -184,6 +185,7 @@ var/global/list/uneatable = list(
consume_range = 4
dissipate = 0 //It cant go smaller due to e loss
if(current_size == allowed_size)
investigate_log("<font color='red'>grew to size [current_size]</font>","singulo")
return 1
else if(current_size < (--temp_allowed_size))
expand(temp_allowed_size)
+1 -1
View File
@@ -294,7 +294,7 @@
output += d
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
src.updateUsrDialog()
else
+4 -2
View File
@@ -5,7 +5,8 @@
desc = "A bullet casing."
icon = 'ammo.dmi'
icon_state = "s-casing"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 1
w_class = 1.0
var/caliber = "" //Which kind of guns it can be loaded into
@@ -29,7 +30,8 @@
desc = "A box of ammo"
icon_state = "357"
icon = 'ammo.dmi'
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
item_state = "syringe_kit"
m_amt = 50000
throwforce = 2
+21 -18
View File
@@ -4,7 +4,8 @@
icon = 'gun.dmi'
icon_state = "detective"
item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BELT
m_amt = 2000
w_class = 3.0
throwforce = 5
@@ -13,19 +14,18 @@
force = 5.0
origin_tech = "combat=1"
var
fire_sound = 'Gunshot.ogg'
tmp/obj/item/projectile/in_chamber = null
caliber = ""
silenced = 0
recoil = 0
ejectshell = 1
tmp/list/mob/living/target //List of who yer targeting.
tmp/lock_time = -100
tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
automatic = 0 //Used to determine if you can target multiple people.
tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
var/fire_sound = 'Gunshot.ogg'
var/tmp/obj/item/projectile/in_chamber = null
var/caliber = ""
var/silenced = 0
var/recoil = 0
var/ejectshell = 1
var/tmp/list/mob/living/target //List of who yer targeting.
var/tmp/lock_time = -100
var/tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
var/automatic = 0 //Used to determine if you can target multiple people.
var/tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
proc/load_into_chamber()
return 0
@@ -165,14 +165,16 @@
if (!istype(targloc) || !istype(curloc))
return
if(!special_check(user)) return
if(!special_check(user))
return
if(!load_into_chamber())
user.visible_message("*click click*", "\red <b>*click*</b>")
for(var/mob/K in viewers(usr))
K << 'empty.ogg'
return
if(!in_chamber) return
if(!in_chamber)
return
in_chamber.firer = user
in_chamber.def_zone = user.zone_sel.selecting
@@ -191,7 +193,7 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
user.visible_message("\red [user] fires the [src]!", "\red You fire the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
user.visible_message("\red [user] fires \the [src]!", "\red You fire \the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
in_chamber.original = targloc
in_chamber.loc = get_turf(user)
@@ -210,7 +212,8 @@
in_chamber.p_y = text2num(mouse_control["icon-y"])
spawn()
if(in_chamber) in_chamber.fired()
if(in_chamber)
in_chamber.fired()
sleep(1)
in_chamber = null
@@ -5,7 +5,8 @@
fire_sound = 'Laser.ogg'
origin_tech = "combat=2;magnets=4"
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
charge_cost = 100
projectile_type = "/obj/item/projectile/ion"
@@ -27,7 +28,8 @@ obj/item/weapon/gun/energy/staff
icon_state = "staffofchange"
item_state = "staffofchange"
fire_sound = 'emitter.ogg'
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
w_class = 4.0
charge_cost = 200
projectile_type = "/obj/item/projectile/change"
@@ -8,7 +8,8 @@
max_shells = 4
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
@@ -67,7 +68,8 @@
max_shells = 2
w_class = 4.0
force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
@@ -125,8 +127,8 @@
item_state = "sawnshotgun"
w_class = 3.0
item_state = "gun"
flags &= ~ONBACK //you can't sling it on your back
flags |= ONBELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
slot_flags &= ~SLOT_BACK //you can't sling it on your back
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
name = "sawn-off shotgun"
desc = "Omar's coming!"
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"
+2 -92
View File
@@ -494,96 +494,6 @@
else
return ..()
//The toilet does not need to pressurized but can only handle small items.
//You can also choke people by dunking them into the toilet.
/obj/machinery/disposal/toilet
name = "toilet"
desc = "A torque rotation-based, waste disposal unit for small matter."
icon_state = "toilet"
density = 0//So you can stand on it.
mode = 2
attackby(var/obj/item/I, var/mob/user)
if( !(stat & BROKEN) )
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(istype(G)) // handle grabbed mob
if(ismob(G.affecting))
var/mob/GM = G.affecting
for (var/mob/V in viewers(usr))
V.show_message("[user] dunks [GM.name] into the toilet!", 3)
if(do_after(user, 30))
if(G && G.state>1 && !GM.internal)
GM.oxyloss += 5
else if(I.w_class < 4)
user.drop_item()
I.loc = src
user << "You place \the [I] into the [src]."
for(var/mob/M in viewers(src))
if(M == user)
continue
M.show_message("[user.name] places \the [I] into the [src].", 3)
else
user << "\red That item cannot be placed into the toilet."
return
MouseDrop_T(mob/target, mob/user)
if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
return//Damn that list is long
for (var/mob/V in viewers(usr))
if(target == user && !user.stat)
V.show_message("[user] sits on the toilet.", 3)
if(target != user && !user.restrained())
V.show_message("[user] places [target.name] on the toilet.", 3)
target.loc = loc
return
interact(mob/user)
if(isAI(user) || isrobot(user))
return
add_fingerprint(user)
for (var/mob/V in viewers(user))
V.show_message("[user] eagerly drinks the toilet water!", 3)//Yum yum yum
return
update()
overlays = null
if( !(stat & BROKEN) )
if(flush)
overlays += image('disposal.dmi',"toilet-handle",,dir)
if( !(stat & NOPOWER) )
overlays += image('disposal.dmi',"toilet-ready",,dir)
else
icon_state = "toilet-broken"
mode = 0
flush = 0
return
process()
if( !((stat & BROKEN)||(stat & NOPOWER)) )// nothing can happen if broken or not powered.
updateDialog()
if(!flush&&contents.len)
flush++
flush()
use_power(100)// base power usage
update()
return
flush()
flick("toilet-flush", src)
var/obj/structure/disposalholder/H = new()
H.init(src)
sleep(10)
playsound(src, 'disposalflush.ogg', 50, 0, 0)
sleep(30) // To prevent spam.
H.start(src)
flush--
update()
return
// virtual disposal object
// travels through pipes in lieu of actual items
// contents will be items flushed by the disposal
@@ -602,8 +512,8 @@
// initialize a holder from the contents of a disposal unit
proc/init(var/obj/machinery/disposal/D)
if(!istype(D, /obj/machinery/disposal/toilet))//So it does not drain gas from a toilet which does not function on it.
gas = D.air_contents// transfer gas resv. into holder object
gas = D.air_contents// transfer gas resv. into holder object
// now everything inside the disposal gets put into the holder
// note AM since can contain mobs or objs
+98 -49
View File
@@ -19,7 +19,7 @@
proc/unwrap()
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
wrapped.loc = (get_turf(src.loc))
wrapped.loc = (get_turf(loc))
if(istype(wrapped, /obj/structure/closet))
var/obj/structure/closet/O = wrapped
O.welded = waswelded
@@ -47,7 +47,7 @@
if(istype(W, /obj/item/device/destTagger))
var/obj/item/device/destTagger/O = W
user << "\blue *TAGGED*"
src.sortTag = O.currTag
sortTag = O.currTag
update_icon()
else if(istype(W, /obj/item/weapon/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
@@ -56,9 +56,10 @@
if(!str || !length(str))
usr << "\red Invalid text."
return
for(var/mob/M in viewers())
M << "\blue [user] labels [src] as [str]."
src.name = "[src.name] ([str])"
user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[examtext]\"",\
"\blue You title \the [src]: \"[examtext]\"",\
"You hear someone scribbling a note.")
name = "[name] ([str])"
update_icon()
if("Description")
var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
@@ -66,8 +67,9 @@
usr << "\red Invalid text."
return
examtext = str
for(var/mob/M in viewers())
M << "\blue [user] labels [src] with the note: [examtext]."
user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\
"\blue You label \the [src]: \"[examtext]\"",\
"You hear someone scribbling a note.")
update_icon()
return
@@ -87,11 +89,29 @@
F.opened = 0
break
ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if(prob(10))
del(src)
else
wrapped.loc = get_turf(src)
wrapped:welded = waswelded
del(src)
return
if(3.0)
wrapped.loc = get_turf(src)
wrapped:welded = waswelded
del(src)
return
/obj/item/smallDelivery
desc = "A small wrapped package."
name = "small parcel"
icon = 'storage.dmi'
icon_state = "deliverycrateSmall"
icon_state = "deliverycrateSmall1"
var/tmp/obj/item/wrapped = null
var/sortTag = null
flags = FPRINT
@@ -99,9 +119,8 @@
attack_self(mob/user)
if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
src.wrapped.loc = (get_turf(src.loc))
if (wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
wrapped.loc = (get_turf(loc))
del(src)
return
@@ -116,7 +135,7 @@
if(istype(W, /obj/item/device/destTagger))
var/obj/item/device/destTagger/O = W
user << "\blue *TAGGED*"
src.sortTag = O.currTag
sortTag = O.currTag
update_icon()
else if(istype(W, /obj/item/weapon/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
@@ -125,9 +144,10 @@
if(!str || !length(str))
usr << "\red Invalid text."
return
for(var/mob/M in viewers())
M << "\blue [user] labels [src] as [str]."
src.name = "[src.name] ([str])"
user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[examtext]\"",\
"\blue You title \the [src]: \"[examtext]\"",\
"You hear someone scribbling a note.")
name = "[name] ([str])"
update_icon()
if("Description")
var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
@@ -135,8 +155,9 @@
usr << "\red Invalid text."
return
examtext = str
for(var/mob/M in viewers())
M << "\blue [user] labels [src] with the note: [examtext]."
user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\
"\blue You label \the [src]: \"[examtext]\"",\
"You hear someone scribbling a note.")
update_icon()
return
@@ -149,6 +170,22 @@
..()
return
ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if(prob(40))
del(src)
else
wrapped.loc = get_turf(src)
del(src)
return
if(3.0)
wrapped.loc = get_turf(src)
del(src)
return
/obj/item/weapon/packageWrap
name = "package wrapper"
icon = 'items.dmi'
@@ -158,6 +195,8 @@
afterattack(var/obj/target as obj, mob/user as mob)
if(!in_range(target,user))
return
if(!(istype(target, /obj))) //this really shouldn't be necessary (but it is). -Pete
return
if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) || istype(target,/obj/item/smallDelivery))
@@ -167,43 +206,54 @@
if(target in user)
return
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [src.name] on \ref[target]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used \a [src] on \ref[target]</font>")
if (istype(target, /obj/item))
var/obj/item/O = target
if (src.amount > 1)
if (amount > 1)
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(O.loc)) //Aaannd wrap it up!
if(!istype(O.loc, /turf))
if(user.client)
user.client.screen -= O
P.wrapped = O
O.loc = P
src.amount -= 1
amount -= 1
P.w_class = O.w_class
P.icon_state = "deliverycrateSmall[P.w_class]"
user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\
"\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\
"You hear someone taping paper around a small object.")
else if (istype(target, /obj/structure/closet/crate))
var/obj/structure/closet/crate/O = target
if (src.amount > 3 && !O.opened)
if (amount > 3 && !O.opened)
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.icon_state = "deliverycrate"
P.wrapped = O
O.loc = P
src.amount -= 3
else if(src.amount < 3)
amount -= 3
user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\
"\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\
"You hear someone pondering a problem, using a tape measure, and taping paper around a large object.")
else if(amount < 3)
user << "\blue You need more paper."
else if (istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
if (src.amount > 3 && !O.opened)
if (amount > 3 && !O.opened)
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.wrapped = O
P.waswelded = O.welded
O.welded = 1
O.loc = P
src.amount -= 3
else if(src.amount < 3)
amount -= 3
user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\
"\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\
"You hear someone pondering a problem, using a tape measure, and taping paper around a large object.")
else if(amount < 3)
user << "\blue You need more paper."
else
user << "\blue The object you are trying to wrap is unsuitable for the sorting machinery!"
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
if (amount <= 0)
new /obj/item/weapon/c_tube( loc )
del(src)
return
return
@@ -252,7 +302,8 @@
w_class = 1
item_state = "electronic"
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
attack_self(mob/user as mob)
interact(user)
@@ -275,15 +326,15 @@
Topic(href, href_list)
usr.machine = src
src.add_fingerprint(usr)
add_fingerprint(usr)
if(href_list["nextTag"])
var/n = text2num(href_list["nextTag"])
if(n > locationList.len)
var/t1 = input("Which tag?","Tag") as null|text
if(t1)
src.currTag = t1
currTag = t1
else
src.currTag = locationList[n]
currTag = locationList[n]
if(istype(loc,/mob))
interact(loc)
else
@@ -291,18 +342,15 @@
return
attack(target as obj, mob/user as mob)
if (istype(target, /obj/structure/bigDelivery))
user << "\blue *TAGGED*"
var/obj/structure/bigDelivery/O = target
O.sortTag = src.currTag
O.update_icon()
else if (istype(target, /obj/item/smallDelivery))
user << "\blue *TAGGED*"
var/obj/item/smallDelivery/O = target
O.sortTag = src.currTag
O.update_icon()
if (istype(target, /obj/structure/bigDelivery) || istype(target, /obj/item/smallDelivery))
user.visible_message("\The [user] tags \a [target] with \a [src].", "\blue *TAGGED*",\
"You hear a short electronic click-shunk, like something being printed on a surface.")
target:sortTag = currTag
target:update_icon()
else
user << "\blue You can only tag properly wrapped delivery packages!"
user.visible_message("\The [user] tries to tag \a [target], but their [src] refuses to work on anything but packages.",\
"\blue Your [src] flashes: \"You can only tag properly wrapped delivery packages!\"",\
"You hear a short click then a sad synthesized noise.")
return
/obj/machinery/disposal/deliveryChute
@@ -311,6 +359,7 @@
density = 0
icon_state = "intake"
var/currentlyFlushing = 0
var/defaultDestination = "Disposals"
interact()
return
@@ -322,7 +371,7 @@
else if (istype(AM, /mob))
var/mob/M = AM
M.loc = src
src.flush()
flush()
flush()
flushing = 1
@@ -333,13 +382,13 @@
for(var/obj/structure/bigDelivery/O in src)
deliveryCheck = 1
if(!O.sortTag)
O.sortTag = "Disposals"
O.sortTag = defaultDestination
for(var/obj/item/smallDelivery/O in src)
deliveryCheck = 1
if (!O.sortTag)
O.sortTag = "Disposals"
O.sortTag = defaultDestination
if(deliveryCheck == 0)
H.destinationTag = "Disposals"
H.destinationTag = defaultDestination
H.init(src) // copy the contents of disposer to holder
@@ -366,11 +415,11 @@
return
CanPass(atom/A, turf/T)
if(istype(A, /mob/living)) // You Shall Not Pass!
if(istype(A, /mob/living)) // You Shall Get Sucked In And Killed!
var/mob/living/M = A
HasEntered(M)
return 0
if(istype(A, /obj)) // You Shall Not Pass!
if(istype(A, /obj)) // You Shall Get Mailed!
var/obj/M = A
HasEntered(M)
return 1
+1
View File
@@ -10,6 +10,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
name = "Circuit Imprinter"
icon_state = "circuit_imprinter"
flags = OPENCONTAINER
var/g_amount = 0
var/gold_amount = 0
var/diamond_amount = 0
+1 -1
View File
@@ -175,4 +175,4 @@ Note: Must be placed west/left of and R&D console to function.
stack.use(amount)
busy = 0
src.updateUsrDialog()
return
return
+3
View File
@@ -352,6 +352,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 0.3
linked_lathe.busy = 1
flick("protolathe_n",linked_lathe)
var/key = usr.key //so we don't lose the info during the spawn delay
spawn(16)
use_power(power)
spawn(16)
@@ -380,6 +381,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(being_built.build_path)
var/obj/new_item = new being_built.build_path(src)
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
new_item.investigate_log("built by [key]","singulo")
new_item.reliability = being_built.reliability
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
if(being_built.locked)