mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Merge remote-tracking branch 'upstream/dev' into iaasuit
This commit is contained in:
@@ -177,6 +177,10 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/SDQL_query,
|
||||
/client/proc/SDQL2_query,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptomob,
|
||||
/client/proc/jumptocoord,
|
||||
/client/proc/dsay
|
||||
)
|
||||
|
||||
var/list/admin_verbs_paranoid_debug = list(
|
||||
|
||||
@@ -27,26 +27,6 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
|
||||
return
|
||||
|
||||
|
||||
//handles adding notes to the end of a ckey's buffer
|
||||
//originally had seperate entries such as var/by to record who left the note and when
|
||||
//but the current bansystem is a heap of dung.
|
||||
/proc/notes_add(var/ckey, var/note)
|
||||
if(!ckey)
|
||||
ckey = ckey(input(usr,"Who would you like to add notes for?","Enter a ckey",null) as text|null)
|
||||
if(!ckey) return
|
||||
|
||||
if(!note)
|
||||
note = html_encode(input(usr,"Enter your note:","Enter some text",null) as message|null)
|
||||
if(!note) return
|
||||
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
notesfile.cd = "/[ckey]"
|
||||
notesfile.eof = 1 //move to the end of the buffer
|
||||
notesfile << "[time2text(world.realtime,"DD-MMM-YYYY")] | [note][(usr && usr.ckey)?" ~[usr.ckey]":""]"
|
||||
return
|
||||
|
||||
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
|
||||
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
@@ -85,7 +65,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
|
||||
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
|
||||
|
||||
/proc/notes_add(var/key, var/note, var/mob/usr)
|
||||
/proc/notes_add(var/key, var/note, var/mob/user)
|
||||
if (!key || !note)
|
||||
return
|
||||
|
||||
@@ -111,9 +91,9 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
|
||||
|
||||
var/datum/player_info/P = new
|
||||
if (usr)
|
||||
P.author = usr.key
|
||||
P.rank = usr.client.holder.rank
|
||||
if (user)
|
||||
P.author = user.key
|
||||
P.rank = user.client.holder.rank
|
||||
else
|
||||
P.author = "Adminbot"
|
||||
P.rank = "Friendly Robot"
|
||||
@@ -123,8 +103,8 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
infos += P
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(usr)] has edited [key]'s notes.")
|
||||
message_admins("\blue [key_name_admin(user)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(user)] has edited [key]'s notes.")
|
||||
|
||||
qdel(info)
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
banreason = "[banreason] (CUSTOM CID)"
|
||||
else
|
||||
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
|
||||
notes_add(playermob.ckey,banreason,usr)
|
||||
|
||||
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
|
||||
|
||||
@@ -671,7 +672,7 @@
|
||||
msg = job
|
||||
else
|
||||
msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
|
||||
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1)
|
||||
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
|
||||
M << "\red <B>The reason is: [reason]</B>"
|
||||
@@ -692,7 +693,7 @@
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
if(!msg) msg = job
|
||||
else msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
|
||||
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
|
||||
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
|
||||
M << "\red <B>The reason is: [reason]</B>"
|
||||
@@ -746,25 +747,7 @@
|
||||
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
|
||||
//M.client = null
|
||||
qdel(M.client)
|
||||
/*
|
||||
//Player Notes
|
||||
else if(href_list["notes"])
|
||||
var/ckey = href_list["ckey"]
|
||||
if(!ckey)
|
||||
var/mob/M = locate(href_list["mob"])
|
||||
if(ismob(M))
|
||||
ckey = M.ckey
|
||||
|
||||
switch(href_list["notes"])
|
||||
if("show")
|
||||
notes_show(ckey)
|
||||
if("add")
|
||||
notes_add(ckey,href_list["text"])
|
||||
notes_show(ckey)
|
||||
if("remove")
|
||||
notes_remove(ckey,text2num(href_list["from"]),text2num(href_list["to"]))
|
||||
notes_show(ckey)
|
||||
*/
|
||||
else if(href_list["removejobban"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
@@ -799,6 +782,7 @@
|
||||
return
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
||||
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
|
||||
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
|
||||
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
|
||||
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
|
||||
feedback_inc("ban_tmp",1)
|
||||
@@ -831,6 +815,7 @@
|
||||
else
|
||||
M << "\red No ban appeals URL has been set."
|
||||
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
|
||||
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
feedback_inc("ban_perma",1)
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
set name = "Jump to Area"
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
@@ -25,8 +24,7 @@
|
||||
/client/proc/jumptoturf(var/turf/T in world)
|
||||
set name = "Jump to Turf"
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
@@ -42,8 +40,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
@@ -65,8 +62,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Jump to Coordinate"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
|
||||
if (config.allow_admin_jump)
|
||||
@@ -86,8 +82,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Jump to Key"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
@@ -111,8 +106,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
@@ -128,8 +122,7 @@
|
||||
set name = "Get Key"
|
||||
set desc = "Key to teleport"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
@@ -155,8 +148,7 @@
|
||||
/client/proc/sendmob(var/mob/M in sortmobs())
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
if(!check_rights(R_ADMIN))
|
||||
usr << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
|
||||
return
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
|
||||
if(A)
|
||||
|
||||
@@ -18,16 +18,7 @@
|
||||
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
var/stafftype = null
|
||||
|
||||
if (src.holder.rights & R_MOD)
|
||||
stafftype = "MOD"
|
||||
|
||||
if (src.holder.rights & R_MENTOR)
|
||||
stafftype = "MENTOR"
|
||||
|
||||
if (src.holder.rights & R_ADMIN)
|
||||
stafftype = "ADMIN"
|
||||
var/stafftype = uppertext(holder.rank)
|
||||
|
||||
msg = sanitize(msg)
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
@@ -4,6 +4,10 @@ var/list/forbidden_varedit_object_types = list(
|
||||
/datum/feedback_variable //Prevents people messing with feedback gathering
|
||||
)
|
||||
|
||||
var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "bound_x", "bound_y", "step_x", "step_y", "force_ending")
|
||||
var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays")
|
||||
var/list/VVckey_edit = list("key", "ckey")
|
||||
|
||||
/*
|
||||
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world)
|
||||
set category = "Debug"
|
||||
@@ -44,7 +48,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as null|text//todo: sanitize ???
|
||||
var_value = input("Enter new text:","Text") as null|text
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as null|num
|
||||
@@ -72,7 +76,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return var_value
|
||||
|
||||
|
||||
/client/proc/mod_list_add(var/list/L)
|
||||
/client/proc/mod_list_add(var/list/L, atom/O, original_name, objectvar)
|
||||
|
||||
var/class = "text"
|
||||
if(src.holder && src.holder.marked_datum)
|
||||
@@ -93,7 +97,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
var_value = input("Enter new text:","Text") as text
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as num
|
||||
@@ -124,30 +128,58 @@ var/list/forbidden_varedit_object_types = list(
|
||||
L[var_value] = mod_list_add_ass() //haha
|
||||
if("No")
|
||||
L += var_value
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: ADDED=[var_value]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
|
||||
|
||||
/client/proc/mod_list(var/list/L)
|
||||
/client/proc/mod_list(var/list/L, atom/O, original_name, objectvar)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
if(!istype(L,/list)) src << "Not a List."
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
|
||||
var/list/names = sortList(L)
|
||||
if(L.len > 1000)
|
||||
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
|
||||
if(confirm != "Continue")
|
||||
return
|
||||
|
||||
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
|
||||
var/assoc = 0
|
||||
if(L.len > 0)
|
||||
var/a = L[1]
|
||||
if(istext(a) && L[a] != null)
|
||||
assoc = 1 //This is pretty weak test but i can't think of anything else
|
||||
usr << "List appears to be associative."
|
||||
|
||||
var/list/names = null
|
||||
if(!assoc)
|
||||
names = sortList(L)
|
||||
|
||||
var/variable
|
||||
var/assoc_key
|
||||
if(assoc)
|
||||
variable = input("Which var?","Var") as null|anything in L + "(ADD VAR)"
|
||||
else
|
||||
variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
|
||||
|
||||
if(variable == "(ADD VAR)")
|
||||
mod_list_add(L)
|
||||
mod_list_add(L, O, original_name, objectvar)
|
||||
return
|
||||
|
||||
if(!variable)
|
||||
if(assoc)
|
||||
assoc_key = variable
|
||||
variable = L[assoc_key]
|
||||
|
||||
if(!assoc && !variable || assoc && !assoc_key)
|
||||
return
|
||||
|
||||
var/default
|
||||
|
||||
var/dir
|
||||
|
||||
if(variable in locked)
|
||||
if(variable in VVlocked)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(variable in VVckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG)) return
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(!check_rights(R_FUN|R_DEBUG)) return
|
||||
|
||||
if(isnull(variable))
|
||||
usr << "Unable to determine variable type."
|
||||
@@ -212,14 +244,12 @@ var/list/forbidden_varedit_object_types = list(
|
||||
usr << "If a direction, direction is: [dir]"
|
||||
|
||||
var/class = "text"
|
||||
var/list/choices = list("text","num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
|
||||
if(src.holder && src.holder.marked_datum)
|
||||
choices += "marked datum ([holder.marked_datum.type])"
|
||||
if(!isnull(default) && default != "num")
|
||||
choices += "edit associated variable"
|
||||
choices += "DELETE FROM LIST"
|
||||
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in choices
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])", "DELETE FROM LIST")
|
||||
else
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default", "DELETE FROM LIST")
|
||||
|
||||
if(!class)
|
||||
return
|
||||
@@ -227,61 +257,107 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
|
||||
class = "marked datum"
|
||||
|
||||
var/original_var
|
||||
if(assoc)
|
||||
original_var = L[assoc_key]
|
||||
else
|
||||
original_var = L[L.Find(variable)]
|
||||
|
||||
var/new_var
|
||||
switch(class) //Spits a runtime error if you try to modify an entry in the contents list. Dunno how to fix it, yet.
|
||||
|
||||
if("list")
|
||||
mod_list(variable)
|
||||
mod_list(variable, O, original_name, objectvar)
|
||||
|
||||
if("restore to default")
|
||||
L[L.Find(variable)]=initial(variable)
|
||||
new_var = initial(variable)
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("edit referenced object")
|
||||
modify_variables(variable)
|
||||
|
||||
if("DELETE FROM LIST")
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[variable]")]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
|
||||
L -= variable
|
||||
return
|
||||
|
||||
if("text")
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
new_var = input("Enter new text:","Text") as text
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("num")
|
||||
L[L.Find(variable)] = input("Enter new number:","Num") as num
|
||||
new_var = input("Enter new number:","Num") as num
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("type")
|
||||
L[L.Find(variable)] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
|
||||
new_var = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("reference")
|
||||
L[L.Find(variable)] = input("Select reference:","Reference") as mob|obj|turf|area in world
|
||||
new_var = input("Select reference:","Reference") as mob|obj|turf|area in world
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("mob reference")
|
||||
L[L.Find(variable)] = input("Select reference:","Reference") as mob in world
|
||||
new_var = input("Select reference:","Reference") as mob in world
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("file")
|
||||
L[L.Find(variable)] = input("Pick file:","File") as file
|
||||
new_var = input("Pick file:","File") as file
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("icon")
|
||||
L[L.Find(variable)] = input("Pick icon:","Icon") as icon
|
||||
new_var = input("Pick icon:","Icon") as icon
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
if("marked datum")
|
||||
L[L.Find(variable)] = holder.marked_datum
|
||||
|
||||
if("edit associated variable")
|
||||
var/temp_var = mod_list_add_ass()
|
||||
if(temp_var)
|
||||
L[variable] = temp_var
|
||||
new_var = holder.marked_datum
|
||||
if(assoc)
|
||||
L[assoc_key] = new_var
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: [original_var]=[new_var]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
|
||||
|
||||
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state")
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
usr << "\red It is forbidden to edit this object's variables."
|
||||
usr << "<span class='danger'>It is forbidden to edit this object's variables.</span>"
|
||||
return
|
||||
|
||||
if(istype(O, /client) && (param_var_name == "ckey" || param_var_name == "key"))
|
||||
usr << "<span class='danger'>You cannot edit ckeys on client objects.</span>"
|
||||
return
|
||||
|
||||
var/class
|
||||
var/variable
|
||||
var/var_value
|
||||
@@ -291,8 +367,12 @@ var/list/forbidden_varedit_object_types = list(
|
||||
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
|
||||
return
|
||||
|
||||
if(param_var_name == "holder" || (param_var_name in locked))
|
||||
if(param_var_name in VVlocked)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(param_var_name in VVckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG)) return
|
||||
if(param_var_name in VVicon_edit_lock)
|
||||
if(!check_rights(R_FUN|R_DEBUG)) return
|
||||
|
||||
variable = param_var_name
|
||||
|
||||
@@ -349,8 +429,12 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if(!variable) return
|
||||
var_value = O.vars[variable]
|
||||
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(variable in VVlocked)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(variable in VVckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG)) return
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(!check_rights(R_FUN|R_DEBUG)) return
|
||||
|
||||
if(!autodetect_class)
|
||||
|
||||
@@ -440,7 +524,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("list")
|
||||
mod_list(O.vars[variable])
|
||||
mod_list(O.vars[variable], O, original_name, variable)
|
||||
return
|
||||
|
||||
if("restore to default")
|
||||
@@ -450,7 +534,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text//todo: sanitize ???
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
|
||||
if(var_new==null) return
|
||||
O.vars[variable] = var_new
|
||||
|
||||
@@ -504,5 +588,4 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
charge.charges--
|
||||
var/obj/item/weapon/grenade/new_grenade = new charge.product_type(get_turf(H))
|
||||
H.visible_message("<span class='danger'>[H] launches \a [new_grenade]!")
|
||||
H.visible_message("<span class='danger'>[H] launches \a [new_grenade]!</span>")
|
||||
new_grenade.activate(H)
|
||||
new_grenade.throw_at(target,fire_force,fire_distance)
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
firing.throw_at(target,fire_force,fire_distance)
|
||||
else
|
||||
if(H.l_hand && H.r_hand)
|
||||
H << "<span class='danger'>Your hands are full."
|
||||
H << "<span class='danger'>Your hands are full.</span>"
|
||||
else
|
||||
var/obj/item/new_weapon = new fabrication_type()
|
||||
new_weapon.loc = H
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
if(sealing)
|
||||
fail_msg = "<span class='warning'>The hardsuit is in the process of adjusting seals and cannot be activated.</span>"
|
||||
else if(!fail_msg && ((use_unconcious && user.stat > 1) || (!use_unconcious && user.stat)))
|
||||
fail_msg = "<span class='warning'>You are in no fit state to do that."
|
||||
fail_msg = "<span class='warning'>You are in no fit state to do that.</span>"
|
||||
else if(!cell)
|
||||
fail_msg = "<span class='warning'>There is no cell installed in the suit.</span>"
|
||||
else if(cost && cell.charge < cost * 10) //TODO: Cellrate?
|
||||
@@ -754,7 +754,7 @@
|
||||
|
||||
if(wearer)
|
||||
if(dam_module.damage >= 2)
|
||||
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!"
|
||||
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!</span>"
|
||||
else
|
||||
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
|
||||
dam_module.deactivate()
|
||||
|
||||
@@ -11,20 +11,11 @@
|
||||
return chest.attackby(W,user)
|
||||
|
||||
// Lock or unlock the access panel.
|
||||
if(istype(W, /obj/item/weapon/card) || istype(W, /obj/item/device/pda))
|
||||
|
||||
if(W.GetID())
|
||||
if(subverted)
|
||||
locked = 0
|
||||
user << "<span class='danger'>It looks like the locking system has been shorted out.</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card/emag))
|
||||
locked_dna = null
|
||||
req_access.Cut()
|
||||
req_one_access.Cut()
|
||||
locked = 0
|
||||
subverted = 1
|
||||
user << "<span class='danger'>You short out the access protocol for the suit.</span>"
|
||||
return
|
||||
|
||||
if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
|
||||
locked = 0
|
||||
@@ -193,4 +184,14 @@
|
||||
if(electrified != 0)
|
||||
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rig/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!subverted)
|
||||
locked_dna = null
|
||||
req_access.Cut()
|
||||
req_one_access.Cut()
|
||||
locked = 0
|
||||
subverted = 1
|
||||
user << "<span class='danger'>You short out the access protocol for the suit.</span>"
|
||||
return 1
|
||||
|
||||
@@ -55,19 +55,18 @@
|
||||
user << "Waving around a holobadge before swiping an ID would be pretty pointless."
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (emagged)
|
||||
user << "<span class='danger'>\The [src] is already cracked.</span>"
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "<span class='danger'>You crack the holobadge security checks.</span>"
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "<span class='danger'>[src] is already cracked.</span>"
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
user << "<span class='danger'>You swipe [O] and crack the holobadge security checks.</span>"
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||
|
||||
var/obj/item/weapon/card/id/id_card = null
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
else
|
||||
if(user.a_intent == I_HURT)
|
||||
usr.visible_message(
|
||||
"\red [user] draws \the [holstered], ready to shoot!</span>",
|
||||
"<span class='danger'>[user] draws \the [holstered], ready to shoot!</span>",
|
||||
"<span class='warning'>You draw \the [holstered], ready to shoot!</span>"
|
||||
)
|
||||
else
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
F.add_fingerprint(M)
|
||||
F.icon_state = "fingerprint1"
|
||||
F.name = text("FPrintC- '[M.name]'")
|
||||
user << "<span class='notice'>Done printing."
|
||||
user << "<span class='notice'>[M]'s Fingerprints: [md5(M.dna.uni_identity)]"
|
||||
user << "<span class='notice'>Done printing.</span>"
|
||||
user << "<span class='notice'>[M]'s Fingerprints: [md5(M.dna.uni_identity)]</span>"
|
||||
if ( M.blood_DNA && M.blood_DNA.len )
|
||||
user << "<span class='notice'>Blood found on [M]. Analysing...</span>"
|
||||
spawn(15)
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
screen = "details"
|
||||
current = files[href_list["identifier"]]
|
||||
else
|
||||
usr << "<spawn class='warning'>No record found.</span>"
|
||||
usr << "<span class='warning'>No record found.</span>"
|
||||
if("delete")
|
||||
if(href_list["identifier"])
|
||||
if(alert("Are you sure you want to delete this record?","Record deletion", "Yes", "No") == "Yes")
|
||||
@@ -265,7 +265,7 @@
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
else
|
||||
usr << "<spawn class='warning'>Invalid object, rejected.</span>"
|
||||
usr << "<span class='warning'>Invalid object, rejected.</span>"
|
||||
if("scan")
|
||||
if(scanning)
|
||||
scan_progress = 10
|
||||
@@ -279,7 +279,7 @@
|
||||
M.drop_item()
|
||||
qdel(I)
|
||||
else
|
||||
usr << "<spawn class='warning'>Invalid fingerprint card, rejected.</span>"
|
||||
usr << "<span class='warning'>Invalid fingerprint card, rejected.</span>"
|
||||
if("print")
|
||||
if(current)
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
|
||||
+17
-10
@@ -62,6 +62,22 @@ log transactions
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
break
|
||||
|
||||
/obj/machinery/atm/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
return
|
||||
|
||||
//short out the machine, shoot sparks, spew money!
|
||||
emagged = 1
|
||||
spark_system.start()
|
||||
spawn_money(rand(100,500),src.loc)
|
||||
//we don't want to grief people by locking their id in an emagged ATM
|
||||
release_held_id(user)
|
||||
|
||||
//display a message to the user
|
||||
var/response = pick("Initiating withdraw. Have a nice day!", "CRITICAL ERROR: Activating cash chamber panic siphon.","PIN Code accepted! Emptying account balance.", "Jackpot!")
|
||||
user << "<span class='warning'>\icon[src] The [src] beeps: \"[response]\"</span>"
|
||||
return 1
|
||||
|
||||
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/card))
|
||||
if(emagged > 0)
|
||||
@@ -69,16 +85,7 @@ log transactions
|
||||
user << "\red \icon[src] CARD READER ERROR. This system has been compromised!"
|
||||
return
|
||||
else if(istype(I,/obj/item/weapon/card/emag))
|
||||
//short out the machine, shoot sparks, spew money!
|
||||
emagged = 1
|
||||
spark_system.start()
|
||||
spawn_money(rand(100,500),src.loc)
|
||||
//we don't want to grief people by locking their id in an emagged ATM
|
||||
release_held_id(user)
|
||||
|
||||
//display a message to the user
|
||||
var/response = pick("Initiating withdraw. Have a nice day!", "CRITICAL ERROR: Activating cash chamber panic siphon.","PIN Code accepted! Emptying account balance.", "Jackpot!")
|
||||
user << "\red \icon[src] The [src] beeps: \"[response]\""
|
||||
I.resolve_attackby(src, user)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/card/id/idcard = I
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in world)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
bot.emag_act(1)
|
||||
|
||||
/datum/event/ionstorm/end()
|
||||
spawn(rand(5000,8000))
|
||||
|
||||
@@ -44,27 +44,12 @@
|
||||
for(var/area/A in world)
|
||||
if(is_type_in_list(A,areaType) && !is_type_in_list(A,areaNotType))
|
||||
areas += A
|
||||
|
||||
if(areas && areas.len > 0)
|
||||
var/pass = 0
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
|
||||
pass = 1
|
||||
if(pass) //This entire block should be handled by send_rc_message(). I'm not rewriting it.
|
||||
var/sending = rc_message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
var/keyed_department = ckey(Console.department)
|
||||
if(keyed_department == ckey("Engineering"))
|
||||
if(Console.newmessagepriority < 2)
|
||||
Console.newmessagepriority = 2
|
||||
Console.icon_state = "req_comp2"
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(5, Console.loc))
|
||||
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [my_department]'"))
|
||||
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
|
||||
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
A << "<span class='danger'>Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].</span>"
|
||||
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
/proc/send2irc(var/channel, var/msg)
|
||||
if(config.use_irc_bot && config.irc_bot_host)
|
||||
if(config.use_lib_nudge)
|
||||
var/nudge_lib
|
||||
if(world.system_type == MS_WINDOWS)
|
||||
nudge_lib = "lib\\nudge.dll"
|
||||
else
|
||||
nudge_lib = "lib/nudge.so"
|
||||
|
||||
spawn(0)
|
||||
call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[msg]")
|
||||
if(config.irc_bot_export)
|
||||
world.Export("http://[config.irc_bot_host]:45678?[list2params(list(pwd=config.comms_password, chan=channel, mesg=msg))]")
|
||||
else
|
||||
spawn(0)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]")
|
||||
if(config.use_lib_nudge)
|
||||
var/nudge_lib
|
||||
if(world.system_type == MS_WINDOWS)
|
||||
nudge_lib = "lib\\nudge.dll"
|
||||
else
|
||||
nudge_lib = "lib/nudge.so"
|
||||
|
||||
spawn(0)
|
||||
call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[msg]")
|
||||
else
|
||||
spawn(0)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]")
|
||||
return
|
||||
|
||||
/proc/send2mainirc(var/msg)
|
||||
@@ -26,6 +29,6 @@
|
||||
|
||||
|
||||
/hook/startup/proc/ircNotify()
|
||||
send2mainirc("Server starting up on [config.server? "byond://[config.server]" : "byond://[world.address]:[world.port]"]")
|
||||
send2mainirc("Server starting up on byond://[config.serverurl ? config.serverurl : (config.server ? config.server : "[world.address]:[world.port]")]")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -120,17 +120,17 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
|
||||
if(istype(D, /obj/item/weapon/card/emag))
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
last_to_emag = user //emag again to change the owner
|
||||
if (!emagged)
|
||||
emagged = 1
|
||||
safety_disabled = 1
|
||||
update_projections()
|
||||
user << "<span class='notice'>You vastly increase projector power and override the safety and security protocols.</span>"
|
||||
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
|
||||
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
|
||||
/obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
last_to_emag = user //emag again to change the owner
|
||||
if (!emagged)
|
||||
emagged = 1
|
||||
safety_disabled = 1
|
||||
update_projections()
|
||||
user << "<span class='notice'>You vastly increase projector power and override the safety and security protocols.</span>"
|
||||
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
|
||||
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -55,4 +55,5 @@
|
||||
#define TRAIT_PRODUCT_COLOUR 35
|
||||
#define TRAIT_BIOLUM 36
|
||||
#define TRAIT_BIOLUM_COLOUR 37
|
||||
#define TRAIT_IMMUTABLE 38
|
||||
#define TRAIT_IMMUTABLE 38
|
||||
#define TRAIT_FLESH_COLOUR 39
|
||||
@@ -167,8 +167,8 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(seed) seed.thrown_at(src,hit_atom)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
@@ -194,9 +194,11 @@
|
||||
else if(seed.chems)
|
||||
if(istype(W,/obj/item/weapon/material/hatchet) && !isnull(seed.chems["woodpulp"]))
|
||||
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
|
||||
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/material/wood/NG = new (user.loc)
|
||||
NG.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(flesh_colour) NG.color = flesh_colour
|
||||
for (var/obj/item/stack/material/wood/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
@@ -221,6 +223,15 @@
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/soydope(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
else if(seed.get_trait(TRAIT_FLESH_COLOUR))
|
||||
user << "You slice up \the [src]."
|
||||
var/slices = rand(3,5)
|
||||
var/reagents_to_transfer = round(reagents.total_volume/slices)
|
||||
for(var/i=i;i<=slices;i++)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/F = new(get_turf(src),seed)
|
||||
if(reagents_to_transfer) reagents.trans_to_obj(F,reagents_to_transfer)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/attack(var/mob/living/carbon/M, var/mob/user, var/def_zone)
|
||||
@@ -301,9 +312,11 @@
|
||||
|
||||
if(seed.kitchen_tag == "grass")
|
||||
user.show_message("<span class='notice'>You make a grass tile out of \the [src]!</span>", 1)
|
||||
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/tile/grass/G = new (user.loc)
|
||||
G.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(flesh_colour) G.color = flesh_colour
|
||||
for (var/obj/item/stack/tile/grass/NG in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
@@ -358,3 +371,35 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
|
||||
plantname = "ambrosia"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fruit_slice
|
||||
name = "fruit slice"
|
||||
desc = "A slice of some tasty fruit."
|
||||
icon = 'icons/obj/hydroponics_misc.dmi'
|
||||
icon_state = ""
|
||||
|
||||
var/list/fruit_icon_cache = list()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/New(var/newloc, var/datum/seed/S)
|
||||
..(newloc)
|
||||
// Need to go through and make a general image caching controller. Todo.
|
||||
if(!istype(S))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
name = "[S.seed_name] slice"
|
||||
desc = "A slice of \a [S.seed_name]. Tasty, probably."
|
||||
|
||||
var/rind_colour = S.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
var/flesh_colour = S.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = rind_colour
|
||||
if(!fruit_icon_cache["rind-[rind_colour]"])
|
||||
var/image/I = image(icon,"fruit_rind")
|
||||
I.color = rind_colour
|
||||
fruit_icon_cache["rind-[rind_colour]"] = I
|
||||
overlays |= fruit_icon_cache["rind-[rind_colour]"]
|
||||
if(!fruit_icon_cache["slice-[rind_colour]"])
|
||||
var/image/I = image(icon,"fruit_slice")
|
||||
I.color = flesh_colour
|
||||
fruit_icon_cache["slice-[rind_colour]"] = I
|
||||
overlays |= fruit_icon_cache["slice-[rind_colour]"]
|
||||
|
||||
@@ -169,8 +169,9 @@
|
||||
if(get_trait(TRAIT_BIOLUM_COLOUR))
|
||||
clr = get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
splat.set_light(get_trait(TRAIT_BIOLUM), l_color = clr)
|
||||
if(get_trait(TRAIT_PRODUCT_COLOUR))
|
||||
splat.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
var/flesh_colour = get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(flesh_colour) splat.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
|
||||
if(chems)
|
||||
for(var/mob/living/M in T.contents)
|
||||
@@ -229,7 +230,8 @@
|
||||
for(var/mob/living/M in T.contents)
|
||||
apply_special_effect(M)
|
||||
splatter(T,thrown)
|
||||
origin_turf.visible_message("<span class='danger'>The [thrown.name] explodes!</span>")
|
||||
if(origin_turf)
|
||||
origin_turf.visible_message("<span class='danger'>The [thrown.name] explodes!</span>")
|
||||
qdel(thrown)
|
||||
return
|
||||
|
||||
@@ -242,7 +244,8 @@
|
||||
|
||||
if(get_trait(TRAIT_JUICY) && splatted)
|
||||
splatter(origin_turf,thrown)
|
||||
origin_turf.visible_message("<span class='danger'>The [thrown.name] splatters against [target]!</span>")
|
||||
if(origin_turf)
|
||||
origin_turf.visible_message("<span class='danger'>The [thrown.name] splatters against [target]!</span>")
|
||||
qdel(thrown)
|
||||
|
||||
/datum/seed/proc/handle_environment(var/turf/current_turf, var/datum/gas_mixture/environment, var/light_supplied, var/check_only)
|
||||
@@ -637,7 +640,7 @@
|
||||
if(GENE_STRUCTURE)
|
||||
traits_to_copy = list(TRAIT_PLANT_ICON,TRAIT_PRODUCT_ICON,TRAIT_HARVEST_REPEAT)
|
||||
if(GENE_FRUIT)
|
||||
traits_to_copy = list(TRAIT_STINGS,TRAIT_EXPLOSIVE,TRAIT_JUICY)
|
||||
traits_to_copy = list(TRAIT_STINGS,TRAIT_EXPLOSIVE,TRAIT_FLESH_COLOUR,TRAIT_JUICY)
|
||||
if(GENE_SPECIAL)
|
||||
traits_to_copy = list(TRAIT_TELEPORTING)
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
set_trait(TRAIT_PRODUCT_ICON,"apple")
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#FF540A")
|
||||
set_trait(TRAIT_PLANT_ICON,"tree2")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#E8E39B")
|
||||
|
||||
/datum/seed/apple/poison
|
||||
name = "poisonapple"
|
||||
@@ -804,6 +805,7 @@
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#326B30")
|
||||
set_trait(TRAIT_PLANT_COLOUR,"#257522")
|
||||
set_trait(TRAIT_PLANT_ICON,"vine2")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#F22C2C")
|
||||
|
||||
/datum/seed/pumpkin
|
||||
name = "pumpkin"
|
||||
@@ -842,6 +844,7 @@
|
||||
set_trait(TRAIT_PRODUCT_ICON,"treefruit")
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#3AF026")
|
||||
set_trait(TRAIT_PLANT_ICON,"tree")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#3AF026")
|
||||
|
||||
/datum/seed/citrus/lemon
|
||||
name = "lemon"
|
||||
@@ -854,6 +857,7 @@
|
||||
..()
|
||||
set_trait(TRAIT_PRODUCES_POWER,1)
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#F0E226")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#F0E226")
|
||||
|
||||
/datum/seed/citrus/orange
|
||||
name = "orange"
|
||||
@@ -865,6 +869,7 @@
|
||||
/datum/seed/citrus/orange/New()
|
||||
..()
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#FFC20A")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#FFC20A")
|
||||
|
||||
/datum/seed/grass
|
||||
name = "grass"
|
||||
|
||||
@@ -196,16 +196,19 @@
|
||||
layer = 3
|
||||
density = 0
|
||||
|
||||
/obj/effect/plant/proc/calc_dir(turf/location = loc)
|
||||
/obj/effect/plant/proc/calc_dir()
|
||||
set background = 1
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T)) return
|
||||
|
||||
var/direction = 16
|
||||
|
||||
for(var/wallDir in cardinal)
|
||||
var/turf/newTurf = get_step(location,wallDir)
|
||||
var/turf/newTurf = get_step(T,wallDir)
|
||||
if(newTurf.density)
|
||||
direction |= wallDir
|
||||
|
||||
for(var/obj/effect/plant/shroom in location)
|
||||
for(var/obj/effect/plant/shroom in T.contents)
|
||||
if(shroom == src)
|
||||
continue
|
||||
if(shroom.floor) //special
|
||||
|
||||
@@ -575,7 +575,7 @@
|
||||
usr << "[src] is empty."
|
||||
return
|
||||
|
||||
usr << "<span class='notice'>[seed.display_name]</span> are growing here.</span>"
|
||||
usr << "<span class='notice'>[seed.display_name] are growing here.</span>"
|
||||
|
||||
if(!Adjacent(usr))
|
||||
return
|
||||
|
||||
@@ -236,10 +236,13 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
//dat += "<A HREF='?src=\ref[user];mach_close=library'>Close</A><br><br>"
|
||||
user << browse(dat, "window=library")
|
||||
onclose(user, "library")
|
||||
|
||||
/obj/machinery/librarycomp/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (src.density && !src.emagged)
|
||||
src.emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (src.density && istype(W, /obj/item/weapon/card/emag))
|
||||
src.emagged = 1
|
||||
if(istype(W, /obj/item/weapon/barcodescanner))
|
||||
var/obj/item/weapon/barcodescanner/scanner = W
|
||||
scanner.computer = src
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
desc = "A stack of sheets of [material.display_name]."
|
||||
recipes = material.get_recipes()
|
||||
stacktype = material.stack_type
|
||||
origin_tech = material.stack_origin_tech.Copy()
|
||||
if(islist(material.stack_origin_tech))
|
||||
origin_tech = material.stack_origin_tech.Copy()
|
||||
perunit = SHEET_MATERIAL_AMOUNT
|
||||
|
||||
if(apply_colour)
|
||||
@@ -47,6 +48,19 @@
|
||||
return 0
|
||||
..(S,tamount,1)
|
||||
|
||||
/obj/item/stack/material/attack_self(var/mob/user)
|
||||
if(!material.build_windows(user, src))
|
||||
..()
|
||||
|
||||
/obj/item/stack/material/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
material.build_wired_product(user, W, src)
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
material.build_rod_product(user, W, src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/material/iron
|
||||
name = "iron"
|
||||
icon_state = "sheet-silver"
|
||||
@@ -75,7 +89,7 @@
|
||||
default_type = "phoron"
|
||||
|
||||
/obj/item/stack/material/plastic
|
||||
name = "Plastic"
|
||||
name = "plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
default_type = "plastic"
|
||||
|
||||
@@ -151,3 +165,27 @@
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
default_type = "leather"
|
||||
|
||||
/obj/item/stack/material/glass
|
||||
name = "glass"
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronglass
|
||||
name = "phoron glass"
|
||||
singular_name = "phoron glass sheet"
|
||||
icon_state = "sheet-phoronglass"
|
||||
default_type = "phoron glass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronrglass
|
||||
name = "reinforced phoron glass"
|
||||
singular_name = "reinforced phoron glass sheet"
|
||||
icon_state = "sheet-phoronrglass"
|
||||
default_type = "reinforced phoron glass"
|
||||
|
||||
@@ -13,20 +13,26 @@
|
||||
matter = null
|
||||
|
||||
/obj/item/stack/material/cyborg/plastic
|
||||
icon_state = "sheet-plastic"
|
||||
default_type = "plastic"
|
||||
|
||||
/obj/item/stack/material/cyborg/steel
|
||||
icon_state = "sheet-metal"
|
||||
default_type = "steel"
|
||||
|
||||
/obj/item/stack/material/cyborg/plasteel
|
||||
icon_state = "sheet-plasteel"
|
||||
default_type = "plasteel"
|
||||
|
||||
/obj/item/stack/material/cyborg/wood
|
||||
icon_state = "sheet-wood"
|
||||
default_type = "wood"
|
||||
|
||||
/obj/item/stack/material/cyborg/glass
|
||||
icon_state = "sheet-glass"
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/cyborg/glass/reinforced
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
charge_costs = list(500, 1000)
|
||||
@@ -76,6 +76,12 @@ var/list/name_to_material
|
||||
var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn.
|
||||
var/list/composite_material // If set, object matter var will be a list containing these values.
|
||||
|
||||
// Placeholder vars for the time being, todo properly integrate windows/light tiles/rods.
|
||||
var/created_window
|
||||
var/rod_product
|
||||
var/wire_product
|
||||
var/list/window_options = list()
|
||||
|
||||
// Damage values.
|
||||
var/hardness = 60 // Prob of wall destruction by hulk, used for edge damage in weapons.
|
||||
var/weight = 20 // Determines blunt damage/throwforce for weapons.
|
||||
@@ -89,6 +95,37 @@ var/list/name_to_material
|
||||
// Wallrot crumble message.
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
|
||||
// Placeholders for light tiles and rglass.
|
||||
/material/proc/build_rod_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
|
||||
if(!rod_product)
|
||||
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
|
||||
return
|
||||
if(used_stack.get_amount() < 1 || target_stack.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one rod and one sheet of [display_name] to make anything useful.</span>"
|
||||
return
|
||||
used_stack.use(1)
|
||||
target_stack.use(1)
|
||||
var/obj/item/stack/S = new rod_product(get_turf(user))
|
||||
S.add_fingerprint(user)
|
||||
S.add_to_stacks(user)
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(S)
|
||||
|
||||
/material/proc/build_wired_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
|
||||
if(!wire_product)
|
||||
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
|
||||
return
|
||||
if(used_stack.get_amount() < 5 || target_stack.get_amount() < 1)
|
||||
user << "<span class='warning'>You need five wires and one sheet of [display_name] to make anything useful.</span>"
|
||||
return
|
||||
|
||||
used_stack.use(5)
|
||||
target_stack.use(1)
|
||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||
var/obj/item/product = new wire_product(get_turf(user))
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(product)
|
||||
|
||||
// Make sure we have a display name and shard icon even if they aren't explicitly set.
|
||||
/material/New()
|
||||
..()
|
||||
@@ -99,6 +136,10 @@ var/list/name_to_material
|
||||
if(!shard_icon)
|
||||
shard_icon = shard_type
|
||||
|
||||
// This is a placeholder for proper integration of windows/windoors into the system.
|
||||
/material/proc/build_windows(var/mob/living/user, var/obj/item/stack/used_stack)
|
||||
return 0
|
||||
|
||||
// Weapons handle applying a divisor for this value locally.
|
||||
/material/proc/get_blunt_damage()
|
||||
return weight //todo
|
||||
@@ -249,6 +290,7 @@ var/list/name_to_material
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = /obj/item/stack/material/steel
|
||||
integrity = 150
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#666666"
|
||||
@@ -262,7 +304,7 @@ var/list/name_to_material
|
||||
/material/plasteel
|
||||
name = "plasteel"
|
||||
stack_type = /obj/item/stack/material/plasteel
|
||||
integrity = 800
|
||||
integrity = 400
|
||||
melting_point = 6000
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
@@ -271,7 +313,7 @@ var/list/name_to_material
|
||||
hardness = 80
|
||||
weight = 23
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2)
|
||||
composite_material = list() //todo
|
||||
composite_material = list(DEFAULT_WALL_MATERIAL = 3750, "platinum" = 3750) //todo
|
||||
|
||||
/material/glass
|
||||
name = "glass"
|
||||
@@ -286,21 +328,82 @@ var/list/name_to_material
|
||||
weight = 15
|
||||
door_icon_base = "stone"
|
||||
destruction_desc = "shatters"
|
||||
window_options = list("One Direction", "Full Window")
|
||||
created_window = /obj/structure/window/basic
|
||||
wire_product = /obj/item/stack/light_w
|
||||
rod_product = /obj/item/stack/material/glass/reinforced
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3, TECH_PHORON = 2)
|
||||
/material/glass/build_windows(var/mob/living/user, var/obj/item/stack/used_stack)
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 2)
|
||||
composite_material = list() //todo
|
||||
if(!user || !used_stack || !created_window || !window_options.len)
|
||||
return 0
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>This task is too complex for your clumsy hands.</span>"
|
||||
return 1
|
||||
|
||||
var/turf/T = user.loc
|
||||
if(!istype(T))
|
||||
user << "<span class='warning'>You must be standing on open flooring to build a window.</span>"
|
||||
return 1
|
||||
|
||||
var/title = "Sheet-[used_stack.name] ([used_stack.get_amount()] sheet\s left)"
|
||||
var/choice = input(title, "What would you like to construct?") as null|anything in window_options
|
||||
|
||||
if(!choice || !used_stack || !user || used_stack.loc != user || user.stat || user.loc != T)
|
||||
return 1
|
||||
|
||||
// Get data for building windows here.
|
||||
var/list/possible_directions = cardinal.Copy()
|
||||
var/window_count = 0
|
||||
for (var/obj/structure/window/check_window in user.loc)
|
||||
window_count++
|
||||
possible_directions -= check_window.dir
|
||||
|
||||
// Get the closest available dir to the user's current facing.
|
||||
var/build_dir = SOUTHWEST //Default to southwest for fulltile windows.
|
||||
var/failed_to_build
|
||||
|
||||
if(window_count >= 4)
|
||||
failed_to_build = 1
|
||||
else
|
||||
if(choice in list("One Direction","Windoor"))
|
||||
if(possible_directions.len)
|
||||
for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
|
||||
if(direction in possible_directions)
|
||||
build_dir = direction
|
||||
break
|
||||
else
|
||||
failed_to_build = 1
|
||||
if(!failed_to_build && choice == "Windoor")
|
||||
if(!is_reinforced())
|
||||
user << "<span class='warning'>This material is not reinforced enough to use for a door.</span>"
|
||||
return
|
||||
if((locate(/obj/structure/windoor_assembly) in T.contents) || (locate(/obj/machinery/door/window) in T.contents))
|
||||
failed_to_build = 1
|
||||
if(failed_to_build)
|
||||
user << "<span class='warning'>There is no room in this location.</span>"
|
||||
return 1
|
||||
|
||||
var/build_path = /obj/structure/windoor_assembly
|
||||
var/sheets_needed = 4
|
||||
if(choice == "Windoor")
|
||||
sheets_needed = 5
|
||||
build_dir = user.dir
|
||||
else
|
||||
build_path = created_window
|
||||
|
||||
if(used_stack.get_amount() < sheets_needed)
|
||||
user << "<span class='warning'>You need at least [sheets_needed] sheets to build this.</span>"
|
||||
return 1
|
||||
|
||||
// Build the structure and update sheet count etc.
|
||||
used_stack.use(sheets_needed)
|
||||
new build_path(T, build_dir, 1)
|
||||
return 1
|
||||
|
||||
/material/glass/proc/is_reinforced()
|
||||
return (hardness > 35) //todo
|
||||
|
||||
/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
@@ -313,8 +416,36 @@ var/list/name_to_material
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
hardness = 40
|
||||
weight = 30
|
||||
stack_origin_tech = "materials=2"
|
||||
composite_material = list(DEFAULT_WALL_MATERIAL = 1875,"glass" = 3750)
|
||||
window_options = list("One Direction", "Full Window", "Windoor")
|
||||
created_window = /obj/structure/window/reinforced
|
||||
wire_product = null
|
||||
rod_product = null
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3, TECH_PHORON = 2)
|
||||
created_window = /obj/structure/window/phoronbasic
|
||||
wire_product = null
|
||||
rod_product = /obj/item/stack/material/glass/phoronrglass
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 2)
|
||||
composite_material = list() //todo
|
||||
created_window = /obj/structure/window/phoronreinforced
|
||||
hardness = 40
|
||||
weight = 30
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2)
|
||||
composite_material = list() //todo
|
||||
rod_product = null
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
@@ -327,6 +458,12 @@ var/list/name_to_material
|
||||
weight = 12
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3)
|
||||
|
||||
/material/plastic/holographic
|
||||
name = "holographic plastic"
|
||||
display_name = "plastic"
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/osmium
|
||||
name = "osmium"
|
||||
stack_type = /obj/item/stack/material/osmium
|
||||
|
||||
@@ -171,12 +171,14 @@
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (locked)
|
||||
user << "<span class='notice'>The crate unlocks!</span>"
|
||||
locked = 0
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
user << "<span class='notice'>The crate unlocks!</span>"
|
||||
locked = 0
|
||||
if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
|
||||
user << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
|
||||
if (attempts == 1)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//added different sort of gibs and animations. N
|
||||
/mob/proc/gib(anim="gibbed-m",do_gibs)
|
||||
death(1)
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
@@ -28,7 +28,7 @@
|
||||
/mob/proc/dust(anim="dust-m",remains=/obj/effect/decal/cleanable/ash)
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/death(gibbed, deathmessage="seizes up and falls limp...")
|
||||
if(..())
|
||||
if(..(gibbed, deathmessage))
|
||||
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
|
||||
cultnet.updateVisibility(src)
|
||||
|
||||
|
||||
@@ -197,18 +197,18 @@
|
||||
return "<span class='say_quote'>\[[worldtime2text()]\]</span>"
|
||||
|
||||
/mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
src << "[part_a][speaker_name][part_b][formatted]</span></span>"
|
||||
src << "[part_a][speaker_name][part_b][formatted]"
|
||||
|
||||
/mob/dead/observer/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
src << "[part_a][track][part_b][formatted]</span></span>"
|
||||
src << "[part_a][track][part_b][formatted]"
|
||||
|
||||
/mob/living/silicon/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
var/time = say_timestamp()
|
||||
src << "[time][part_a][speaker_name][part_b][formatted]</span></span>"
|
||||
src << "[time][part_a][speaker_name][part_b][formatted]"
|
||||
|
||||
/mob/living/silicon/ai/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
var/time = say_timestamp()
|
||||
src << "[time][part_a][track][part_b][formatted]</span></span>"
|
||||
src << "[time][part_a][track][part_b][formatted]"
|
||||
|
||||
/mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null)
|
||||
if(!client)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/flags = 0 // Various language flags.
|
||||
var/native // If set, non-native speakers will have trouble speaking.
|
||||
var/list/syllables // Used when scrambling text for a non-speaker.
|
||||
var/list/space_chance = 55 // Likelihood of getting a space in the random scramble string.
|
||||
var/list/space_chance = 55 // Likelihood of getting a space in the random scramble string
|
||||
|
||||
/datum/language/proc/get_random_name(var/gender, name_count=2, syllable_count=4)
|
||||
if(!syllables || !syllables.len)
|
||||
@@ -101,11 +101,22 @@
|
||||
log_say("[key_name(speaker)] : ([name]) [message]")
|
||||
|
||||
if(!speaker_mask) speaker_mask = speaker.name
|
||||
var/msg = "<i><span class='game say'>[name], <span class='name'>[speaker_mask]</span> [format_message(message, get_spoken_verb(message))]</span></i>"
|
||||
|
||||
for(var/mob/player in player_list)
|
||||
if(istype(player,/mob/dead) || ((src in player.languages) && check_special_condition(player)))
|
||||
player << msg
|
||||
player.hear_broadcast(src, speaker, speaker_mask, format_message(message, get_spoken_verb(message)))
|
||||
|
||||
/mob/proc/hear_broadcast(var/datum/language/language, var/speaker, var/message)
|
||||
if((language in languages) && language.check_special_condition(src))
|
||||
var/msg = "<i><span class='game say'>[language.name], <span class='name'>[speaker]</span> [message]</span></i>"
|
||||
src << msg
|
||||
|
||||
/mob/new_player/hear_broadcast()
|
||||
return
|
||||
|
||||
/mob/dead/observer/hear_broadcast(var/datum/language/language, var/mob/speaker, var/speaker_name, var/message)
|
||||
if(speaker.name == speaker_name || antagHUD)
|
||||
src << "<i><span class='game say'>[language.name], <span class='name'>[speaker_name]</span> ([ghost_follow_link(speaker, src)]) [message]</span></i>"
|
||||
else
|
||||
src << "<i><span class='game say'>[language.name], <span class='name'>[speaker_name]</span> [message]</span></i>"
|
||||
|
||||
/datum/language/proc/check_special_condition(var/mob/other)
|
||||
return 1
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
||||
M.show_message("[message_start] [message_body]", 2)
|
||||
M.show_message("[message_start] ([ghost_follow_link(speaker, M)]) [message_body]", 2)
|
||||
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
|
||||
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
|
||||
continue
|
||||
else if(istype(S , /mob/living/silicon/ai))
|
||||
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[speaker];trackname=[html_encode(speaker.name)]'><span class='name'>[speaker.name]</span></a>"
|
||||
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[speaker];trackname=[html_encode(speaker.name)]'><span class='name'>[speaker.name]</span></a></span>"
|
||||
else if (!S.binarycheck())
|
||||
continue
|
||||
|
||||
|
||||
@@ -80,9 +80,6 @@
|
||||
else
|
||||
user << "<span class='notice'>[src] does not need a repair.</span>"
|
||||
return
|
||||
else if (istype(O, /obj/item/weapon/card/emag) && !emagged)
|
||||
Emag(user)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -102,9 +99,8 @@
|
||||
if(!istype(D, /obj/machinery/door/firedoor) && !istype(D, /obj/machinery/door/blast) && D.check_access(botcard))
|
||||
D.open()
|
||||
|
||||
/mob/living/bot/proc/Emag(var/mob/user)
|
||||
log_and_message_admins("emagged [src]")
|
||||
return
|
||||
/mob/living/bot/emag_act(var/remaining_charges, var/mob/user)
|
||||
return 0
|
||||
|
||||
/mob/living/bot/proc/turn_on()
|
||||
if(stat)
|
||||
|
||||
@@ -232,12 +232,14 @@
|
||||
usr << "<span class='notice'>You press the weird button.</span>"
|
||||
attack_hand(usr)
|
||||
|
||||
/mob/living/bot/cleanbot/Emag(var/mob/user)
|
||||
..()
|
||||
if(user)
|
||||
user << "<span class='notice'>The [src] buzzes and beeps.</span>"
|
||||
oddbutton = 1
|
||||
screwloose = 1
|
||||
/mob/living/bot/cleanbot/emag_act(var/remaining_uses, var/mob/user)
|
||||
. = ..()
|
||||
if(!screwloose || !oddbutton)
|
||||
if(user)
|
||||
user << "<span class='notice'>The [src] buzzes and beeps.</span>"
|
||||
oddbutton = 1
|
||||
screwloose = 1
|
||||
return 1
|
||||
|
||||
/mob/living/bot/cleanbot/proc/get_targets()
|
||||
target_types = list()
|
||||
|
||||
@@ -64,13 +64,15 @@
|
||||
onclose(user, "autofarm")
|
||||
return
|
||||
|
||||
/mob/living/bot/farmbot/Emag(var/mob/user)
|
||||
..()
|
||||
if(user)
|
||||
user << "<span class='notice'>You short out [src]'s plant identifier circuits.</span>"
|
||||
spawn(rand(30, 50))
|
||||
visible_message("<span class='warning'>[src] buzzes oddly.</span>")
|
||||
emagged = 1
|
||||
/mob/living/bot/farmbot/emag_act(var/remaining_charges, var/mob/user)
|
||||
. = ..()
|
||||
if(!emagged)
|
||||
if(user)
|
||||
user << "<span class='notice'>You short out [src]'s plant identifier circuits.</span>"
|
||||
spawn(rand(30, 50))
|
||||
visible_message("<span class='warning'>[src] buzzes oddly.</span>")
|
||||
emagged = 1
|
||||
return 1
|
||||
|
||||
/mob/living/bot/farmbot/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -47,11 +47,13 @@
|
||||
onclose(user, "autorepair")
|
||||
return
|
||||
|
||||
/mob/living/bot/floorbot/Emag(var/mob/user)
|
||||
..()
|
||||
emagged = 1
|
||||
if(user)
|
||||
user << "<span class='notice'>The [src] buzzes and beeps.</span>"
|
||||
/mob/living/bot/floorbot/emag_act(var/remaining_charges, var/mob/user)
|
||||
. = ..()
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
if(user)
|
||||
user << "<span class='notice'>The [src] buzzes and beeps.</span>"
|
||||
return 1
|
||||
|
||||
/mob/living/bot/floorbot/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -219,8 +219,8 @@
|
||||
attack_hand(usr)
|
||||
return
|
||||
|
||||
/mob/living/bot/medbot/Emag(var/mob/user)
|
||||
..()
|
||||
/mob/living/bot/medbot/emag_act(var/remaining_uses, var/mob/user)
|
||||
. = ..()
|
||||
if(!emagged)
|
||||
if(user)
|
||||
user << "<span class='warning'>You short out [src]'s reagent synthesis circuits.</span>"
|
||||
@@ -231,6 +231,7 @@
|
||||
emagged = 1
|
||||
on = 1
|
||||
update_icons()
|
||||
. = 1
|
||||
ignored |= user
|
||||
|
||||
/mob/living/bot/medbot/explode()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (monkeyizing) return
|
||||
if (transforming) return
|
||||
if(!loc) return
|
||||
|
||||
..()
|
||||
@@ -14,17 +14,11 @@
|
||||
// GROW!
|
||||
update_progression()
|
||||
|
||||
// Radiation.
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
// Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
blinded = null
|
||||
|
||||
if(loc)
|
||||
handle_environment(loc.return_air())
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
update_canmove()
|
||||
@@ -36,7 +30,7 @@
|
||||
/mob/living/carbon/alien/proc/handle_chemicals_in_body()
|
||||
return // Nothing yet. Maybe check it out at a later date.
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
|
||||
/mob/living/carbon/alien/handle_mutations_and_radiation()
|
||||
|
||||
// Currently both Dionaea and larvae like to eat radiation, so I'm defining the
|
||||
// rad absorbtion here. This will need to be changed if other baby aliens are added.
|
||||
@@ -174,7 +168,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
/mob/living/carbon/alien/handle_environment(var/datum/gas_mixture/environment)
|
||||
// Both alien subtypes survive in vaccum and suffer in high temperatures,
|
||||
// so I'll just define this once, for both (see radiation comment above)
|
||||
if(!environment) return
|
||||
|
||||
@@ -1,29 +1,21 @@
|
||||
/mob/living/carbon/brain/handle_breathing()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
..()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
blinded = null
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment) // More error checking -- TLE
|
||||
handle_environment(environment)
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
update_canmove()
|
||||
@@ -31,238 +23,227 @@
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
/mob/living/carbon/brain/handle_mutations_and_radiation()
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
if(!container)//If it's not in an MMI
|
||||
src << "\red You feel weak."
|
||||
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
|
||||
src << "\red STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED."
|
||||
|
||||
/mob/living/carbon/brain/
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
if(!container)//If it's not in an MMI
|
||||
src << "\red You feel weak."
|
||||
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
|
||||
src << "\red STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED."
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
if(!container)
|
||||
src << "\red You feel weak."
|
||||
else
|
||||
src << "\red STATUS: DANGEROUS LEVELS OF RADIATION DETECTED."
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
if(!container)
|
||||
src << "\red You feel weak."
|
||||
else
|
||||
src << "\red STATUS: DANGEROUS LEVELS OF RADIATION DETECTED."
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
|
||||
proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
environment_heat_capacity = heat_turf.heat_capacity
|
||||
/mob/living/carbon/brain/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
environment_heat_capacity = heat_turf.heat_capacity
|
||||
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient = 1
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient = 1
|
||||
|
||||
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
//Account for massive pressure differences
|
||||
|
||||
return //TODO: DEFERRED
|
||||
return //TODO: DEFERRED
|
||||
|
||||
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(status_flags & GODMODE) return
|
||||
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(status_flags & GODMODE) return
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
//adjustFireLoss(5.0*discomfort)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
//adjustFireLoss(5.0*discomfort)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
else
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
|
||||
/mob/living/carbon/brain/proc/handle_chemicals_in_body()
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
if(touching) touching.metabolize()
|
||||
if(ingested) ingested.metabolize()
|
||||
if(bloodstr) bloodstr.metabolize()
|
||||
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
updatehealth()
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
return //TODO: DEFERRED
|
||||
|
||||
updatehealth()
|
||||
/mob/living/carbon/brain/proc/handle_regular_status_updates() //TODO: comment out the unused bits >_>
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
proc/handle_regular_status_updates() //TODO: comment out the unused bits >_>
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
|
||||
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
emp_damage = 0
|
||||
else
|
||||
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
|
||||
switch(emp_damage)
|
||||
if(31 to INFINITY)
|
||||
emp_damage = 30//Let's not overdo it
|
||||
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
|
||||
eye_blind = 1
|
||||
blinded = 1
|
||||
ear_deaf = 1
|
||||
silent = 1
|
||||
if(!alert)//Sounds an alarm, but only once per 'level'
|
||||
emote("alarm")
|
||||
src << "\red Major electrical distruption detected: System rebooting."
|
||||
alert = 1
|
||||
if(prob(75))
|
||||
emp_damage -= 1
|
||||
if(20)
|
||||
alert = 0
|
||||
blinded = 0
|
||||
eye_blind = 0
|
||||
ear_deaf = 0
|
||||
silent = 0
|
||||
emp_damage -= 1
|
||||
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
|
||||
eye_blurry = 1
|
||||
ear_damage = 1
|
||||
if(!alert)
|
||||
emote("alert")
|
||||
src << "\red Primary systems are now online."
|
||||
alert = 1
|
||||
if(prob(50))
|
||||
emp_damage -= 1
|
||||
if(10)
|
||||
alert = 0
|
||||
eye_blurry = 0
|
||||
ear_damage = 0
|
||||
emp_damage -= 1
|
||||
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
|
||||
if(!alert)
|
||||
emote("notice")
|
||||
src << "\red System reboot nearly complete."
|
||||
alert = 1
|
||||
if(prob(25))
|
||||
emp_damage -= 1
|
||||
if(1)
|
||||
alert = 0
|
||||
src << "\red All systems restored."
|
||||
emp_damage -= 1
|
||||
|
||||
//Other
|
||||
handle_statuses()
|
||||
return 1
|
||||
|
||||
|
||||
proc/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
|
||||
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
emp_damage = 0
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
|
||||
switch(emp_damage)
|
||||
if(31 to INFINITY)
|
||||
emp_damage = 30//Let's not overdo it
|
||||
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
|
||||
eye_blind = 1
|
||||
blinded = 1
|
||||
ear_deaf = 1
|
||||
silent = 1
|
||||
if(!alert)//Sounds an alarm, but only once per 'level'
|
||||
emote("alarm")
|
||||
src << "\red Major electrical distruption detected: System rebooting."
|
||||
alert = 1
|
||||
if(prob(75))
|
||||
emp_damage -= 1
|
||||
if(20)
|
||||
alert = 0
|
||||
blinded = 0
|
||||
eye_blind = 0
|
||||
ear_deaf = 0
|
||||
silent = 0
|
||||
emp_damage -= 1
|
||||
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
|
||||
eye_blurry = 1
|
||||
ear_damage = 1
|
||||
if(!alert)
|
||||
emote("alert")
|
||||
src << "\red Primary systems are now online."
|
||||
alert = 1
|
||||
if(prob(50))
|
||||
emp_damage -= 1
|
||||
if(10)
|
||||
alert = 0
|
||||
eye_blurry = 0
|
||||
ear_damage = 0
|
||||
emp_damage -= 1
|
||||
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
|
||||
if(!alert)
|
||||
emote("notice")
|
||||
src << "\red System reboot nearly complete."
|
||||
alert = 1
|
||||
if(prob(25))
|
||||
emp_damage -= 1
|
||||
if(1)
|
||||
alert = 0
|
||||
src << "\red All systems restored."
|
||||
emp_damage -= 1
|
||||
|
||||
if (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
//Other
|
||||
handle_statuses()
|
||||
return 1
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
/mob/living/carbon/brain/proc/handle_regular_hud_updates()
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
|
||||
return 1
|
||||
if (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/*/mob/living/carbon/brain/emp_act(severity)
|
||||
|
||||
@@ -5,41 +5,47 @@
|
||||
icon_state = "posibrain"
|
||||
w_class = 3
|
||||
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
|
||||
var/searching = 0
|
||||
|
||||
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
|
||||
construction_time = 75
|
||||
var/searching = 0
|
||||
var/askDelay = 10 * 60 * 1
|
||||
req_access = list(access_robotics)
|
||||
locked = 0
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/New()
|
||||
..()
|
||||
brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
brainmob.real_name = src.brainmob.name
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/attack_self(var/mob/user)
|
||||
if(brainmob && !brainmob.key && !searching)
|
||||
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user as mob)
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
user << "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>"
|
||||
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
|
||||
icon_state = "posibrain-searching"
|
||||
searching = 1
|
||||
var/datum/ghosttrap/G = get_ghost_trap("positronic brain")
|
||||
G.request_player(brainmob, "A [src.name] has been booted by \the [user] in [get_area(user)]. ")
|
||||
src.searching = 1
|
||||
src.request_player()
|
||||
spawn(600) reset_search()
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/attack_ghost(var/mob/dead/observer/user)
|
||||
var/datum/ghosttrap/G = get_ghost_trap("positronic brain")
|
||||
if(!G.assess_candidate(user))
|
||||
return
|
||||
var/response = alert(user, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
if(G.transfer_personality(user, brainmob))
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='notice'>\The [src] chimes quietly.</span>")
|
||||
searching = 0
|
||||
name = "positronic brain ([brainmob.name])"
|
||||
icon_state = "posibrain-occupied"
|
||||
return
|
||||
/obj/item/device/mmi/digital/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(!O.MayRespawn())
|
||||
continue
|
||||
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_AI)
|
||||
question(O.client)
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
|
||||
if(response == "Yes")
|
||||
response = alert(C, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
|
||||
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_AI
|
||||
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/transfer_identity(var/mob/living/carbon/H)
|
||||
..()
|
||||
@@ -49,19 +55,40 @@
|
||||
icon_state = "posibrain-occupied"
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/reset_search()
|
||||
if(!searching || (src.brainmob && src.brainmob.key))
|
||||
return
|
||||
searching = 0
|
||||
/obj/item/device/mmi/digital/posibrain/proc/transfer_personality(var/mob/candidate)
|
||||
announce_ghost_joinleave(candidate, 0, "They are occupying a positronic brain now.")
|
||||
src.searching = 0
|
||||
src.brainmob.mind = candidate.mind
|
||||
src.brainmob.ckey = candidate.ckey
|
||||
src.brainmob.mind.reset()
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
|
||||
src.brainmob.mind.assigned_role = "Positronic Brain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain chimes quietly.")
|
||||
icon_state = "posibrain-occupied"
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
|
||||
|
||||
if(src.brainmob && src.brainmob.key) return
|
||||
|
||||
src.searching = 0
|
||||
icon_state = "posibrain"
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='notice'>\The [src] brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>")
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
|
||||
if(!..(user))
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
|
||||
var/msg = "<span class='info'>*---------*</span>\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
if(src.brainmob && src.brainmob.key)
|
||||
@@ -72,7 +99,7 @@
|
||||
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
|
||||
else
|
||||
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
|
||||
msg += "<span class='info'>*---------*</span>"
|
||||
msg += "</span><span class='info'>*---------*</span>"
|
||||
user << msg
|
||||
return
|
||||
|
||||
@@ -89,3 +116,7 @@
|
||||
src.brainmob.emp_damage += rand(0,10)
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/digital/posibrain/New()
|
||||
..()
|
||||
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
src.brainmob.real_name = src.brainmob.name
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
//Common breathing procs
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/handle_breathing()
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath || (health < config.health_threshold_crit)) //First, resolve location and get a breath
|
||||
breathe()
|
||||
|
||||
/mob/living/carbon/proc/breathe()
|
||||
//if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
if(species && (species.flags & NO_BREATHE)) return
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/mob/living/carbon/New()
|
||||
create_reagents(1000)
|
||||
var/datum/reagents/R1 = new/datum/reagents(1000)
|
||||
var/datum/reagents/R2 = new/datum/reagents(1000)
|
||||
ingested = R1
|
||||
touching = R2
|
||||
R1.my_atom = src
|
||||
R2.my_atom = src
|
||||
//setup reagent holders
|
||||
bloodstr = new/datum/reagents/metabolism(1000, src, CHEM_BLOOD)
|
||||
ingested = new/datum/reagents/metabolism(1000, src, CHEM_INGEST)
|
||||
touching = new/datum/reagents/metabolism(1000, src, CHEM_TOUCH)
|
||||
reagents = bloodstr
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
@@ -210,9 +209,9 @@
|
||||
if(!org.is_usable())
|
||||
status += "dangling uselessly"
|
||||
if(status.len)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].",1)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].</span>",1)
|
||||
else
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.",1)
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.</span>",1)
|
||||
|
||||
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
@@ -259,8 +258,8 @@
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \
|
||||
"<span class='notice'>You shake [src] trying to wake [t_him] up!")
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
|
||||
"<span class='notice'>You shake [src] trying to wake [t_him] up!</span>")
|
||||
else
|
||||
if(istype(H))
|
||||
H.species.hug(H,src)
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
var/list/chem_effects = list()
|
||||
var/datum/reagents/ingested = null
|
||||
var/datum/reagents/touching = null
|
||||
var/datum/reagents/metabolism/bloodstr = null
|
||||
var/datum/reagents/metabolism/ingested = null
|
||||
var/datum/reagents/metabolism/touching = null
|
||||
|
||||
var/pulse = PULSE_NORM //current pulse level
|
||||
|
||||
@@ -699,7 +699,7 @@
|
||||
if(species.has_fine_manipulation)
|
||||
return 1
|
||||
if(!silent)
|
||||
src << "<span class='warning'>You don't have the dexterity to use that!<span>"
|
||||
src << "<span class='warning'>You don't have the dexterity to use that!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/abiotic(var/full_body = 0)
|
||||
@@ -946,7 +946,6 @@
|
||||
V.cure(src)
|
||||
|
||||
losebreath = 0
|
||||
failed_last_breath = 0 //So mobs that died of oxyloss don't revive and have perpetual out of breath.
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -438,4 +438,41 @@ emp_act
|
||||
if(!istype(wear_suit,/obj/item/clothing/suit/space)) return
|
||||
var/obj/item/clothing/suit/space/SS = wear_suit
|
||||
var/penetrated_dam = max(0,(damage - SS.breach_threshold))
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
|
||||
/mob/living/carbon/human/reagent_permeability()
|
||||
var/perm = 0
|
||||
|
||||
var/list/perm_by_part = list(
|
||||
"head" = THERMAL_PROTECTION_HEAD,
|
||||
"upper_torso" = THERMAL_PROTECTION_UPPER_TORSO,
|
||||
"lower_torso" = THERMAL_PROTECTION_LOWER_TORSO,
|
||||
"legs" = THERMAL_PROTECTION_LEG_LEFT + THERMAL_PROTECTION_LEG_RIGHT,
|
||||
"feet" = THERMAL_PROTECTION_FOOT_LEFT + THERMAL_PROTECTION_FOOT_RIGHT,
|
||||
"arms" = THERMAL_PROTECTION_ARM_LEFT + THERMAL_PROTECTION_ARM_RIGHT,
|
||||
"hands" = THERMAL_PROTECTION_HAND_LEFT + THERMAL_PROTECTION_HAND_RIGHT
|
||||
)
|
||||
|
||||
for(var/obj/item/clothing/C in src.get_equipped_items())
|
||||
if(C.permeability_coefficient == 1 || !C.body_parts_covered)
|
||||
continue
|
||||
if(C.body_parts_covered & HEAD)
|
||||
perm_by_part["head"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & UPPER_TORSO)
|
||||
perm_by_part["upper_torso"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & LOWER_TORSO)
|
||||
perm_by_part["lower_torso"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & LEGS)
|
||||
perm_by_part["legs"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & FEET)
|
||||
perm_by_part["feet"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & ARMS)
|
||||
perm_by_part["arms"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & HANDS)
|
||||
perm_by_part["hands"] *= C.permeability_coefficient
|
||||
|
||||
for(var/part in perm_by_part)
|
||||
perm += perm_by_part[part]
|
||||
|
||||
return perm
|
||||
|
||||
|
||||
@@ -71,8 +71,6 @@
|
||||
var/miming = null //Toggle for the mime's abilities.
|
||||
var/special_voice = "" // For changing our voice. Used by a symptom.
|
||||
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
|
||||
var/last_dam = -1 //Used for determining if we need to process all organs or just some or even none.
|
||||
var/list/bad_external_organs = list()// organs we check until they are good.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -426,7 +426,7 @@ var/global/list/damage_icon_parts = list()
|
||||
//For legacy support.
|
||||
/mob/living/carbon/human/regenerate_icons()
|
||||
..()
|
||||
if(monkeyizing) return
|
||||
if(transforming) return
|
||||
|
||||
update_mutations(0)
|
||||
update_body(0)
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
if(10)
|
||||
msg += "<span class='warning'><B>It is radiating with massive levels of electrical activity!</B></span>\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
msg += "*---------*"
|
||||
user << msg
|
||||
return
|
||||
@@ -2,7 +2,7 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
if (src.transforming)
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -18,18 +18,11 @@
|
||||
handle_AI()
|
||||
handle_speech_and_mood()
|
||||
|
||||
var/datum/gas_mixture/environment
|
||||
if(src.loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
regular_hud_updates()
|
||||
|
||||
if(environment)
|
||||
handle_environment(environment) // Handle temperature/pressure differences between body and environment
|
||||
|
||||
handle_regular_status_updates() // Status updates, death etc.
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
|
||||
/mob/living/carbon/slime/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustToxLoss(rand(10,20))
|
||||
return
|
||||
@@ -85,12 +78,9 @@
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
if(touching) touching.metabolize()
|
||||
if(ingested) ingested.metabolize()
|
||||
if(bloodstr) bloodstr.metabolize()
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
//drop && roll
|
||||
if(on_fire)
|
||||
fire_stacks -= 2 //reduced
|
||||
Weaken(3)
|
||||
spin(32,2)
|
||||
fire_stacks -= 2
|
||||
Weaken(5)
|
||||
spin(52,2)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>",
|
||||
"<span class='notice'>You stop, drop, and roll!</span>"
|
||||
)
|
||||
sleep(30)
|
||||
sleep(50)
|
||||
if(fire_stacks <= 0)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] has successfully extinguished themselves!</span>",
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/mob/living/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (transforming)
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
. = 1
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
|
||||
/mob/living/proc/handle_breathing()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_mutations_and_radiation()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
return
|
||||
@@ -453,6 +453,9 @@ default behaviour is:
|
||||
BITSET(hud_updateflag, HEALTH_HUD)
|
||||
BITSET(hud_updateflag, STATUS_HUD)
|
||||
BITSET(hud_updateflag, LIFE_HUD)
|
||||
|
||||
failed_last_breath = 0 //So mobs that died of oxyloss don't revive and have perpetual out of breath.
|
||||
|
||||
return
|
||||
|
||||
/mob/living/proc/UpdateDamageIcon()
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
location.hotspot_expose(fire_burn_temperature(), 50, 1)
|
||||
|
||||
/mob/living/fire_act()
|
||||
adjust_fire_stacks(0.5)
|
||||
adjust_fire_stacks(2)
|
||||
IgniteMob()
|
||||
|
||||
//Finds the effective temperature that the mob is burning at.
|
||||
@@ -245,6 +245,11 @@
|
||||
return 0
|
||||
|
||||
//Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
|
||||
//lower limit of 700 K, same as matches and roughly the temperature of a cool flame.
|
||||
return max(2.25*round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2), 700)
|
||||
|
||||
/mob/living/proc/reagent_permeability()
|
||||
return 1
|
||||
return round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2)
|
||||
|
||||
/mob/living/regular_hud_updates()
|
||||
|
||||
@@ -43,3 +43,6 @@
|
||||
var/on_fire = 0 //The "Are we on fire?" var
|
||||
var/fire_stacks
|
||||
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (src.stat == UNCONSCIOUS)
|
||||
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
msg += "*---------*"
|
||||
if(hardware && (hardware.owner == src))
|
||||
msg += "<br>"
|
||||
msg += hardware.get_examine_desc()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
if(!src.client) msg += "\nIt appears to be in stand-by mode." //afk
|
||||
if(UNCONSCIOUS) msg += "\n<span class='warning'>It doesn't seem to be responding.</span>"
|
||||
if(DEAD) msg += "\n<span class='deadsay'>It looks completely unsalvageable.</span>"
|
||||
msg += "\n*---------*</span>"
|
||||
msg += "\n*---------*"
|
||||
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
|
||||
|
||||
|
||||
@@ -186,6 +186,19 @@
|
||||
src.reset_view(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/verb/reset_record_view()
|
||||
set category = "pAI Commands"
|
||||
set name = "Reset Records Software"
|
||||
|
||||
securityActive1 = null
|
||||
securityActive2 = null
|
||||
security_cannotfind = 0
|
||||
medicalActive1 = null
|
||||
medicalActive2 = null
|
||||
medical_cannotfind = 0
|
||||
nanomanager.update_uis(src)
|
||||
usr << "<span class='notice'>You reset your record-viewing software.</span>"
|
||||
|
||||
/mob/living/silicon/pai/cancel_camera()
|
||||
set category = "pAI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
user << "\red You can't analyze non-robotic things!"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>\The [user] has analyzed [M]'s components.","<span class='notice'>You have analyzed [M]'s components.")
|
||||
user.visible_message("<span class='notice'>\The [user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
|
||||
switch(scan_type)
|
||||
if("robot")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
|
||||
@@ -102,41 +102,6 @@
|
||||
user << "<span class='danger'>\The [src] is hermetically sealed. You can't open the case.</span>"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag))
|
||||
|
||||
if(!client || stat == 2)
|
||||
user << "<span class='danger'>There's not much point subverting this heap of junk.</span>"
|
||||
return
|
||||
|
||||
if(emagged)
|
||||
src << "<span class='danger'>\The [user] attempts to load subversive software into you, but your hacked subroutines ignore the attempt.</span>"
|
||||
user << "<span class='danger'>You attempt to subvert [src], but the sequencer has no effect.</span>"
|
||||
return
|
||||
|
||||
user << "<span class='danger'>You swipe the sequencer across [src]'s interface and watch its eyes flicker.</span>"
|
||||
src << "<span class='danger'>You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.</span>"
|
||||
|
||||
var/obj/item/weapon/card/emag/emag = W
|
||||
emag.uses--
|
||||
|
||||
message_admins("[key_name_admin(user)] emagged drone [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.")
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
connected_ai = null
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
set_zeroth_law("Only [user.real_name] and people he designates as being such are operatives.")
|
||||
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and his commands.</span>"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
|
||||
if(stat == 2)
|
||||
@@ -172,6 +137,37 @@
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!client || stat == 2)
|
||||
user << "<span class='danger'>There's not much point subverting this heap of junk.</span>"
|
||||
return
|
||||
|
||||
if(emagged)
|
||||
src << "<span class='danger'>\The [user] attempts to load subversive software into you, but your hacked subroutines ignore the attempt.</span>"
|
||||
user << "<span class='danger'>You attempt to subvert [src], but the sequencer has no effect.</span>"
|
||||
return
|
||||
|
||||
user << "<span class='danger'>You swipe the sequencer across [src]'s interface and watch its eyes flicker.</span>"
|
||||
src << "<span class='danger'>You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.</span>"
|
||||
|
||||
message_admins("[key_name_admin(user)] emagged drone [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.")
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
connected_ai = null
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
set_zeroth_law("Only [user.real_name] and people he designates as being such are operatives.")
|
||||
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and his commands.</span>"
|
||||
return 1
|
||||
|
||||
//DRONE LIFE/DEATH
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(!src.client) msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
|
||||
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
|
||||
msg += "*---------*</span>"
|
||||
msg += "*---------*"
|
||||
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
if (src.transforming)
|
||||
return
|
||||
|
||||
src.blinded = null
|
||||
|
||||
@@ -622,71 +622,6 @@
|
||||
else
|
||||
user << "\red Access denied."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/card/emag)) // trying to unlock with an emag card
|
||||
if(!opened)//Cover is closed
|
||||
if(locked)
|
||||
if(prob(90))
|
||||
var/obj/item/weapon/card/emag/emag = W
|
||||
emag.uses--
|
||||
user << "You emag the cover lock."
|
||||
locked = 0
|
||||
else
|
||||
user << "You fail to emag the cover lock."
|
||||
src << "Hack attempt detected."
|
||||
else
|
||||
user << "The cover is already unlocked."
|
||||
return
|
||||
|
||||
if(opened)//Cover is open
|
||||
if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice
|
||||
if(wiresexposed)
|
||||
user << "You must close the panel first"
|
||||
return
|
||||
else
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
disconnect_from_ai()
|
||||
user << "You emag [src]'s interface."
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
set_zeroth_law("Only [user.real_name] and people he designates as being such are operatives.")
|
||||
src << "\red ALERT: Foreign software detected."
|
||||
sleep(5)
|
||||
src << "\red Initiating diagnostics..."
|
||||
sleep(20)
|
||||
src << "\red SynBorg v1.7.1 loaded."
|
||||
sleep(5)
|
||||
src << "\red LAW SYNCHRONISATION ERROR"
|
||||
sleep(5)
|
||||
src << "\red Would you like to send a report to NanoTraSoft? Y/N"
|
||||
sleep(10)
|
||||
src << "\red > N"
|
||||
sleep(20)
|
||||
src << "\red ERRORERRORERROR"
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
||||
if(src.module)
|
||||
var/rebuild = 0
|
||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
||||
qdel(D)
|
||||
rebuild = 1
|
||||
if(rebuild)
|
||||
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
|
||||
src.module.rebuild()
|
||||
updateicon()
|
||||
else
|
||||
user << "You fail to hack [src]'s interface."
|
||||
src << "Hack attempt detected."
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/borg/upgrade/))
|
||||
var/obj/item/borg/upgrade/U = W
|
||||
if(!opened)
|
||||
@@ -1097,3 +1032,70 @@
|
||||
connected_ai.connected_robots |= src
|
||||
notify_ai(ROBOT_NOTIFICATION_NEW_UNIT)
|
||||
sync()
|
||||
|
||||
/mob/living/silicon/robot/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!opened)//Cover is closed
|
||||
if(locked)
|
||||
if(prob(90))
|
||||
user << "You emag the cover lock."
|
||||
locked = 0
|
||||
else
|
||||
user << "You fail to emag the cover lock."
|
||||
src << "Hack attempt detected."
|
||||
return 1
|
||||
else
|
||||
user << "The cover is already unlocked."
|
||||
return
|
||||
|
||||
if(opened)//Cover is open
|
||||
if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice
|
||||
if(wiresexposed)
|
||||
user << "You must close the panel first"
|
||||
return
|
||||
else
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
disconnect_from_ai()
|
||||
user << "You emag [src]'s interface."
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
set_zeroth_law("Only [user.real_name] and people he designates as being such are operatives.")
|
||||
. = 1
|
||||
spawn()
|
||||
src << "\red ALERT: Foreign software detected."
|
||||
sleep(5)
|
||||
src << "\red Initiating diagnostics..."
|
||||
sleep(20)
|
||||
src << "\red SynBorg v1.7.1 loaded."
|
||||
sleep(5)
|
||||
src << "\red LAW SYNCHRONISATION ERROR"
|
||||
sleep(5)
|
||||
src << "\red Would you like to send a report to NanoTraSoft? Y/N"
|
||||
sleep(10)
|
||||
src << "\red > N"
|
||||
sleep(20)
|
||||
src << "\red ERRORERRORERROR"
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
||||
if(src.module)
|
||||
var/rebuild = 0
|
||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
||||
qdel(D)
|
||||
rebuild = 1
|
||||
if(rebuild)
|
||||
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
|
||||
src.module.rebuild()
|
||||
updateicon()
|
||||
else
|
||||
user << "You fail to hack [src]'s interface."
|
||||
src << "Hack attempt detected."
|
||||
return 1
|
||||
return
|
||||
@@ -121,21 +121,19 @@
|
||||
else
|
||||
user << "\red You swipe your card, with no effect."
|
||||
return 0
|
||||
else if (istype(O, /obj/item/weapon/card/emag))
|
||||
if (emagged)
|
||||
user << "\red [src] is already overloaded - better run."
|
||||
return 0
|
||||
else
|
||||
var/obj/item/weapon/card/emag/emag = O
|
||||
emag.uses--
|
||||
emagged = 1
|
||||
user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time."
|
||||
spawn(100) src << "\red Your cell seems to be outputting a lot of power..."
|
||||
spawn(200) src << "\red Internal heat sensors are spiking! Something is badly wrong with your cell!"
|
||||
spawn(300) src.explode()
|
||||
|
||||
else
|
||||
attacked_with_item(O, user)
|
||||
|
||||
/mob/living/simple_animal/spiderbot/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (emagged)
|
||||
user << "<span class='warning'>[src] is already overloaded - better run.</span>"
|
||||
return 0
|
||||
else
|
||||
user << "<span class='notice'>You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.</span>"
|
||||
spawn(100) src << "<span class='danger'>Your cell seems to be outputting a lot of power...</span>"
|
||||
spawn(200) src << "<span class='danger'>Internal heat sensors are spiking! Something is badly wrong with your cell!</span>"
|
||||
spawn(300) src.explode()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj)
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
if(!O.force)
|
||||
visible_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
|
||||
return
|
||||
|
||||
|
||||
if(O.force > resistance)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
@@ -306,8 +306,8 @@
|
||||
adjustBruteLoss(damage)
|
||||
else
|
||||
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
|
||||
|
||||
visible_message("<span class='danger>[src] has been attacked with the [O] by [user].</span>")
|
||||
|
||||
visible_message("<span class='danger'>\The [src] has been attacked with the [O] by [user].</span>")
|
||||
user.do_attack_animation(src)
|
||||
|
||||
/mob/living/simple_animal/movement_delay()
|
||||
@@ -327,10 +327,10 @@
|
||||
if(statpanel("Status") && show_stat_health)
|
||||
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||
|
||||
/mob/living/simple_animal/death(gibbed, deathmessage="")
|
||||
/mob/living/simple_animal/death(gibbed, deathmessage = "dies!")
|
||||
icon_state = icon_dead
|
||||
density = 0
|
||||
return ..()
|
||||
return ..(gibbed,deathmessage)
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity)
|
||||
if(!blinded)
|
||||
|
||||
@@ -376,7 +376,8 @@
|
||||
return
|
||||
|
||||
M.key = key
|
||||
// M.Login() //wat
|
||||
if(M.mind)
|
||||
M.mind.reset()
|
||||
return
|
||||
|
||||
/client/verb/changes()
|
||||
@@ -648,7 +649,7 @@
|
||||
if(!canmove) return 0
|
||||
if(stat) return 0
|
||||
if(anchored) return 0
|
||||
if(monkeyizing) return 0
|
||||
if(transforming) return 0
|
||||
return 1
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/disabilities = 0 //Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/next_move = null
|
||||
var/monkeyizing = null //Carbon
|
||||
var/transforming = null //Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
var/eye_blind = null //Carbon
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
if(mob.eyeobj)
|
||||
return mob.EyeMove(n,direct)
|
||||
|
||||
if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var
|
||||
if(mob.transforming) return//This is sota the goto stop mobs from moving var
|
||||
|
||||
if(isliving(mob))
|
||||
var/mob/living/L = mob
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/mob/living/carbon/human/proc/monkeyize()
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
if (W==w_uniform) // will be torn
|
||||
continue
|
||||
drop_from_inventory(W)
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
stunned = 1
|
||||
icon = null
|
||||
@@ -21,7 +21,7 @@
|
||||
sleep(48)
|
||||
//animation = null
|
||||
|
||||
monkeyizing = 0
|
||||
transforming = 0
|
||||
stunned = 0
|
||||
update_canmove()
|
||||
invisibility = initial(invisibility)
|
||||
@@ -46,7 +46,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/AIize(move=1) // 'move' argument needs defining here too because BYOND is dumb
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/t in organs)
|
||||
qdel(t)
|
||||
@@ -54,11 +54,11 @@
|
||||
return ..(move)
|
||||
|
||||
/mob/living/carbon/AIize()
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
@@ -112,12 +112,12 @@
|
||||
|
||||
//human -> robot
|
||||
/mob/living/carbon/human/proc/Robotize()
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
@@ -165,12 +165,12 @@
|
||||
|
||||
//human -> alien
|
||||
/mob/living/carbon/human/proc/Alienize()
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
@@ -188,12 +188,12 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/slimeize(adult as num, reproduce as num)
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
@@ -222,12 +222,12 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/corgize()
|
||||
if (monkeyizing)
|
||||
if (transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
@@ -251,13 +251,13 @@
|
||||
usr << "\red Sorry but this mob type is currently unavailable."
|
||||
return
|
||||
|
||||
if(monkeyizing)
|
||||
if(transforming)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
transforming = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
if(..()) return
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || !(T.z in config.player_levels))
|
||||
usr << "<span class='warning'>Unable to establish a connection<span>: You're too far away from the station!"
|
||||
usr << "<span class='warning'>Unable to establish a connection</span>: You're too far away from the station!"
|
||||
return 0
|
||||
if(href_list["close"] )
|
||||
var/mob/user = usr
|
||||
|
||||
@@ -26,6 +26,27 @@ var/list/organ_cache = list()
|
||||
var/datum/dna/dna
|
||||
var/datum/species/species
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
if(!owner)
|
||||
return ..()
|
||||
|
||||
if((owner.internal_organs) && (src in owner.internal_organs))
|
||||
owner.internal_organs -= src
|
||||
|
||||
if((owner.internal_organs_by_name) && (src in owner.internal_organs_by_name))
|
||||
owner.internal_organs_by_name -= src
|
||||
|
||||
if((owner.organs) && (src in owner.organs))
|
||||
owner.organs -= src
|
||||
|
||||
if((owner.organs_by_name) && (src in owner.organs_by_name))
|
||||
owner.organs_by_name -= src
|
||||
|
||||
if(src in owner.contents)
|
||||
owner.contents -= src
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/proc/update_health()
|
||||
return
|
||||
|
||||
|
||||
@@ -51,6 +51,20 @@
|
||||
var/can_grasp
|
||||
var/can_stand
|
||||
|
||||
/obj/item/organ/external/Destroy()
|
||||
if(parent && parent.children)
|
||||
parent.children -= src
|
||||
|
||||
if(children)
|
||||
for(var/obj/item/organ/external/C in children)
|
||||
qdel(C)
|
||||
|
||||
if(internal_organs)
|
||||
for(var/obj/item/organ/O in internal_organs)
|
||||
qdel(O)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/external/attack_self(var/mob/user)
|
||||
if(!contents.len)
|
||||
return ..()
|
||||
@@ -85,12 +99,12 @@
|
||||
switch(stage)
|
||||
if(0)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!")
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!</span>")
|
||||
stage++
|
||||
return
|
||||
if(1)
|
||||
if(istype(W,/obj/item/weapon/retractor))
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!")
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!</span>")
|
||||
stage++
|
||||
return
|
||||
if(2)
|
||||
@@ -100,9 +114,9 @@
|
||||
removing.loc = get_turf(user.loc)
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(removing)
|
||||
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!")
|
||||
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'><b>[user]</b> fishes around fruitlessly in [src] with [W].")
|
||||
user.visible_message("<span class='danger'><b>[user]</b> fishes around fruitlessly in [src] with [W].</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -824,13 +838,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if((status & ORGAN_BROKEN) || cannot_break)
|
||||
return
|
||||
|
||||
owner.visible_message(\
|
||||
"\red You hear a loud cracking sound coming from \the [owner].",\
|
||||
"\red <b>Something feels like it shattered in your [name]!</b>",\
|
||||
"You hear a sickening crack.")
|
||||
|
||||
if(owner.species && !(owner.species.flags & NO_PAIN))
|
||||
owner.emote("scream")
|
||||
if(owner)
|
||||
owner.visible_message(\
|
||||
"\red You hear a loud cracking sound coming from \the [owner].",\
|
||||
"\red <b>Something feels like it shattered in your [name]!</b>",\
|
||||
"You hear a sickening crack.")
|
||||
if(owner.species && !(owner.species.flags & NO_PAIN))
|
||||
owner.emote("scream")
|
||||
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
@@ -843,7 +857,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
// This is mostly for the ninja suit to stop ninja being so crippled by breaks.
|
||||
// TODO: consider moving this to a suit proc or process() or something during
|
||||
// hardsuit rewrite.
|
||||
if(!(status & ORGAN_SPLINTED) && istype(owner,/mob/living/carbon/human))
|
||||
if(owner && !(status & ORGAN_SPLINTED) && istype(owner,/mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = owner
|
||||
|
||||
@@ -891,11 +905,11 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(src.status & ORGAN_ROBOT)
|
||||
return
|
||||
src.status |= ORGAN_MUTATED
|
||||
owner.update_body()
|
||||
if(owner) owner.update_body()
|
||||
|
||||
/obj/item/organ/external/proc/unmutate()
|
||||
src.status &= ~ORGAN_MUTATED
|
||||
owner.update_body()
|
||||
if(owner) owner.update_body()
|
||||
|
||||
/obj/item/organ/external/proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use max_damage?
|
||||
@@ -915,7 +929,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
|
||||
|
||||
/obj/item/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0)
|
||||
if(loc != owner)
|
||||
if(!owner || loc != owner)
|
||||
return
|
||||
if(!silent)
|
||||
owner.visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
@@ -999,7 +1013,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/get_wounds_desc()
|
||||
. = ""
|
||||
if(status & ORGAN_DESTROYED && !is_stump())
|
||||
. += "tear at [amputation_point] so bad it barely hangs on few tendons"
|
||||
. += "tear at [amputation_point] so severe that it hangs by a scrap of flesh"
|
||||
|
||||
if(status & ORGAN_ROBOT)
|
||||
if(brute_dam)
|
||||
|
||||
@@ -267,12 +267,13 @@
|
||||
|
||||
t = "<font face=\"[crayonfont]\" color=[P ? P.colour : "black"]><b>[t]</b></font>"
|
||||
|
||||
|
||||
// t = replacetext(t, "#", "") // Junk converted to nothing!
|
||||
|
||||
//Count the fields
|
||||
var/laststart = 1
|
||||
while(1)
|
||||
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
|
||||
var/i = findtext(t, "<span class=\"paper_field\">", laststart) //</span>
|
||||
if(i==0)
|
||||
break
|
||||
laststart = i+1
|
||||
@@ -281,19 +282,19 @@
|
||||
return t
|
||||
|
||||
/obj/item/weapon/paper/proc/burnpaper(obj/item/weapon/flame/P, mob/user)
|
||||
var/class = "<span class='warning'>"
|
||||
var/class = "warning"
|
||||
|
||||
if(P.lit && !user.restrained())
|
||||
if(istype(P, /obj/item/weapon/flame/lighter/zippo))
|
||||
class = "<span class='rose'>"
|
||||
class = "rose"
|
||||
|
||||
user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \
|
||||
"[class]You hold \the [P] up to \the [src], burning it slowly.")
|
||||
user.visible_message("<span class='[class]'>[user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!</span>", \
|
||||
"<span class='[class]'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit)
|
||||
user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \
|
||||
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
|
||||
user.visible_message("<span class='[class]'>[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
|
||||
"<span class='[class]'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
|
||||
|
||||
if(user.get_inactive_hand() == src)
|
||||
user.drop_from_inventory(src)
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
user << "<span class='notice'>Take off the carbon copy first.</span>"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
// adding sheets
|
||||
// adding sheets
|
||||
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo))
|
||||
insert_sheet_at(user, pages.len+1, W)
|
||||
|
||||
// burning
|
||||
|
||||
// burning
|
||||
else if(istype(W, /obj/item/weapon/flame))
|
||||
burnpaper(W, user)
|
||||
|
||||
|
||||
// merging bundles
|
||||
else if(istype(W, /obj/item/weapon/paper_bundle))
|
||||
user.drop_from_inventory(W)
|
||||
@@ -55,34 +55,34 @@
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper_bundle/proc/insert_sheet_at(mob/user, var/index, obj/item/weapon/sheet)
|
||||
/obj/item/weapon/paper_bundle/proc/insert_sheet_at(mob/user, var/index, obj/item/weapon/sheet)
|
||||
if(istype(sheet, /obj/item/weapon/paper))
|
||||
user << "<span class='notice'>You add [(sheet.name == "paper") ? "the paper" : sheet.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
|
||||
else if(istype(sheet, /obj/item/weapon/photo))
|
||||
user << "<span class='notice'>You add [(sheet.name == "photo") ? "the photo" : sheet.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
|
||||
|
||||
|
||||
user.drop_from_inventory(sheet)
|
||||
sheet.loc = src
|
||||
|
||||
|
||||
pages.Insert(index, sheet)
|
||||
|
||||
|
||||
if(index <= page)
|
||||
page++
|
||||
|
||||
/obj/item/weapon/paper_bundle/proc/burnpaper(obj/item/weapon/flame/P, mob/user)
|
||||
var/class = "<span class='warning'>"
|
||||
var/class = "warning"
|
||||
|
||||
if(P.lit && !user.restrained())
|
||||
if(istype(P, /obj/item/weapon/flame/lighter/zippo))
|
||||
class = "<span class='rose'>"
|
||||
class = "rose>"
|
||||
|
||||
user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \
|
||||
"[class]You hold \the [P] up to \the [src], burning it slowly.")
|
||||
user.visible_message("<span class='[class]'>[user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!</span>", \
|
||||
"<span class='[class]'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit)
|
||||
user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \
|
||||
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
|
||||
user.visible_message("<span class='[class]'>[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
|
||||
"<span class='[class]'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
|
||||
|
||||
if(user.get_inactive_hand() == src)
|
||||
user.drop_from_inventory(src)
|
||||
@@ -150,7 +150,7 @@
|
||||
if(href_list["next_page"])
|
||||
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
|
||||
insert_sheet_at(usr, page+1, in_hand)
|
||||
else if(page != pages.len)
|
||||
else if(page != pages.len)
|
||||
page++
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
if(href_list["prev_page"])
|
||||
@@ -163,20 +163,20 @@
|
||||
var/obj/item/weapon/W = pages[page]
|
||||
usr.put_in_hands(W)
|
||||
pages.Remove(pages[page])
|
||||
|
||||
|
||||
usr << "<span class='notice'>You remove the [W.name] from the bundle.</span>"
|
||||
|
||||
|
||||
if(pages.len <= 1)
|
||||
var/obj/item/weapon/paper/P = src[1]
|
||||
usr.drop_from_inventory(src)
|
||||
usr.put_in_hands(P)
|
||||
qdel(src)
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
if(page > pages.len)
|
||||
page = pages.len
|
||||
|
||||
|
||||
update_icon()
|
||||
else
|
||||
usr << "<span class='notice'>You need to hold it in hands!</span>"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!"
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||
return
|
||||
var/response = ""
|
||||
if(!papers.len > 0)
|
||||
|
||||
+20
-17
@@ -504,23 +504,6 @@
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && !(emagged || hacker)) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else if(wiresexposed)
|
||||
user << "You must close the panel first"
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
user << "Nothing happens."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "<span class='notice'>You emag the APC interface.</span>"
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>You fail to [ locked ? "unlock" : "lock"] the APC interface.</span>"
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2)
|
||||
if (src.loc:intact)
|
||||
user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
|
||||
@@ -654,6 +637,26 @@
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
|
||||
/obj/machinery/power/apc/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (!(emagged || hacker)) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else if(wiresexposed)
|
||||
user << "You must close the panel first"
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
user << "Nothing happens."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "<span class='notice'>You emag the APC interface.</span>"
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>You fail to [ locked ? "unlock" : "lock"] the APC interface.</span>"
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/apc/attack_hand(mob/user)
|
||||
// if (!can_use(user)) This already gets called in interact() and in topic()
|
||||
// return
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
var/RCon_tag = "NO_TAG"
|
||||
var/update_locked = 0
|
||||
|
||||
/obj/machinery/power/breakerbox/Destroy()
|
||||
..()
|
||||
for(var/datum/nano_module/rcon/R in world)
|
||||
R.FindDevices()
|
||||
|
||||
/obj/machinery/power/breakerbox/activated
|
||||
icon_state = "bbox_on"
|
||||
|
||||
|
||||
@@ -76,14 +76,6 @@
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
user << "\blue You add the phoron tank to the generator."
|
||||
else if (istype(O, /obj/item/weapon/card/emag))
|
||||
var/obj/item/weapon/card/emag/E = O
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
else
|
||||
return
|
||||
emagged = 1
|
||||
emp_act(1)
|
||||
else if(!active)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
anchored = !anchored
|
||||
@@ -172,3 +164,8 @@
|
||||
if (href_list["action"] == "close")
|
||||
usr << browse(null, "window=port_gen")
|
||||
usr.machine = null
|
||||
|
||||
/obj/machinery/power/port_gen/pacman2/emag_act(var/remaining_uses, var/mob/user)
|
||||
emagged = 1
|
||||
emp_act(1)
|
||||
return 1
|
||||
|
||||
@@ -245,6 +245,14 @@
|
||||
sheets = 0
|
||||
sheet_left = 0
|
||||
..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (active && prob(25))
|
||||
explode() //if they're foolish enough to emag while it's running
|
||||
|
||||
if (!emagged)
|
||||
emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, sheet_path))
|
||||
@@ -258,10 +266,6 @@
|
||||
addstack.use(amount)
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if (istype(O, /obj/item/weapon/card/emag))
|
||||
emagged = 1
|
||||
if (active && prob(25))
|
||||
explode() //if they're foolish enough to emag while it's running
|
||||
else if(!active)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
/obj/machinery/power/Destroy()
|
||||
disconnect_from_network()
|
||||
disconnect_terminal()
|
||||
|
||||
..()
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
@@ -150,15 +150,15 @@ max volume of phoron storeable by the field = the total volume of a number of ti
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/rust_core/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/rust_core/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
@@ -14,6 +14,21 @@
|
||||
//20% easier to read than apc code
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (!emagged)
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the port interface."
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
|
||||
return 1
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/attackby(obj/item/W, mob/user)
|
||||
|
||||
@@ -55,21 +70,6 @@
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && !emagged) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the port interface."
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
|
||||
@@ -106,12 +106,6 @@
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/fuel_assembly) && !cur_assembly)
|
||||
if(emergency_insert_ready)
|
||||
cur_assembly = W
|
||||
@@ -122,6 +116,13 @@
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
@@ -223,13 +223,12 @@
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/emitter/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags [src].","<span class='warning'>You short out the lock.</span>")
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
return 1
|
||||
|
||||
@@ -84,10 +84,12 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/smes/Destroy()
|
||||
/obj/machinery/power/smes/disconnect_terminal()
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
..()
|
||||
terminal.master = null
|
||||
terminal = null
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/smes/update_icon()
|
||||
overlays.Cut()
|
||||
@@ -244,7 +246,7 @@
|
||||
return 0
|
||||
|
||||
if (!open_hatch)
|
||||
user << "<span class='warning'>You need to open access hatch on [src] first!</spann>"
|
||||
user << "<span class='warning'>You need to open access hatch on [src] first!</span>"
|
||||
return 0
|
||||
|
||||
if(istype(W, /obj/item/stack/cable_coil) && !terminal && !building_terminal)
|
||||
|
||||
@@ -75,6 +75,13 @@
|
||||
charge = 0
|
||||
should_be_mapped = 1
|
||||
|
||||
/obj/machinery/power/smes/buildable/Destroy()
|
||||
..()
|
||||
qdel(wires)
|
||||
for(var/datum/nano_module/rcon/R in world)
|
||||
R.FindDevices()
|
||||
|
||||
|
||||
// Proc: process()
|
||||
// Parameters: None
|
||||
// Description: Uses parent process, but if grounding wire is cut causes sparks to fly around.
|
||||
@@ -343,6 +350,7 @@
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/I in component_parts)
|
||||
I.loc = src.loc
|
||||
component_parts -= I
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ var/list/solars_list = list()
|
||||
var/t = "<B><span class='highlight'>Generated power</span></B> : [round(lastgen)] W<BR>"
|
||||
t += "<B><span class='highlight'>Star Orientation</span></B>: [sun.angle]° ([angle2text(sun.angle)])<BR>"
|
||||
t += "<B><span class='highlight'>Array Orientation</span></B>: [rate_control(src,"cdir","[cdir]°",1,15)] ([angle2text(cdir)])<BR>"
|
||||
t += "<B><span class='highlight'>Tracking:</B><div class='statusDisplay'>"
|
||||
t += "<B><span class='highlight'>Tracking:</span></B><div class='statusDisplay'>"
|
||||
switch(track)
|
||||
if(0)
|
||||
t += "<span class='linkOn'>Off</span> <A href='?src=\ref[src];track=1'>Timed</A> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(prob(chance))
|
||||
if(A.opacity)
|
||||
//display a message so that people on the other side aren't so confused
|
||||
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!")
|
||||
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!</span>")
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -192,4 +192,4 @@
|
||||
|
||||
/obj/item/projectile/bullet/shotgun/practice
|
||||
name = "practice"
|
||||
damage = 5
|
||||
damage = 5
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/item/projectile/change/proc/wabbajack(var/mob/M)
|
||||
if(istype(M, /mob/living) && M.stat != DEAD)
|
||||
if(M.monkeyizing)
|
||||
if(M.transforming)
|
||||
return
|
||||
if(M.has_brain_worms())
|
||||
return //Borer stuff - RR
|
||||
|
||||
@@ -6,9 +6,21 @@
|
||||
var/maximum_volume = 100
|
||||
var/atom/my_atom = null
|
||||
|
||||
/datum/reagents/New(var/max = 100)
|
||||
/datum/reagents/New(var/max = 100, atom/A = null)
|
||||
..()
|
||||
maximum_volume = max
|
||||
my_atom = A
|
||||
|
||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||
if(!chemical_reagents_list)
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
var/paths = typesof(/datum/reagent) - /datum/reagent
|
||||
chemical_reagents_list = list()
|
||||
for(var/path in paths)
|
||||
var/datum/reagent/D = new path()
|
||||
if(!D.name)
|
||||
continue
|
||||
chemical_reagents_list[D.id] = D
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
..()
|
||||
@@ -265,53 +277,26 @@
|
||||
|
||||
/* Holder-to-atom and similar procs */
|
||||
|
||||
/datum/reagents/proc/touch(var/atom/target) // This picks the appropriate reaction. Reagents are not guaranteed to transfer to the target.
|
||||
if(ismob(target))
|
||||
touch_mob(target)
|
||||
if(isturf(target))
|
||||
touch_turf(target)
|
||||
if(isobj(target))
|
||||
touch_obj(target)
|
||||
return
|
||||
|
||||
/datum/reagents/proc/touch_mob(var/mob/target)
|
||||
if(!target || !istype(target))
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.touch_mob(target)
|
||||
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/touch_turf(var/turf/target)
|
||||
if(!target || !istype(target))
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.touch_turf(target)
|
||||
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/touch_obj(var/obj/target)
|
||||
if(!target || !istype(target))
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.touch_obj(target)
|
||||
|
||||
update_total()
|
||||
|
||||
//The general proc for applying reagents to things. This proc assumes the reagents are being applied externally,
|
||||
//not directly injected into the contents. It first calls touch, then the appropriate trans_to_*() or splash_mob().
|
||||
//If for some reason touch effects are bypassed (e.g. injecting stuff directly into a reagent container or person),
|
||||
//call the appropriate trans_to_*() proc.
|
||||
/datum/reagents/proc/trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0)
|
||||
touch(target) //First, handle mere touch effects
|
||||
|
||||
if(ismob(target))
|
||||
//warning("[my_atom] is trying to transfer reagents to [target], which is a mob, using trans_to()")
|
||||
//return trans_to_mob(target, amount, multiplier, copy)
|
||||
return splash_mob(target, amount)
|
||||
return splash_mob(target, amount, copy)
|
||||
if(isturf(target))
|
||||
return trans_to_turf(target, amount, multiplier, copy)
|
||||
if(isobj(target))
|
||||
return trans_to_obj(target, amount, multiplier, copy)
|
||||
return 0
|
||||
|
||||
//Using this in case we want to differentiate splashing an atom from transferring reagents to it later down the road.
|
||||
//For now it just calls trans_to.
|
||||
/datum/reagents/proc/splash(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0)
|
||||
trans_to(target, amount, multiplier, copy)
|
||||
|
||||
/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1)
|
||||
if (!target || !target.reagents)
|
||||
return
|
||||
@@ -328,30 +313,55 @@
|
||||
|
||||
return F.trans_to(target, amount) // Let this proc check the atom's type
|
||||
|
||||
/datum/reagents/proc/splash_mob(var/mob/target, var/amount = 1, var/clothes = 1)
|
||||
var/perm = 0
|
||||
var/list/L = list("head" = THERMAL_PROTECTION_HEAD, "upper_torso" = THERMAL_PROTECTION_UPPER_TORSO, "lower_torso" = THERMAL_PROTECTION_LOWER_TORSO, "legs" = THERMAL_PROTECTION_LEG_LEFT + THERMAL_PROTECTION_LEG_RIGHT, "feet" = THERMAL_PROTECTION_FOOT_LEFT + THERMAL_PROTECTION_FOOT_RIGHT, "arms" = THERMAL_PROTECTION_ARM_LEFT + THERMAL_PROTECTION_ARM_RIGHT, "hands" = THERMAL_PROTECTION_HAND_LEFT + THERMAL_PROTECTION_HAND_RIGHT)
|
||||
if(clothes)
|
||||
for(var/obj/item/clothing/C in target.get_equipped_items())
|
||||
if(C.permeability_coefficient == 1 || C.body_parts_covered == 0)
|
||||
continue
|
||||
if(C.body_parts_covered & HEAD)
|
||||
L["head"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & UPPER_TORSO)
|
||||
L["upper_torso"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & LOWER_TORSO)
|
||||
L["lower_torso"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & LEGS)
|
||||
L["legs"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & FEET)
|
||||
L["feet"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & ARMS)
|
||||
L["arms"] *= C.permeability_coefficient
|
||||
if(C.body_parts_covered & HANDS)
|
||||
L["hands"] *= C.permeability_coefficient
|
||||
for(var/t in L)
|
||||
perm += L[t]
|
||||
return trans_to_mob(target, amount, CHEM_TOUCH, perm)
|
||||
// When applying reagents to an atom externally, touch() is called to trigger any on-touch effects of the reagent.
|
||||
// This does not handle transferring reagents to things.
|
||||
// For example, splashing someone with water will get them wet and extinguish them if they are on fire,
|
||||
// even if they are wearing an impermeable suit that prevents the reagents from contacting the skin.
|
||||
/datum/reagents/proc/touch(var/atom/target)
|
||||
if(ismob(target))
|
||||
touch_mob(target)
|
||||
if(isturf(target))
|
||||
touch_turf(target)
|
||||
if(isobj(target))
|
||||
touch_obj(target)
|
||||
return
|
||||
|
||||
/datum/reagents/proc/touch_mob(var/mob/target)
|
||||
if(!target || !istype(target))
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.touch_mob(target, current.volume)
|
||||
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/touch_turf(var/turf/target)
|
||||
if(!target || !istype(target))
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.touch_turf(target, current.volume)
|
||||
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/touch_obj(var/obj/target)
|
||||
if(!target || !istype(target))
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.touch_obj(target, current.volume)
|
||||
|
||||
update_total()
|
||||
|
||||
// Attempts to place a reagent on the mob's skin.
|
||||
// Reagents are not guaranteed to transfer to the target.
|
||||
// Do not call this directly, call trans_to() instead.
|
||||
/datum/reagents/proc/splash_mob(var/mob/target, var/amount = 1, var/copy = 0)
|
||||
var/perm = 1
|
||||
if(isliving(target)) //will we ever even need to tranfer reagents to non-living mobs?
|
||||
var/mob/living/L = target
|
||||
perm = L.reagent_permeability()
|
||||
return trans_to_mob(target, amount, CHEM_TOUCH, perm, copy)
|
||||
|
||||
/datum/reagents/proc/trans_to_mob(var/mob/target, var/amount = 1, var/type = CHEM_BLOOD, var/multiplier = 1, var/copy = 0) // Transfer after checking into which holder...
|
||||
if(!target || !istype(target))
|
||||
@@ -393,18 +403,7 @@
|
||||
|
||||
return trans_to_holder(target.reagents, amount, multiplier, copy)
|
||||
|
||||
/datum/reagents/proc/metabolize(var/alien, var/location)
|
||||
if(!iscarbon(my_atom))
|
||||
return
|
||||
var/mob/living/carbon/C = my_atom
|
||||
if(!C || !istype(C))
|
||||
return
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.on_mob_life(C, alien, location)
|
||||
update_total()
|
||||
|
||||
/* Atom reagent creation - use it all the time */
|
||||
|
||||
/atom/proc/create_reagents(var/max_vol)
|
||||
reagents = new/datum/reagents(max_vol)
|
||||
reagents.my_atom = src
|
||||
reagents = new/datum/reagents(max_vol, src)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/datum/reagents/metabolism
|
||||
var/metabolism_class //CHEM_TOUCH, CHEM_INGEST, or CHEM_BLOOD
|
||||
var/mob/living/carbon/parent
|
||||
|
||||
/datum/reagents/metabolism/New(var/max = 100, mob/living/carbon/parent_mob, var/met_class)
|
||||
..(max, parent_mob)
|
||||
|
||||
metabolism_class = met_class
|
||||
if(istype(parent_mob))
|
||||
parent = parent_mob
|
||||
|
||||
/datum/reagents/metabolism/proc/metabolize()
|
||||
|
||||
var/metabolism_type = 0 //non-human mobs
|
||||
if(ishuman(parent))
|
||||
var/mob/living/carbon/human/H = parent
|
||||
metabolism_type = H.species.reagent_tag
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
current.on_mob_life(parent, metabolism_type, metabolism_class)
|
||||
update_total()
|
||||
@@ -88,7 +88,12 @@ About the Holder:
|
||||
Transfers [amount] reagents from [src] to [target], multiplying them by [multiplier]. Returns actual amount removed from [src] (not amount transferred to [target]). If [copy] is 1, copies reagents instead.
|
||||
|
||||
touch(var/atom/target)
|
||||
Not recommended to use. Calls touch_mob(target), touch_turf(target), or touch_obj(target), depending on target's type.
|
||||
When applying reagents to an atom externally, touch() is called to trigger any on-touch effects of the reagent.
|
||||
This does not handle transferring reagents to things.
|
||||
For example, splashing someone with water will get them wet and extinguish them if they are on fire,
|
||||
even if they are wearing an impermeable suit that prevents the reagents from contacting the skin.
|
||||
Basically just defers to touch_mob(target), touch_turf(target), or touch_obj(target), depending on target's type.
|
||||
Not recommended to use this directly, since trans_to() calls it before attempting to transfer.
|
||||
|
||||
touch_mob(var/mob/target)
|
||||
Calls each reagent's touch_mob(target).
|
||||
@@ -100,13 +105,18 @@ About the Holder:
|
||||
Calls each reagent's touch_obj(target).
|
||||
|
||||
trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0)
|
||||
Checks the type of [target], calling splash_mob(target, amount), trans_to_turf(target, amount, multiplier, copy), or trans_to_obj(target, amount, multiplier, copy).
|
||||
The general proc for applying reagents to things externally (as opposed to directly injected into the contents).
|
||||
It first calls touch, then the appropriate trans_to_*() or splash_mob().
|
||||
If for some reason you want touch effects to be bypassed (e.g. injecting stuff directly into a reagent container or person), call the appropriate trans_to_*() proc.
|
||||
|
||||
Calls touch() before checking the type of [target], calling splash_mob(target, amount), trans_to_turf(target, amount, multiplier, copy), or trans_to_obj(target, amount, multiplier, copy).
|
||||
|
||||
trans_id_to(var/atom/target, var/id, var/amount = 1)
|
||||
Transfers [amount] of [id] to [target]. Returns amount transferred.
|
||||
|
||||
splash_mob(var/mob/target, var/amount = 1, var/clothes = 1)
|
||||
Checks mob's clothing if [clothes] is 1 and transfers [amount] reagents to mob's skin.
|
||||
Don't call this directly. Call apply_to() instead.
|
||||
|
||||
trans_to_mob(var/mob/target, var/amount = 1, var/type = CHEM_BLOOD, var/multiplier = 1, var/copy = 0)
|
||||
Transfers [amount] reagents to the mob's appropriate holder, depending on [type]. Ignores protection.
|
||||
|
||||
@@ -36,13 +36,14 @@
|
||||
/datum/reagent/proc/remove_self(var/amount) // Shortcut
|
||||
holder.remove_reagent(id, amount)
|
||||
|
||||
/datum/reagent/proc/touch_mob(var/mob/M) // This doesn't apply to being splashed - this is for, e.g. extinguishers and sprays. The difference is that reagent is not on the mob - it's in another object.
|
||||
// This doesn't apply to skin contact - this is for, e.g. extinguishers and sprays. The difference is that reagent is not directly on the mob's skin - it might just be on their clothing.
|
||||
/datum/reagent/proc/touch_mob(var/mob/M, var/amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/touch_obj(var/obj/O) // Acid melting, cleaner cleaning, etc
|
||||
/datum/reagent/proc/touch_obj(var/obj/O, var/amount) // Acid melting, cleaner cleaning, etc
|
||||
return
|
||||
|
||||
/datum/reagent/proc/touch_turf(var/turf/T) // Cleaner cleaning, lube lubbing, etc, all go here
|
||||
/datum/reagent/proc/touch_turf(var/turf/T, var/amount) // Cleaner cleaning, lube lubbing, etc, all go here
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_mob_life(var/mob/living/carbon/M, var/alien, var/location) // Currently, on_mob_life is called on carbons. Any interaction with non-carbon mobs (lube) will need to be done in touch_mob.
|
||||
|
||||
@@ -55,6 +55,19 @@
|
||||
M.adjustToxLoss(removed)
|
||||
if(dose > 15)
|
||||
M.adjustToxLoss(removed)
|
||||
if(data && data["viruses"])
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS)
|
||||
continue
|
||||
if(D.spread_type in list(CONTACT_FEET, CONTACT_HANDS, CONTACT_GENERAL))
|
||||
M.contract_disease(D)
|
||||
if(data && data["virus2"])
|
||||
var/list/vlist = data["virus2"]
|
||||
if(vlist.len)
|
||||
for(var/ID in vlist)
|
||||
var/datum/disease2/disease/V = vlist[ID]
|
||||
if(V.spreadtype == "Contact")
|
||||
infect_virus2(M, V.getcopy())
|
||||
|
||||
/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_MACHINE)
|
||||
@@ -63,13 +76,15 @@
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS)
|
||||
continue
|
||||
M.contract_disease(D)
|
||||
if(D.spread_type in list(CONTACT_FEET, CONTACT_HANDS, CONTACT_GENERAL))
|
||||
M.contract_disease(D)
|
||||
if(data && data["virus2"])
|
||||
var/list/vlist = data["virus2"]
|
||||
if(vlist.len)
|
||||
for(var/ID in vlist)
|
||||
var/datum/disease2/disease/V = vlist[ID]
|
||||
infect_virus2(M, V.getcopy())
|
||||
if(V.spreadtype == "Contact")
|
||||
infect_virus2(M, V.getcopy())
|
||||
if(data && data["antibodies"])
|
||||
M.antibodies |= data["antibodies"]
|
||||
|
||||
@@ -157,6 +172,17 @@
|
||||
if(!cube.wrapped)
|
||||
cube.Expand()
|
||||
|
||||
/datum/reagent/water/touch_mob(var/mob/living/L, var/amount)
|
||||
if(istype(L))
|
||||
var/needed = L.fire_stacks * 10
|
||||
if(amount > needed)
|
||||
L.fire_stacks = 0
|
||||
L.ExtinguishMob()
|
||||
remove_self(needed)
|
||||
else
|
||||
L.adjust_fire_stacks(-(amount / 10))
|
||||
remove_self(amount)
|
||||
|
||||
/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
var/mob/living/carbon/slime/S = M
|
||||
@@ -167,15 +193,6 @@
|
||||
++S.Discipline
|
||||
if(dose == removed)
|
||||
S.visible_message("<span class='warning'>[S]'s flesh sizzles where the water touches it!</span>", "<span class='danger'>Your flesh burns in the water!</span>")
|
||||
var/needed = M.fire_stacks * 10
|
||||
if(volume > needed)
|
||||
M.fire_stacks = 0
|
||||
M.ExtinguishMob()
|
||||
remove_self(needed)
|
||||
else
|
||||
M.adjust_fire_stacks(-(volume / 10))
|
||||
remove_self(volume)
|
||||
return
|
||||
|
||||
/datum/reagent/fuel
|
||||
name = "Welding fuel"
|
||||
@@ -197,5 +214,7 @@
|
||||
/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustToxLoss(2 * removed)
|
||||
|
||||
/datum/reagent/fuel/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) // Splashing people with welding fuel to make them easy to ignite!
|
||||
M.adjust_fire_stacks(0.1 * removed)
|
||||
/datum/reagent/fuel/touch_mob(var/mob/living/L, var/amount)
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 10) // Splashing people with welding fuel to make them easy to ignite!
|
||||
|
||||
|
||||
@@ -100,9 +100,9 @@
|
||||
glass_name = "glass of ethanol"
|
||||
glass_desc = "A well-known alcohol with a variety of applications."
|
||||
|
||||
/datum/reagent/ethanol/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjust_fire_stacks(removed / 15)
|
||||
return
|
||||
/datum/reagent/ethanol/touch_mob(var/mob/living/L, var/amount)
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 15)
|
||||
|
||||
/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustToxLoss(removed * 2 * toxicity)
|
||||
@@ -327,7 +327,7 @@
|
||||
return
|
||||
|
||||
if(volume < meltdose) // Not enough to melt anything
|
||||
M.take_organ_damage(removed * power * 0.2)
|
||||
M.take_organ_damage(0, removed * power * 0.2) //burn damage, since it causes chemical burns. Acid doesn't make bones shatter, like brute trauma would.
|
||||
return
|
||||
if(!M.unacidable && removed > 0)
|
||||
if(istype(M, /mob/living/carbon/human) && volume >= meltdose)
|
||||
|
||||
@@ -67,10 +67,7 @@
|
||||
|
||||
/datum/reagent/paint/touch_mob(var/mob/M)
|
||||
if(istype(M) && !istype(M, /mob/dead)) //painting ghosts: not allowed
|
||||
M.color = color
|
||||
|
||||
/datum/reagent/paint/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.color = color
|
||||
M.color = color //maybe someday change this to paint only clothes and exposed body parts for human mobs.
|
||||
|
||||
/datum/reagent/paint/get_data()
|
||||
return color
|
||||
@@ -258,9 +255,9 @@
|
||||
remove_self(5)
|
||||
return
|
||||
|
||||
/datum/reagent/thermite/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjust_fire_stacks(removed * 0.2)
|
||||
return
|
||||
/datum/reagent/thermite/touch_mob(var/mob/living/L, var/amount)
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 5)
|
||||
|
||||
/datum/reagent/thermite/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustFireLoss(3 * removed)
|
||||
|
||||
@@ -46,9 +46,12 @@
|
||||
strength = 30
|
||||
touch_met = 5
|
||||
|
||||
/datum/reagent/toxin/phoron/touch_mob(var/mob/living/L, var/amount)
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 5)
|
||||
|
||||
/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
..()
|
||||
M.adjust_fire_stacks(removed / 5)
|
||||
M.take_organ_damage(0, removed * 0.1) //being splashed directly with phoron causes minor chemical burns
|
||||
if(prob(50))
|
||||
M.pl_effects()
|
||||
|
||||
@@ -169,7 +172,7 @@
|
||||
if(locate(/obj/effect/overlay/wallrot) in W)
|
||||
for(var/obj/effect/overlay/wallrot/E in W)
|
||||
qdel(E)
|
||||
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!")
|
||||
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
|
||||
|
||||
/datum/reagent/toxin/plantbgone/touch_obj(var/obj/O, var/volume)
|
||||
if(istype(O, /obj/effect/alien/weeds/))
|
||||
@@ -467,10 +470,10 @@
|
||||
color = "#13BC5E"
|
||||
|
||||
/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // TODO: check if there's similar code anywhere else
|
||||
if(M.monkeyizing)
|
||||
if(M.transforming)
|
||||
return
|
||||
M << "<span class='danger'>Your flesh rapidly mutates!</span>"
|
||||
M.monkeyizing = 1
|
||||
M.transforming = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.overlays.Cut()
|
||||
@@ -500,7 +503,7 @@
|
||||
|
||||
/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(prob(10))
|
||||
M.contract_disease(new /datum/disease/robotic_transformation(0), 1)
|
||||
M.contract_disease(new /datum/disease/robotic_transformation(0), 1) //What
|
||||
|
||||
/datum/reagent/nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.contract_disease(new /datum/disease/robotic_transformation(0), 1)
|
||||
|
||||
@@ -71,18 +71,18 @@
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to splash [target.name] ([target.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) splashed [target.name] ([target.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
user.visible_message("<span class='danger'>[target] has been splashed with something by [user]!", "<span class = 'notice'>You splash the solution onto [target].</span>")
|
||||
reagents.splash_mob(target, reagents.total_volume)
|
||||
user.visible_message("<span class='danger'>[target] has been splashed with something by [user]!</span>", "<span class = 'notice'>You splash the solution onto [target].</span>")
|
||||
reagents.splash(target, reagents.total_volume)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/self_feed_message(var/mob/user)
|
||||
user << "<span class='notice'>You eat \the [src]</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/other_feed_message_start(var/mob/user, var/mob/target)
|
||||
user.visible_message("<span class='warning'>[user] is trying to feed [target] \the [src]!")
|
||||
user.visible_message("<span class='warning'>[user] is trying to feed [target] \the [src]!</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/other_feed_message_finish(var/mob/user, var/mob/target)
|
||||
user.visible_message("<span class='warning'>[user] has fed [target] \the [src]!")
|
||||
user.visible_message("<span class='warning'>[user] has fed [target] \the [src]!</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/feed_sound(var/mob/user)
|
||||
return
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user