mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Merge remote-tracking branch 'upstream/master' into tgport-16569
Conflicts: .gitignore
This commit is contained in:
@@ -58,9 +58,9 @@ var/global/nologevent = 0
|
||||
body += "<b>Mob type:</b> [M.type]<br>"
|
||||
if(M.client)
|
||||
if(M.client.related_accounts_cid.len)
|
||||
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
|
||||
body += "<b>Related accounts by CID:</b> [jointext(M.client.related_accounts_cid, " - ")]<br>"
|
||||
if(M.client.related_accounts_ip.len)
|
||||
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
body += "<b>Related accounts by IP:</b> [jointext(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
|
||||
body += "<A href='?_src_=holder;boot2=\ref[M]'>Kick</A> | "
|
||||
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
|
||||
|
||||
@@ -14,7 +14,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if(!length(line)) continue
|
||||
if(copytext(line,1,2) == "#") continue
|
||||
|
||||
var/list/List = text2list(line,"+")
|
||||
var/list/List = splittext(line,"+")
|
||||
if(!List.len) continue
|
||||
|
||||
var/rank = ckeyEx(List[1])
|
||||
@@ -78,7 +78,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if(copytext(line,1,2) == "#") continue
|
||||
|
||||
//Split the line at every "-"
|
||||
var/list/List = text2list(line, "-")
|
||||
var/list/List = splittext(line, "-")
|
||||
if(!List.len) continue
|
||||
|
||||
//ckey is before the first "-"
|
||||
|
||||
@@ -677,7 +677,7 @@ var/list/admin_verbs_proccall = list (
|
||||
//load text from file
|
||||
var/list/Lines = file2list("config/admins.txt")
|
||||
for(var/line in Lines)
|
||||
var/list/splitline = text2list(line, " - ")
|
||||
var/list/splitline = splittext(line, " - ")
|
||||
if(n_lower(splitline[1]) == ckey)
|
||||
if(splitline.len >= 2)
|
||||
rank = ckeyEx(splitline[2])
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/admins/proc/create_mob(var/mob/user)
|
||||
if (!create_mob_html)
|
||||
var/mobjs = null
|
||||
mobjs = list2text(typesof(/mob), ";")
|
||||
mobjs = jointext(typesof(/mob), ";")
|
||||
create_mob_html = file2text('html/create_object.html')
|
||||
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
|
||||
/datum/admins/proc/create_object(var/mob/user)
|
||||
if (!create_object_html)
|
||||
var/objectjs = null
|
||||
objectjs = list2text(typesof(/obj), ";")
|
||||
objectjs = jointext(typesof(/obj), ";")
|
||||
create_object_html = file2text('html/create_object.html')
|
||||
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
@@ -15,7 +15,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
|
||||
var/html_form = create_object_forms[path]
|
||||
|
||||
if (!html_form)
|
||||
var/objectjs = list2text(typesof(path), ";")
|
||||
var/objectjs = jointext(typesof(path), ";")
|
||||
html_form = file2text('html/create_object.html')
|
||||
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
|
||||
create_object_forms[path] = html_form
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/admins/proc/create_turf(var/mob/user)
|
||||
if (!create_turf_html)
|
||||
var/turfjs = null
|
||||
turfjs = list2text(typesof(/turf), ";")
|
||||
turfjs = jointext(typesof(/turf), ";")
|
||||
create_turf_html = file2text('html/create_object.html')
|
||||
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
|
||||
|
||||
@@ -177,73 +177,7 @@
|
||||
output += "<center><a href='?_src_=holder;addnoteempty=1'>\[Add Note\]</a></center>"
|
||||
output += ruler
|
||||
usr << browse(output, "window=show_notes;size=900x500")
|
||||
|
||||
/proc/regex_note_sql_extract(str, exp)
|
||||
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp))
|
||||
|
||||
// If the AUTOCONVERT_NOTES is turned on, any time a player connects this will be run to try and add all their notes to the database
|
||||
/proc/convert_notes_sql(ckey)
|
||||
if(!ckey)
|
||||
return 0
|
||||
|
||||
var/playerfile = "data/player_saves/[copytext(ckey, 1, 2)]/[ckey]/info.sav"
|
||||
var/savefile/info = new(playerfile)
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos || !infos.len)
|
||||
fdel(playerfile)
|
||||
return 0
|
||||
|
||||
ckey = ckey
|
||||
for(var/datum/player_info/I in infos)
|
||||
var/notetext = I.content
|
||||
var/adminckey = I.author
|
||||
var/server
|
||||
if (config && config.server_name)
|
||||
server = config.server_name
|
||||
|
||||
var/timestamp = I.timestamp
|
||||
var/regex = "\[A-Za-z\]+\\, (\[A-Za-z\]+) (\[0-9\]+)\[A-Za-z\]+ of (\[0-9\]+)"
|
||||
var/datum/regex/results = regex_note_sql_extract(timestamp, regex)
|
||||
var/month = month2number(results.str(2))
|
||||
var/day = results.str(3)
|
||||
var/year = results.str(4)
|
||||
timestamp = "[year]-[month]-[day] 00:00:00"
|
||||
|
||||
add_note(ckey, notetext, timestamp, adminckey, 0, server, 0)
|
||||
|
||||
fdel(playerfile)
|
||||
return 1
|
||||
|
||||
// Using this proc causes lag - you have been warned.
|
||||
/proc/mass_convert_notes()
|
||||
if(!check_rights(R_SERVER))
|
||||
return 0
|
||||
world << "Beginning mass note conversion."
|
||||
|
||||
var/player_notes_file = "data/player_notes.sav"
|
||||
var/savefile/notesfile = new(player_notes_file)
|
||||
var/list/note_keys
|
||||
notesfile >> note_keys
|
||||
|
||||
if(!notesfile)
|
||||
log_game("Error: Cannot access player_notes.sav file.")
|
||||
return 0
|
||||
if(!note_keys || !note_keys.len)
|
||||
log_game("Error: player_notes.sav file is empty. Deleting it.")
|
||||
fdel(player_notes_file)
|
||||
return 0
|
||||
|
||||
note_keys = sortList(note_keys)
|
||||
var/i = 1
|
||||
for(i, i <= note_keys.len, i++)
|
||||
var/ckey = note_keys[i]
|
||||
convert_notes_sql(ckey)
|
||||
world << "Finished mass note conversion ([i] notes converted). Remember to turn off AUTOCONVERT_NOTES."
|
||||
world << "Deleting the player_notes.sav file."
|
||||
fdel(player_notes_file)
|
||||
return 1
|
||||
|
||||
/proc/show_player_info_irc(var/key as text)
|
||||
var/target_sql_ckey = sanitizeSQL(key)
|
||||
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT timestamp, notetext, adminckey, server FROM [format_table_name("notes")] WHERE ckey = '[target_sql_ckey]' ORDER BY timestamp")
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
log_admin("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]</span>")
|
||||
|
||||
|
||||
spawn(10)
|
||||
stickyban_show()
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
/datum/admins/proc/stickyban_show()
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
|
||||
var/list/bans = sortList(world.GetConfig("ban"))
|
||||
var/banhtml = ""
|
||||
for(var/key in bans)
|
||||
@@ -181,23 +181,23 @@
|
||||
if (!ban)
|
||||
return null
|
||||
. = params2list(ban)
|
||||
.["keys"] = text2list(.["keys"], ",")
|
||||
.["type"] = text2list(.["type"], ",")
|
||||
.["IP"] = text2list(.["IP"], ",")
|
||||
.["computer_id"] = text2list(.["computer_id"], ",")
|
||||
.["keys"] = splittext(.["keys"], ",")
|
||||
.["type"] = splittext(.["type"], ",")
|
||||
.["IP"] = splittext(.["IP"], ",")
|
||||
.["computer_id"] = splittext(.["computer_id"], ",")
|
||||
|
||||
/proc/list2stickyban(var/list/ban)
|
||||
if (!ban || !islist(ban))
|
||||
return null
|
||||
. = ban.Copy()
|
||||
if (.["keys"])
|
||||
.["keys"] = list2text(.["keys"], ",")
|
||||
.["keys"] = jointext(.["keys"], ",")
|
||||
if (.["type"])
|
||||
.["type"] = list2text(.["type"], ",")
|
||||
.["type"] = jointext(.["type"], ",")
|
||||
if (.["IP"])
|
||||
.["IP"] = list2text(.["IP"], ",")
|
||||
.["IP"] = jointext(.["IP"], ",")
|
||||
if (.["computer_id"])
|
||||
.["computer_id"] = list2text(.["computer_id"], ",")
|
||||
.["computer_id"] = jointext(.["computer_id"], ",")
|
||||
. = list2params(.)
|
||||
|
||||
/client/proc/stickybanpanel()
|
||||
@@ -206,6 +206,5 @@
|
||||
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
|
||||
holder.stickyban_show()
|
||||
|
||||
@@ -1019,7 +1019,7 @@
|
||||
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
|
||||
jobban_remove(t)
|
||||
href_list["ban"] = 1 // lets it fall through and refresh
|
||||
var/t_split = text2list(t, " - ")
|
||||
var/t_split = splittext(t, " - ")
|
||||
var/key = t_split[1]
|
||||
var/job = t_split[2]
|
||||
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
|
||||
@@ -2076,7 +2076,7 @@
|
||||
alert("Select fewer object types, (max 5)")
|
||||
return
|
||||
|
||||
var/list/offset = text2list(href_list["offset"],",")
|
||||
var/list/offset = splittext(href_list["offset"],",")
|
||||
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
|
||||
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
||||
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
||||
|
||||
@@ -32,7 +32,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/original_msg = msg
|
||||
|
||||
//explode the input msg into a list
|
||||
var/list/msglist = text2list(msg, " ")
|
||||
var/list/msglist = splittext(msg, " ")
|
||||
|
||||
//generate keywords lookup
|
||||
var/list/surnames = list()
|
||||
@@ -43,7 +43,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(M.mind) indexing += M.mind.name
|
||||
|
||||
for(var/string in indexing)
|
||||
var/list/L = text2list(string, " ")
|
||||
var/list/L = splittext(string, " ")
|
||||
var/surname_found = 0
|
||||
//surnames
|
||||
for(var/i=L.len, i>=1, i--)
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
dat += "<p>[C.ckey] (Player Age: <font color = 'red'>[C.player_age]</font>) - <b>[C.computer_id]</b> / <b>[C.address]</b><br>"
|
||||
if(C.related_accounts_cid.len)
|
||||
dat += "--Accounts associated with CID: "
|
||||
dat += "<b>[list2text(C.related_accounts_cid, " - ")]</b><br>"
|
||||
dat += "<b>[jointext(C.related_accounts_cid, " - ")]</b><br>"
|
||||
if(C.related_accounts_ip.len)
|
||||
dat += "--Accounts associated with IP: "
|
||||
dat += "<b>[list2text(C.related_accounts_ip, " - ")]</b> "
|
||||
dat += "<b>[jointext(C.related_accounts_ip, " - ")]</b> "
|
||||
usr << browse(dat, "window=alt_panel;size=640x480")
|
||||
return
|
||||
|
||||
|
||||
@@ -1166,21 +1166,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
|
||||
if("Players")
|
||||
usr << list2text(player_list,",")
|
||||
usr << jointext(player_list,",")
|
||||
if("Admins")
|
||||
usr << list2text(admins,",")
|
||||
usr << jointext(admins,",")
|
||||
if("Mobs")
|
||||
usr << list2text(mob_list,",")
|
||||
usr << jointext(mob_list,",")
|
||||
if("Living Mobs")
|
||||
usr << list2text(living_mob_list,",")
|
||||
usr << jointext(living_mob_list,",")
|
||||
if("Dead Mobs")
|
||||
usr << list2text(dead_mob_list,",")
|
||||
usr << jointext(dead_mob_list,",")
|
||||
if("Silicons")
|
||||
usr << list2text(silicon_mob_list,",")
|
||||
usr << jointext(silicon_mob_list,",")
|
||||
if("Clients")
|
||||
usr << list2text(clients,",")
|
||||
usr << jointext(clients,",")
|
||||
if("Respawnable Mobs")
|
||||
usr << list2text(respawnable_list,",")
|
||||
usr << jointext(respawnable_list,",")
|
||||
|
||||
|
||||
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
||||
|
||||
@@ -143,7 +143,7 @@ var/global/dmm_suite/preloader/_preloader = null
|
||||
var/variables_start = findtext(full_def,"{")
|
||||
if(variables_start)//if there's any variable
|
||||
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
|
||||
fields = text2list(full_def,";")
|
||||
fields = dmm_splittext(full_def,";")
|
||||
|
||||
//then fill the members_attributes list with the corresponding variables
|
||||
members_attributes.len++
|
||||
@@ -245,7 +245,7 @@ var/global/dmm_suite/preloader/_preloader = null
|
||||
|
||||
//build a list from variables in text form (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
|
||||
//return the filled list
|
||||
/dmm_suite/proc/text2list(var/text as text,var/delimiter=",")
|
||||
/dmm_suite/proc/dmm_splittext(var/text as text,var/delimiter=",")
|
||||
|
||||
var/list/to_return = list()
|
||||
|
||||
@@ -279,7 +279,7 @@ var/global/dmm_suite/preloader/_preloader = null
|
||||
|
||||
//Check for list
|
||||
else if(copytext(trim_right,1,5) == "list")
|
||||
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
|
||||
trim_right = dmm_splittext(copytext(trim_right,6,length(trim_right)))
|
||||
|
||||
//Check for file
|
||||
else if(copytext(trim_right,1,2) == "'")
|
||||
|
||||
@@ -304,9 +304,6 @@
|
||||
src << message
|
||||
clientmessages.Remove(ckey)
|
||||
|
||||
if (config && config.autoconvert_notes)
|
||||
convert_notes_sql(ckey)
|
||||
|
||||
|
||||
send_resources()
|
||||
|
||||
@@ -368,7 +365,7 @@
|
||||
|
||||
//Log all the alts
|
||||
if(related_accounts_cid.len)
|
||||
log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]")
|
||||
log_access("Alts: [key_name(src)]:[jointext(related_accounts_cid, " - ")]")
|
||||
|
||||
var/watchreason = check_watchlist(sql_ckey)
|
||||
if(watchreason)
|
||||
|
||||
@@ -309,9 +309,6 @@
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/welding/proc/getMask()
|
||||
return global_hud.darkMask
|
||||
|
||||
/obj/item/clothing/glasses/welding/attack_self()
|
||||
toggle()
|
||||
|
||||
@@ -354,9 +351,6 @@
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/welding/superior/getMask()
|
||||
return null
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold
|
||||
name = "blindfold"
|
||||
desc = "Covers the eyes, preventing sight."
|
||||
|
||||
@@ -305,7 +305,7 @@ What a mess.*/
|
||||
return
|
||||
Perp = new/list()
|
||||
t1 = lowertext(t1)
|
||||
var/list/components = text2list(t1, " ")
|
||||
var/list/components = splittext(t1, " ")
|
||||
if(components.len > 5)
|
||||
return //Lets not let them search too greedily.
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/jobmask = query.item[3]
|
||||
var/ok = 0
|
||||
if(jobmask != "*")
|
||||
var/list/allowed_jobs = text2list(jobmask,",")
|
||||
var/list/allowed_jobs = splittext(jobmask,",")
|
||||
for(var/i = 1, i <= allowed_jobs.len, i++)
|
||||
if(istext(allowed_jobs[i]))
|
||||
allowed_jobs[i] = trim(allowed_jobs[i])
|
||||
@@ -66,13 +66,13 @@
|
||||
|
||||
// This is hacky, but since it's difficult as fuck to make a proper parser in BYOND without killing the server, here it is. - N3X
|
||||
/proc/HackProperties(var/mob/living/carbon/human/M,var/obj/item/I,var/script)
|
||||
var/list/statements = text2list(script,";")
|
||||
var/list/statements = splittext(script,";")
|
||||
if(statements.len == 0)
|
||||
return
|
||||
for(var/statement in statements)
|
||||
var/list/assignmentChunks = text2list(statement,"=")
|
||||
var/list/assignmentChunks = splittext(statement,"=")
|
||||
var/varname = assignmentChunks[1]
|
||||
var/list/typeChunks=text2list(script,":")
|
||||
var/list/typeChunks=splittext(script,":")
|
||||
var/desiredType=typeChunks[1]
|
||||
switch(desiredType)
|
||||
if("string")
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "paper- 'Scanner Report'"
|
||||
P.info = "<center><font size='6'><B>Scanner Report</B></font></center><HR><BR>"
|
||||
P.info += list2text(log, "<BR>")
|
||||
P.info += jointext(log, "<BR>")
|
||||
P.info += "<HR><B>Notes:</B><BR>"
|
||||
P.info_links = P.info
|
||||
|
||||
|
||||
@@ -428,8 +428,8 @@ var/const/POS_HEADER = {"<html>
|
||||
if("Add to Order")
|
||||
AddToOrder(href_list["preset"],text2num(href_list["units"]))
|
||||
if("Add Products")
|
||||
for(var/list/line in text2list(href_list["csv"],"\n"))
|
||||
var/list/cells = text2list(line,",")
|
||||
for(var/list/line in splittext(href_list["csv"],"\n"))
|
||||
var/list/cells = splittext(line,",")
|
||||
if(cells.len<2)
|
||||
usr << "\red The CSV must have at least two columns: Product Name, followed by Price (as a number)."
|
||||
src.attack_hand(usr)
|
||||
|
||||
@@ -36,10 +36,9 @@
|
||||
command_announcement.Announce("Massive bluespace translocation detected.", "Anomaly Alert")
|
||||
|
||||
var/list/flashers = list()
|
||||
for(var/mob/living/carbon/human/M in viewers(TO, null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash) // flash dose faggots
|
||||
flashers += M
|
||||
for(var/mob/living/carbon/C in viewers(TO, null))
|
||||
if(C.flash_eyes())
|
||||
flashers += C
|
||||
|
||||
var/y_distance = TO.y - FROM.y
|
||||
var/x_distance = TO.x - FROM.x
|
||||
@@ -66,4 +65,3 @@
|
||||
M.client.screen -= blueeffect
|
||||
qdel(blueeffect)
|
||||
qdel(newAnomaly)
|
||||
|
||||
@@ -26,7 +26,7 @@ proc/Intoxicated(phrase)
|
||||
proc/NewStutter(phrase,stunned)
|
||||
phrase = html_decode(phrase)
|
||||
|
||||
var/list/split_phrase = text2list(phrase," ") //Split it up into words.
|
||||
var/list/split_phrase = splittext(phrase," ") //Split it up into words.
|
||||
|
||||
var/list/unstuttered_words = split_phrase.Copy()
|
||||
var/i = rand(1,3)
|
||||
@@ -57,7 +57,7 @@ proc/NewStutter(phrase,stunned)
|
||||
|
||||
split_phrase[index] = word
|
||||
|
||||
return sanitize(list2text(split_phrase," "))
|
||||
return sanitize(jointext(split_phrase," "))
|
||||
|
||||
proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
|
||||
step(M, pick(d,turn(d,90),turn(d,-90)))
|
||||
@@ -67,7 +67,7 @@ proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
var/list
|
||||
words = text2list(original_msg," ")
|
||||
words = splittext(original_msg," ")
|
||||
new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
@@ -78,6 +78,6 @@ proc/Ellipsis(original_msg, chance = 50)
|
||||
else
|
||||
new_words += w
|
||||
|
||||
new_msg = list2text(new_words," ")
|
||||
new_msg = jointext(new_words," ")
|
||||
|
||||
return new_msg
|
||||
|
||||
@@ -270,10 +270,10 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
karmacharge(cost)
|
||||
|
||||
if(dbckey)
|
||||
var/list/joblist = text2list(dbjob,",")
|
||||
var/list/joblist = splittext(dbjob,",")
|
||||
if(!(job in joblist))
|
||||
joblist += job
|
||||
var/newjoblist = list2text(joblist,",")
|
||||
var/newjoblist = jointext(joblist,",")
|
||||
query = dbcon.NewQuery("UPDATE [format_table_name("whitelist")] SET job='[newjoblist]' WHERE ckey='[dbckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
@@ -310,10 +310,10 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
karmacharge(cost)
|
||||
|
||||
if(dbckey)
|
||||
var/list/specieslist = text2list(dbspecies,",")
|
||||
var/list/specieslist = splittext(dbspecies,",")
|
||||
if(!(species in specieslist))
|
||||
specieslist += species
|
||||
var/newspecieslist = list2text(specieslist,",")
|
||||
var/newspecieslist = jointext(specieslist,",")
|
||||
query = dbcon.NewQuery("UPDATE [format_table_name("whitelist")] SET species='[newspecieslist]' WHERE ckey='[dbckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
@@ -388,15 +388,15 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
if(dbckey)
|
||||
var/list/typelist = list()
|
||||
if(type == "job")
|
||||
typelist = text2list(dbjob,",")
|
||||
typelist = splittext(dbjob,",")
|
||||
else if(type == "species")
|
||||
typelist = text2list(dbspecies,",")
|
||||
typelist = splittext(dbspecies,",")
|
||||
else
|
||||
usr << "\red Type [type] is not a valid column."
|
||||
|
||||
if(name in typelist)
|
||||
typelist -= name
|
||||
var/newtypelist = list2text(typelist,",")
|
||||
var/newtypelist = jointext(typelist,",")
|
||||
query = dbcon.NewQuery("UPDATE [format_table_name("whitelist")] SET [type]='[newtypelist]' WHERE ckey='[dbckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
@@ -426,8 +426,8 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
dbspecies = query.item[4]
|
||||
|
||||
if(dbckey)
|
||||
var/list/joblist = text2list(dbjob,",")
|
||||
var/list/specieslist = text2list(dbspecies,",")
|
||||
var/list/joblist = splittext(dbjob,",")
|
||||
var/list/specieslist = splittext(dbspecies,",")
|
||||
var/list/combinedlist = joblist + specieslist
|
||||
if(name)
|
||||
if(name in combinedlist)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
var/heard = ""
|
||||
if(prob(15))
|
||||
var/list/punctuation = list(",", "!", ".", ";", "?")
|
||||
var/list/messages = text2list(message, " ")
|
||||
var/list/messages = splittext(message, " ")
|
||||
var/R = rand(1, messages.len)
|
||||
var/heardword = messages[R]
|
||||
if(copytext(heardword,1, 1) in punctuation)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
. += pick(map[min_char])
|
||||
message = copytext(message, min_index + 1)
|
||||
|
||||
return list2text(.)
|
||||
return jointext(., "")
|
||||
|
||||
#undef AUTOHISS_OFF
|
||||
#undef AUTOHISS_BASIC
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/eyecheck()
|
||||
/mob/living/carbon/alien/check_eye_prot()
|
||||
return 2
|
||||
|
||||
/mob/living/carbon/alien/updatehealth()
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
update_icons()
|
||||
|
||||
timeofdeath = worldtime2text()
|
||||
|
||||
@@ -130,77 +130,4 @@
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in 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_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 75)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
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.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
@@ -7,7 +7,6 @@
|
||||
if(!gibbed)
|
||||
visible_message("<span class='name'>[src]</span> lets out a waning high-pitched cry.")
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
timeofdeath = worldtime2text()
|
||||
if(mind) mind.store_memory("Time of death: [timeofdeath]", 0)
|
||||
|
||||
@@ -85,84 +85,4 @@
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in 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_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(25 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(19 to 25)
|
||||
healths.icon_state = "health1"
|
||||
if(13 to 19)
|
||||
healths.icon_state = "health2"
|
||||
if(7 to 13)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 7)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
|
||||
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.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
@@ -36,4 +36,24 @@
|
||||
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else
|
||||
fire_alert = 0
|
||||
fire_alert = 0
|
||||
|
||||
/mob/living/carbon/alien/update_sight()
|
||||
if(stat == DEAD || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != DEAD)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
container.icon_state = "mmi_dead"
|
||||
stat = DEAD
|
||||
|
||||
if(blind) blind.layer = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
@@ -309,9 +309,51 @@
|
||||
if(H.w_uniform)
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
|
||||
. = ..()
|
||||
var/damage = intensity - check_eye_prot()
|
||||
if(.)
|
||||
if(visual)
|
||||
return
|
||||
var/obj/item/organ/internal/eyes/E = get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(!E)
|
||||
return
|
||||
|
||||
switch(damage)
|
||||
if(1)
|
||||
src << "<span class='warning'>Your eyes sting a little.</span>"
|
||||
if(prob(40)) //waiting on carbon organs
|
||||
E.damage += 1
|
||||
|
||||
if(2)
|
||||
src << "<span class='warning'>Your eyes burn.</span>"
|
||||
E.damage += rand(2, 4)
|
||||
|
||||
else
|
||||
src << "Your eyes itch and burn severely!</span>"
|
||||
E.damage += rand(12, 16)
|
||||
|
||||
if(E.damage > E.min_bruised_damage)
|
||||
eye_blind += damage
|
||||
eye_blurry += damage * rand(3, 6)
|
||||
|
||||
if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
src << "<span class='warning'>Your eyes start to burn badly!</span>"
|
||||
else //snowflake conditions piss me off for the record
|
||||
src << "<span class='warning'>The flash blinds you!</span>"
|
||||
|
||||
else if(E.damage >= E.min_broken_damage)
|
||||
src << "<span class='warning'>You can't see anything!</span>"
|
||||
|
||||
else
|
||||
src << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
|
||||
return 1
|
||||
|
||||
else if(damage == 0) // just enough protection
|
||||
if(prob(20))
|
||||
src << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/proc/tintcheck()
|
||||
return 0
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
|
||||
if(!gibbed)
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
timeofdeath = worldtime2text()
|
||||
med_hud_set_health()
|
||||
|
||||
@@ -1100,24 +1100,32 @@
|
||||
. = ..()
|
||||
|
||||
|
||||
///eyecheck()
|
||||
///check_eye_prot()
|
||||
///Returns a number between -1 to 2
|
||||
/mob/living/carbon/human/eyecheck()
|
||||
/mob/living/carbon/human/check_eye_prot()
|
||||
var/number = ..()
|
||||
if(istype(src.head, /obj/item/clothing/head)) //are they wearing something on their head
|
||||
var/obj/item/clothing/head/HFP = src.head //if yes gets the flash protection value from that item
|
||||
if(istype(head, /obj/item/clothing/head)) //are they wearing something on their head
|
||||
var/obj/item/clothing/head/HFP = head //if yes gets the flash protection value from that item
|
||||
number += HFP.flash_protect
|
||||
if(istype(src.glasses, /obj/item/clothing/glasses)) //glasses
|
||||
var/obj/item/clothing/glasses/GFP = src.glasses
|
||||
if(istype(glasses, /obj/item/clothing/glasses)) //glasses
|
||||
var/obj/item/clothing/glasses/GFP = glasses
|
||||
number += GFP.flash_protect
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask)) //mask
|
||||
var/obj/item/clothing/mask/MFP = src.wear_mask
|
||||
if(istype(wear_mask, /obj/item/clothing/mask)) //mask
|
||||
var/obj/item/clothing/mask/MFP = wear_mask
|
||||
number += MFP.flash_protect
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/EFP in src.internal_organs)
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/EFP in internal_organs)
|
||||
number += EFP.flash_protect
|
||||
|
||||
return number
|
||||
|
||||
/mob/living/carbon/human/check_ear_prot()
|
||||
if(head && (head.flags & HEADBANGPROTECT))
|
||||
return 1
|
||||
if(l_ear && (l_ear.flags & EARBANGPROTECT))
|
||||
return 1
|
||||
if(r_ear && (r_ear.flags & EARBANGPROTECT))
|
||||
return 1
|
||||
|
||||
///tintcheck()
|
||||
///Checks eye covering items for visually impairing tinting, such as welding masks
|
||||
///Checked in life.dm. 0 & 1 = no impairment, 2 = welding mask overlay, 3 = You can see jack, but you can't see shit.
|
||||
@@ -1887,4 +1895,4 @@
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
if(U.accessories)
|
||||
for(var/obj/item/clothing/accessory/A in U.accessories)
|
||||
. |= A.GetAccess()
|
||||
. |= A.GetAccess()
|
||||
|
||||
@@ -400,4 +400,4 @@ This function restores all organs.
|
||||
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
updatehealth()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -1,30 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
|
||||
var/global/list/unconscious_overlays = list("1" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage1"),\
|
||||
"2" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage2"),\
|
||||
"3" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage3"),\
|
||||
"4" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage4"),\
|
||||
"5" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage5"),\
|
||||
"6" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage6"),\
|
||||
"7" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage7"),\
|
||||
"8" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage8"),\
|
||||
"9" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage9"),\
|
||||
"10" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage10"))
|
||||
var/global/list/oxyloss_overlays = list("1" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay1"),\
|
||||
"2" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay2"),\
|
||||
"3" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay3"),\
|
||||
"4" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay4"),\
|
||||
"5" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay5"),\
|
||||
"6" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay6"),\
|
||||
"7" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay7"))
|
||||
var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay1"),\
|
||||
"2" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay2"),\
|
||||
"3" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay3"),\
|
||||
"4" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay4"),\
|
||||
"5" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay5"),\
|
||||
"6" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6"))
|
||||
|
||||
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
|
||||
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
|
||||
|
||||
@@ -51,10 +26,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
loc_as_cryobag.used++
|
||||
in_stasis = 1
|
||||
|
||||
//if(mob_master.current_cycle % 30 == 15)
|
||||
//hud_updateflag = 1022
|
||||
//HudRefactor:WTF do i put here....
|
||||
|
||||
voice = GetVoice()
|
||||
|
||||
if(..() && !in_stasis)
|
||||
@@ -909,7 +880,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_vision()
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
else
|
||||
|
||||
@@ -416,125 +416,147 @@
|
||||
return 0
|
||||
|
||||
/datum/species/proc/handle_vision(mob/living/carbon/human/H)
|
||||
if( H.stat == DEAD )
|
||||
if(H.stat == DEAD)
|
||||
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
H.see_in_dark = 8
|
||||
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
if(!H.druggy)
|
||||
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
return
|
||||
|
||||
H.see_in_dark = darksight //set their variables to default, modify them later
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
|
||||
if(H.mind && H.mind.vampire)
|
||||
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
|
||||
H.sight |= SEE_MOBS
|
||||
H.see_in_dark = darksight //set their variables to default, modify them later
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(XRAY in H.mutations)
|
||||
if(H.mind && H.mind.vampire)
|
||||
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark = 8
|
||||
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
|
||||
H.sight |= SEE_MOBS
|
||||
|
||||
|
||||
if(H.seer == 1)
|
||||
var/obj/effect/rune/R = locate() in H.loc
|
||||
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
|
||||
H.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
else
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
H.seer = 0
|
||||
if(XRAY in H.mutations)
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark = 8
|
||||
|
||||
//This checks how much the mob's eyewear impairs their vision
|
||||
if(H.tinttotal >= TINT_IMPAIR)
|
||||
if(tinted_weldhelh)
|
||||
if(H.tinttotal >= TINT_BLIND)
|
||||
H.eye_blind = max(H.eye_blind, 1)
|
||||
if(H.client)
|
||||
H.client.screen += global_hud.darkMask
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
var/minimum_darkness_view = INFINITY
|
||||
if(H.glasses)
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
H.sight |= G.vision_flags
|
||||
|
||||
if(G.darkness_view)
|
||||
H.see_in_dark = G.darkness_view
|
||||
minimum_darkness_view = G.darkness_view
|
||||
if(H.seer == 1)
|
||||
var/obj/effect/rune/R = locate() in H.loc
|
||||
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
|
||||
H.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
else
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
H.seer = 0
|
||||
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
//This checks how much the mob's eyewear impairs their vision
|
||||
if(H.tinttotal >= TINT_IMPAIR)
|
||||
if(tinted_weldhelh)
|
||||
H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
|
||||
if(H.tinttotal >= TINT_BLIND)
|
||||
H.eye_blind = max(H.eye_blind, 1)
|
||||
else
|
||||
H.clear_fullscreen("tint")
|
||||
|
||||
if(H.head)
|
||||
if(istype(H.head, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = H.head
|
||||
H.sight |= hat.vision_flags
|
||||
var/minimum_darkness_view = INFINITY
|
||||
if(H.glasses)
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
H.sight |= G.vision_flags
|
||||
|
||||
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
|
||||
H.see_in_dark = hat.darkness_view
|
||||
if(G.darkness_view)
|
||||
H.see_in_dark = G.darkness_view
|
||||
minimum_darkness_view = G.darkness_view
|
||||
|
||||
if(!hat.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
//switch(hat.HUDType)
|
||||
// if(SECHUD)
|
||||
// process_sec_hud(H,1)
|
||||
// if(MEDHUD)
|
||||
// process_med_hud(H,1)
|
||||
// if(ANTAGHUD)
|
||||
// process_antag_hud(H)
|
||||
if(H.head)
|
||||
if(istype(H.head, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = H.head
|
||||
H.sight |= hat.vision_flags
|
||||
|
||||
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
|
||||
var/obj/item/weapon/rig/rig = H.back
|
||||
if(rig.visor)
|
||||
if(!rig.helmet || (H.head && rig.helmet == H.head))
|
||||
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
|
||||
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
|
||||
if(istype(G))
|
||||
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
|
||||
if(G.vision_flags) // MESONS
|
||||
H.sight |= G.vision_flags
|
||||
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
|
||||
H.see_in_dark = hat.darkness_view
|
||||
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(!hat.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
//switch(G.HUDType)
|
||||
// if(SECHUD)
|
||||
// process_sec_hud(H,1)
|
||||
// if(MEDHUD)
|
||||
// process_med_hud(H,1)
|
||||
// if(ANTAGHUD)
|
||||
// process_antag_hud(H)
|
||||
//switch(hat.HUDType)
|
||||
// if(SECHUD)
|
||||
// process_sec_hud(H,1)
|
||||
// if(MEDHUD)
|
||||
// process_med_hud(H,1)
|
||||
// if(ANTAGHUD)
|
||||
// process_antag_hud(H)
|
||||
|
||||
if(H.vision_type)
|
||||
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
|
||||
H.see_invisible = H.vision_type.see_invisible
|
||||
if(H.vision_type.light_sensitive)
|
||||
H.weakeyes = 1
|
||||
H.sight |= H.vision_type.sight_flags
|
||||
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
|
||||
var/obj/item/weapon/rig/rig = H.back
|
||||
if(rig.visor)
|
||||
if(!rig.helmet || (H.head && rig.helmet == H.head))
|
||||
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
|
||||
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
|
||||
if(istype(G))
|
||||
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
|
||||
if(G.vision_flags) // MESONS
|
||||
H.sight |= G.vision_flags
|
||||
|
||||
if(H.see_override) //Override all
|
||||
H.see_invisible = H.see_override
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
if(H.blind)
|
||||
if(H.blinded) H.blind.layer = 18
|
||||
else H.blind.layer = 0
|
||||
//switch(G.HUDType)
|
||||
// if(SECHUD)
|
||||
// process_sec_hud(H,1)
|
||||
// if(MEDHUD)
|
||||
// process_med_hud(H,1)
|
||||
// if(ANTAGHUD)
|
||||
// process_antag_hud(H)
|
||||
|
||||
if(H.disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
|
||||
if(H.glasses) //to every /obj/item
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
if(!G.prescription)
|
||||
H.client.screen += global_hud.vimpaired
|
||||
else
|
||||
H.client.screen += global_hud.vimpaired
|
||||
if(H.vision_type)
|
||||
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
|
||||
H.see_invisible = H.vision_type.see_invisible
|
||||
if(H.vision_type.light_sensitive)
|
||||
H.weakeyes = 1
|
||||
H.sight |= H.vision_type.sight_flags
|
||||
|
||||
if(H.eye_blurry) H.client.screen += global_hud.blurry
|
||||
if(H.druggy) H.client.screen += global_hud.druggy
|
||||
if(H.see_override) //Override all
|
||||
H.see_invisible = H.see_override
|
||||
|
||||
if(!H.client)
|
||||
return 1
|
||||
|
||||
if(H.blinded || H.eye_blind)
|
||||
H.overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
//H.throw_alert("blind", /obj/screen/alert/blind)
|
||||
else
|
||||
H.clear_fullscreen("blind")
|
||||
//H.clear_alert("blind")
|
||||
|
||||
|
||||
if(H.disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
|
||||
if(H.glasses) //to every /obj/item
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
if(!G.prescription)
|
||||
H.overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
H.overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
H.clear_fullscreen("nearsighted")
|
||||
|
||||
if(H.eye_blurry)
|
||||
H.overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else
|
||||
H.clear_fullscreen("blurry")
|
||||
|
||||
if(H.druggy)
|
||||
H.overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
//H.throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
H.clear_fullscreen("high")
|
||||
//H.clear_alert("high")
|
||||
|
||||
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
|
||||
if(H.healths)
|
||||
|
||||
@@ -364,83 +364,55 @@
|
||||
|
||||
//this handles hud updates. Calls update_vision() and handle_hud_icons()
|
||||
/mob/living/carbon/handle_regular_hud_updates()
|
||||
if(!client) return 0
|
||||
if(!client)
|
||||
return 0
|
||||
|
||||
if(damageoverlay)
|
||||
if(damageoverlay.overlays)
|
||||
damageoverlay.overlays = list()
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
//Critical damage passage overlay
|
||||
if(health <= config.health_threshold_crit)
|
||||
var/image/I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage0")
|
||||
I.blend_mode = BLEND_OVERLAY //damageoverlay is BLEND_MULTIPLY
|
||||
switch(health)
|
||||
if(-20 to -10)
|
||||
I.icon_state = "passage1"
|
||||
if(-30 to -20)
|
||||
I.icon_state = "passage2"
|
||||
if(-40 to -30)
|
||||
I.icon_state = "passage3"
|
||||
if(-50 to -40)
|
||||
I.icon_state = "passage4"
|
||||
if(-60 to -50)
|
||||
I.icon_state = "passage5"
|
||||
if(-70 to -60)
|
||||
I.icon_state = "passage6"
|
||||
if(-80 to -70)
|
||||
I.icon_state = "passage7"
|
||||
if(-90 to -80)
|
||||
I.icon_state = "passage8"
|
||||
if(-95 to -90)
|
||||
I.icon_state = "passage9"
|
||||
if(-INFINITY to -95)
|
||||
I.icon_state = "passage10"
|
||||
damageoverlay.overlays += I
|
||||
if(stat == UNCONSCIOUS && health <= config.health_threshold_crit)
|
||||
var/severity = 0
|
||||
switch(health)
|
||||
if(-20 to -10) severity = 1
|
||||
if(-30 to -20) severity = 2
|
||||
if(-40 to -30) severity = 3
|
||||
if(-50 to -40) severity = 4
|
||||
if(-60 to -50) severity = 5
|
||||
if(-70 to -60) severity = 6
|
||||
if(-80 to -70) severity = 7
|
||||
if(-90 to -80) severity = 8
|
||||
if(-95 to -90) severity = 9
|
||||
if(-INFINITY to -95) severity = 10
|
||||
overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
|
||||
else
|
||||
clear_fullscreen("crit")
|
||||
if(oxyloss)
|
||||
var/severity = 0
|
||||
switch(oxyloss)
|
||||
if(10 to 20) severity = 1
|
||||
if(20 to 25) severity = 2
|
||||
if(25 to 30) severity = 3
|
||||
if(30 to 35) severity = 4
|
||||
if(35 to 40) severity = 5
|
||||
if(40 to 45) severity = 6
|
||||
if(45 to INFINITY) severity = 7
|
||||
overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
|
||||
else
|
||||
//Oxygen damage overlay
|
||||
if(oxyloss)
|
||||
var/image/I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay0")
|
||||
switch(oxyloss)
|
||||
if(10 to 20)
|
||||
I.icon_state = "oxydamageoverlay1"
|
||||
if(20 to 25)
|
||||
I.icon_state = "oxydamageoverlay2"
|
||||
if(25 to 30)
|
||||
I.icon_state = "oxydamageoverlay3"
|
||||
if(30 to 35)
|
||||
I.icon_state = "oxydamageoverlay4"
|
||||
if(35 to 40)
|
||||
I.icon_state = "oxydamageoverlay5"
|
||||
if(40 to 45)
|
||||
I.icon_state = "oxydamageoverlay6"
|
||||
if(45 to INFINITY)
|
||||
I.icon_state = "oxydamageoverlay7"
|
||||
damageoverlay.overlays += I
|
||||
clear_fullscreen("oxy")
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp
|
||||
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
|
||||
if(hurtdamage)
|
||||
var/severity = 0
|
||||
switch(hurtdamage)
|
||||
if(5 to 15) severity = 1
|
||||
if(15 to 30) severity = 2
|
||||
if(30 to 45) severity = 3
|
||||
if(45 to 70) severity = 4
|
||||
if(70 to 85) severity = 5
|
||||
if(85 to INFINITY) severity = 6
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = src.getBruteLoss() + src.getFireLoss() + damageoverlaytemp
|
||||
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
|
||||
if(hurtdamage)
|
||||
var/image/I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay0")
|
||||
I.blend_mode = BLEND_ADD
|
||||
switch(hurtdamage)
|
||||
if(5 to 15)
|
||||
I.icon_state = "brutedamageoverlay1"
|
||||
if(15 to 30)
|
||||
I.icon_state = "brutedamageoverlay2"
|
||||
if(30 to 45)
|
||||
I.icon_state = "brutedamageoverlay3"
|
||||
if(45 to 70)
|
||||
I.icon_state = "brutedamageoverlay4"
|
||||
if(70 to 85)
|
||||
I.icon_state = "brutedamageoverlay5"
|
||||
if(85 to INFINITY)
|
||||
I.icon_state = "brutedamageoverlay6"
|
||||
var/image/black = image(I.icon, I.icon_state) //BLEND_ADD doesn't let us darken, so this is just to blacken the edge of the screen
|
||||
black.color = "#170000"
|
||||
damageoverlay.overlays += I
|
||||
damageoverlay.overlays += black
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
|
||||
|
||||
update_canmove()
|
||||
if(blind)
|
||||
blind.layer = 0
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/mob/living/death(gibbed)
|
||||
blinded = max(blinded, 1)
|
||||
|
||||
clear_fullscreens()
|
||||
..(gibbed)
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
/mob/living/proc/handle_disabilities()
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
if(sdisabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
@@ -187,33 +187,40 @@
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_vision()
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
update_sight()
|
||||
|
||||
if(stat != DEAD)
|
||||
if(blind)
|
||||
if(eye_blind)
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(blinded || eye_blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
//throw_alert("blind", /obj/screen/alert/blind)
|
||||
else
|
||||
clear_fullscreen("blind")
|
||||
//clear_alert("blind")
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if(machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
if(disabilities & NEARSIGHTED)
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
if(!remote_view && !client.adminobs)
|
||||
reset_view(null)
|
||||
clear_fullscreen("nearsighted")
|
||||
|
||||
if(eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else
|
||||
clear_fullscreen("blurry")
|
||||
|
||||
if(druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
//throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
clear_fullscreen("high")
|
||||
//clear_alert("high")
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!remote_view && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
/mob/living/proc/update_sight()
|
||||
return
|
||||
|
||||
@@ -73,8 +73,7 @@
|
||||
|
||||
/mob/living/ex_act(severity)
|
||||
..()
|
||||
if(client && !eye_blind)
|
||||
flick("flash", src.flash)
|
||||
flash_eyes()
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -809,6 +808,18 @@
|
||||
/mob/living/proc/can_use_vents()
|
||||
return "You can't fit into that vent."
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
if(check_eye_prot() < intensity && (override_blindness_check || !(sdisabilities & BLIND)))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(src, "clear_fullscreen", 25, FALSE, "flash", 25)
|
||||
return 1
|
||||
|
||||
/mob/living/proc/check_eye_prot()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/check_ear_prot()
|
||||
|
||||
// The src mob is trying to strip an item from someone
|
||||
// Override if a certain type of mob should be behave differently when stripping items (can't, for example)
|
||||
/mob/living/stripPanelUnequip(obj/item/what, mob/who, where, var/silent = 0)
|
||||
@@ -966,4 +977,4 @@
|
||||
new path(loc)
|
||||
butcher_results.Remove(path) //In case you want to have things like simple_animals drop their butcher results on gib, so it won't double up below.
|
||||
visible_message("<span class='notice'>[user] butchers [src].</span>")
|
||||
gib()
|
||||
gib()
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
|
||||
|
||||
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
|
||||
flash_weak_pain()
|
||||
|
||||
//Being hit while using a cloaking device
|
||||
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
|
||||
if(C && C.active)
|
||||
|
||||
@@ -288,11 +288,11 @@ var/list/ai_verbs_default = list(
|
||||
return
|
||||
if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var
|
||||
var/file = file2text("config/custom_sprites.txt")
|
||||
var/lines = text2list(file, "\n")
|
||||
var/lines = splittext(file, "\n")
|
||||
|
||||
for(var/line in lines)
|
||||
// split & clean up
|
||||
var/list/Entry = text2list(line, ":")
|
||||
var/list/Entry = splittext(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
@@ -593,8 +593,6 @@ var/list/ai_verbs_default = list(
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
icon_state = "[ckey]-ai-crash"
|
||||
else icon_state = "ai-crash"
|
||||
update_canmove()
|
||||
if(src.eyeobj)
|
||||
src.eyeobj.setLoc(get_turf(src))
|
||||
if(blind) blind.layer = 0
|
||||
if(eyeobj)
|
||||
eyeobj.setLoc(get_turf(src))
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
@@ -49,22 +49,20 @@
|
||||
if(aiRestorePowerRoutine == 2)
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
aiRestorePowerRoutine = 0
|
||||
blind.layer = 0
|
||||
clear_fullscreen("blind")
|
||||
else if(aiRestorePowerRoutine == 3)
|
||||
src << "Alert cancelled. Power has been restored."
|
||||
aiRestorePowerRoutine = 0
|
||||
blind.layer = 0
|
||||
clear_fullscreen("blind")
|
||||
|
||||
|
||||
else
|
||||
|
||||
blind.screen_loc = "1,1 to 15,15"
|
||||
if(blind.layer != 18)
|
||||
blind.layer = 18
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
see_in_dark = 0
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
@@ -85,7 +83,6 @@
|
||||
if(my_area && my_area.power_equip && !istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
aiRestorePowerRoutine = 0
|
||||
blind.layer = 0
|
||||
return
|
||||
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
|
||||
sleep(20)
|
||||
@@ -122,7 +119,7 @@
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
aiRestorePowerRoutine = 0
|
||||
blind.layer = 0
|
||||
clear_fullscreen("blind")
|
||||
return
|
||||
|
||||
switch(PRP)
|
||||
|
||||
@@ -5,21 +5,9 @@
|
||||
blood.override = 1
|
||||
client.images += blood
|
||||
regenerate_icons()
|
||||
flash = new /obj/screen()
|
||||
flash.icon_state = "blank"
|
||||
flash.name = "flash"
|
||||
flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
flash.layer = 17
|
||||
blind = new /obj/screen()
|
||||
blind.icon_state = "black"
|
||||
blind.name = " "
|
||||
blind.screen_loc = "1,1 to 15,15"
|
||||
blind.layer = 0
|
||||
client.screen.Add( blind, flash )
|
||||
|
||||
if(stat != DEAD)
|
||||
for(var/obj/machinery/ai_status_display/O in machines) //change status
|
||||
O.mode = 1
|
||||
O.emotion = "Neutral"
|
||||
src.view_core()
|
||||
return
|
||||
view_core()
|
||||
@@ -43,7 +43,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
|
||||
if(!message || announcing_vox > world.time)
|
||||
return
|
||||
|
||||
var/list/words = text2list(trim(message), " ")
|
||||
var/list/words = splittext(trim(message), " ")
|
||||
var/list/incorrect_words = list()
|
||||
|
||||
if(words.len > 30)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
card.overlays += "pai-off"
|
||||
stat = DEAD
|
||||
canmove = 0
|
||||
if(blind) blind.layer = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", src.flash)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
src.adjustBruteLoss(damage)
|
||||
src.updatehealth()
|
||||
else
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
var/obj/machinery/recharge_station/RC = loc
|
||||
RC.go_out()
|
||||
|
||||
if(blind) blind.layer = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
@@ -338,3 +338,7 @@
|
||||
/mob/living/silicon/robot/drone/update_canmove()
|
||||
. = ..()
|
||||
density = 0 //this is reset every canmove update otherwise
|
||||
|
||||
/mob/living/simple_animal/drone/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
@@ -175,11 +175,11 @@ var/list/robot_verbs_default = list(
|
||||
//Check for custom sprite
|
||||
if(!custom_sprite)
|
||||
var/file = file2text("config/custom_sprites.txt")
|
||||
var/lines = text2list(file, "\n")
|
||||
var/lines = splittext(file, "\n")
|
||||
|
||||
for(var/line in lines)
|
||||
// split & clean up
|
||||
var/list/Entry = text2list(line, ";")
|
||||
var/list/Entry = splittext(line, ";")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
@@ -866,7 +866,7 @@ var/list/robot_verbs_default = list(
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
|
||||
"<span class='userdanger'>[M] has slashed at [src]!</span>")
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
@@ -895,7 +895,7 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(..()) //successful slime shock
|
||||
flick("noise", flash)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
var/stunprob = M.powerlevel * 7 + 10
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if(2)
|
||||
src.take_organ_damage(10)
|
||||
Stun(3)
|
||||
flick("noise", src:flash)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
src << "\red <B>*BZZZT*</B>"
|
||||
src << "\red Warning: Electromagnetic pulse detected."
|
||||
..()
|
||||
@@ -351,3 +351,7 @@
|
||||
|
||||
/mob/living/silicon/get_access()
|
||||
return IGNORE_ACCESS //silicons always have access
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/noise)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
@@ -49,7 +49,6 @@
|
||||
//if we're chasing someone, get a little bit angry
|
||||
if(target_mob && prob(10))
|
||||
feral++
|
||||
M.flash_pain()
|
||||
|
||||
//calm down a little bit
|
||||
if(feral > 0)
|
||||
|
||||
@@ -1169,9 +1169,6 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/get_species()
|
||||
return ""
|
||||
|
||||
/mob/proc/flash_weak_pain()
|
||||
flick("weak_pain",pain)
|
||||
|
||||
/mob/proc/get_visible_implants(var/class = 0)
|
||||
var/list/visible_implants = list()
|
||||
for(var/obj/item/O in embedded)
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
//Not in use yet
|
||||
var/obj/effect/organstructure/organStructure = null
|
||||
|
||||
var/obj/screen/flash = null
|
||||
var/obj/screen/blind = null
|
||||
var/obj/screen/hands = null
|
||||
var/obj/screen/pullin = null
|
||||
var/obj/screen/internals = null
|
||||
@@ -26,8 +24,6 @@
|
||||
var/obj/screen/throw_icon = null
|
||||
var/obj/screen/nutrition_icon = null
|
||||
var/obj/screen/pressure = null
|
||||
var/obj/screen/damageoverlay = null
|
||||
var/obj/screen/pain = null
|
||||
var/obj/screen/gun/item/item_use_icon = null
|
||||
var/obj/screen/gun/move/gun_move_icon = null
|
||||
var/obj/screen/gun/run/gun_run_icon = null
|
||||
|
||||
@@ -106,8 +106,8 @@
|
||||
active=on
|
||||
var/statestr=on?"on":"off"
|
||||
// Spammy message_admins("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in [formatJumpTo(src)]",0,1)
|
||||
log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x], [y], [z]) AAC prints: [list2text(signal.data["hiddenprints"])]")
|
||||
investigate_log("turned <font color='orange'>[statestr]</font> by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [list2text(signal.data["hiddenprints"])]","singulo")
|
||||
log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x], [y], [z]) AAC prints: [jointext(signal.data["hiddenprints"], "")]")
|
||||
investigate_log("turned <font color='orange'>[statestr]</font> by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [jointext(signal.data["hiddenprints"], "")]","singulo")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/emitter/Destroy()
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
src << "Missing Input"
|
||||
return
|
||||
|
||||
var/list/startCoords = text2list(startInput, ";")
|
||||
var/list/endCoords = text2list(endInput, ";")
|
||||
var/list/startCoords = splittext(startInput, ";")
|
||||
var/list/endCoords = splittext(endInput, ";")
|
||||
if(!startCoords || !endCoords)
|
||||
src << "Invalid Coords"
|
||||
src << "Start Input: [startInput]"
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
var/moduleClusters = input("Cluster Flags (Cancel to leave unchanged from defaults)","Map Gen Settings") as null|anything in clusters
|
||||
//null for default
|
||||
|
||||
|
||||
var/theCluster = 0
|
||||
if(moduleClusters != "None")
|
||||
if(!clusters[moduleClusters])
|
||||
@@ -187,7 +187,7 @@
|
||||
theCluster = clusters[moduleClusters]
|
||||
else
|
||||
theCluster = CLUSTER_CHECK_NONE
|
||||
|
||||
|
||||
if(theCluster)
|
||||
for(var/datum/mapGeneratorModule/M in N.modules)
|
||||
M.clusterCheckFlags = theCluster
|
||||
|
||||
@@ -230,13 +230,13 @@
|
||||
in_chamber.p_y = text2num(mouse_control["icon-y"])
|
||||
if(mouse_control["screen-loc"])
|
||||
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
|
||||
var/list/screen_loc_params = text2list(mouse_control["screen-loc"], ",")
|
||||
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
|
||||
|
||||
//Split X+Pixel_X up into list(X, Pixel_X)
|
||||
var/list/screen_loc_X = text2list(screen_loc_params[1],":")
|
||||
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
|
||||
|
||||
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
|
||||
var/list/screen_loc_Y = text2list(screen_loc_params[2],":")
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
|
||||
var/x = text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32
|
||||
var/y = text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32
|
||||
|
||||
@@ -249,13 +249,12 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
for(var/mob/living/carbon/C in viewers(5, location))
|
||||
if(C.eyecheck())
|
||||
continue
|
||||
flick("e_flash", C.flash)
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Weaken(5)
|
||||
continue
|
||||
C.Stun(5)
|
||||
if(C.flash_eyes())
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Weaken(5)
|
||||
continue
|
||||
C.Stun(5)
|
||||
|
||||
|
||||
/datum/chemical_reaction/flash_powder/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
@@ -265,13 +264,11 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
for(var/mob/living/carbon/C in viewers(5, location))
|
||||
if(C.eyecheck())
|
||||
continue
|
||||
flick("e_flash", C.flash)
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Weaken(5)
|
||||
continue
|
||||
C.Stun(5)
|
||||
if(C.flash_eyes())
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Weaken(5)
|
||||
continue
|
||||
C.Stun(5)
|
||||
holder.remove_reagent("flash_powder", created_volume)
|
||||
|
||||
/datum/reagent/smoke_powder
|
||||
|
||||
@@ -89,9 +89,8 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_eyes()
|
||||
|
||||
for(var/i = 1, i <= 5, i++)
|
||||
var/chosen = pick(critters)
|
||||
@@ -127,9 +126,8 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_eyes()
|
||||
|
||||
var/chosen = pick(critters)
|
||||
var/mob/living/simple_animal/hostile/C = new chosen
|
||||
@@ -153,9 +151,8 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_eyes()
|
||||
|
||||
for(var/i = 1, i <= 4 + rand(1,2), i++)
|
||||
var/chosen = pick(borks)
|
||||
@@ -181,9 +178,8 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_eyes()
|
||||
|
||||
for(var/i = 1, i <= 4 + rand(1,2), i++)
|
||||
var/chosen = pick(borks)
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
var/datum/reagent/B
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if(H.species && H.species.exotic_blood && H.reagents.total_volume)
|
||||
H.reagents.trans_to(src,amount)
|
||||
if(H.species && H.species.exotic_blood && H.vessel.total_volume)
|
||||
H.vessel.trans_to(src,amount)
|
||||
else
|
||||
B = T.take_blood(src,amount)
|
||||
else
|
||||
@@ -136,6 +136,8 @@
|
||||
user << "\blue You take a blood sample from [target]"
|
||||
for(var/mob/O in viewers(4, user))
|
||||
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] takes a sample from [target].</span>", "<span class='notice'>You take a sample from [target].</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
|
||||
@@ -49,12 +49,12 @@
|
||||
var/list/temp_list
|
||||
if(!id_with_upload.len)
|
||||
temp_list = list()
|
||||
temp_list = text2list(id_with_upload_string, ";")
|
||||
temp_list = splittext(id_with_upload_string, ";")
|
||||
for(var/N in temp_list)
|
||||
id_with_upload += text2num(N)
|
||||
if(!id_with_download.len)
|
||||
temp_list = list()
|
||||
temp_list = text2list(id_with_download_string, ";")
|
||||
temp_list = splittext(id_with_download_string, ";")
|
||||
for(var/N in temp_list)
|
||||
id_with_download += text2num(N)
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/*var/l = lentext(msg)
|
||||
if(findtext(msg," ",l,l+1)==0)
|
||||
msg+=" "*/
|
||||
seperate = text2list(msg, " ")
|
||||
seperate = splittext(msg, " ")
|
||||
|
||||
for(var/Xa = 1,Xa<seperate.len,Xa++)
|
||||
var/next = Xa + 1
|
||||
@@ -81,7 +81,7 @@
|
||||
if(!word)
|
||||
text = "[pick(heard_words)]"
|
||||
else
|
||||
text = pick(text2list(word, " "))
|
||||
text = pick(splittext(word, " "))
|
||||
if(lentext(text)==1)
|
||||
text=uppertext(text)
|
||||
else
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
@param replacestring: the string to replace the substring with
|
||||
|
||||
*/
|
||||
interpreter.SetProc("replace", /proc/replacetext)
|
||||
interpreter.SetProc("replace", /proc/n_replacetext)
|
||||
|
||||
/*
|
||||
-> Locates an element/substring inside of a list or string
|
||||
@@ -180,21 +180,20 @@
|
||||
interpreter.SetProc("shuffle", /proc/shuffle)
|
||||
interpreter.SetProc("uniquevector", /proc/uniquelist)
|
||||
|
||||
interpreter.SetProc("text2vector", /proc/text2list)
|
||||
interpreter.SetProc("text2vectorEx",/proc/text2listEx)
|
||||
interpreter.SetProc("vector2text", /proc/list2text)
|
||||
interpreter.SetProc("text2vector", /proc/n_splittext)
|
||||
interpreter.SetProc("vector2text", /proc/n_jointext)
|
||||
|
||||
// Donkie~
|
||||
// Strings
|
||||
interpreter.SetProc("lower", /proc/n_lower)
|
||||
interpreter.SetProc("upper", /proc/n_upper)
|
||||
interpreter.SetProc("explode", /proc/string_explode)
|
||||
interpreter.SetProc("implode", /proc/list2text)
|
||||
interpreter.SetProc("implode", /proc/n_jointext)
|
||||
interpreter.SetProc("repeat", /proc/n_repeat)
|
||||
interpreter.SetProc("reverse", /proc/reverse_text)
|
||||
interpreter.SetProc("tonum", /proc/n_str2num)
|
||||
interpreter.SetProc("capitalize", /proc/capitalize)
|
||||
interpreter.SetProc("replacetextEx",/proc/replacetextEx)
|
||||
interpreter.SetProc("replacetextEx",/proc/n_replacetextEx)
|
||||
|
||||
// Numbers
|
||||
interpreter.SetProc("tostring", /proc/n_num2str)
|
||||
|
||||
@@ -167,12 +167,12 @@
|
||||
proc/string_explode(var/string, var/separator = "")
|
||||
//writepanic("[__FILE__].[__LINE__] \\/proc/string_explode() called tick#: [world.time]")
|
||||
if(istext(string) && (istext(separator) || isnull(separator)))
|
||||
return text2list(string, separator)
|
||||
return splittext(string, separator)
|
||||
|
||||
//Converts a list to a string
|
||||
/proc/list_implode(var/list/li, var/separator)
|
||||
if(istype(li) && (istext(separator) || isnull(separator)))
|
||||
return list2text(li, separator)
|
||||
return jointext(li, separator)
|
||||
|
||||
proc/n_repeat(var/string, var/amount)
|
||||
//writepanic("[__FILE__].[__LINE__] \\/proc/n_repeat() called tick#: [world.time]")
|
||||
@@ -260,4 +260,16 @@ proc/n_round(var/num)
|
||||
|
||||
/proc/n_log(var/num)
|
||||
if(isnum(num) && 0 < num)
|
||||
return log(num)
|
||||
return log(num)
|
||||
|
||||
/proc/n_replacetext(text, r, with)
|
||||
return replacetext(text, r, with)
|
||||
|
||||
/proc/n_replacetextEx(text, r, with)
|
||||
return replacetextEx(text, r, with)
|
||||
|
||||
/proc/n_jointext(list, glue)
|
||||
return jointext(list, glue)
|
||||
|
||||
/proc/n_splittext(text, delim)
|
||||
return splittext(text, delim)
|
||||
@@ -87,7 +87,7 @@ var/list/z_levels_list = list()
|
||||
var/datum/space_level/D
|
||||
var/list/config_settings[SLS.len][]
|
||||
for(var/A in SLS)
|
||||
config_settings[SLS.Find(A)] = text2list(A, ";")
|
||||
config_settings[SLS.Find(A)] = splittext(A, ";")
|
||||
var/conf_set_len = SLS.len
|
||||
SLS.Cut()
|
||||
for(var/A in config_settings)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(prob(10 * severity))
|
||||
return
|
||||
owner << "<span class='warning'>Static obfuscates your vision!</span>"
|
||||
flick("e_flash", owner.flash)
|
||||
owner.flash_eyes(visual = 1)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
mob/proc/flash_pain()
|
||||
flick("pain",pain)
|
||||
|
||||
mob/var/list/pain_stored = list()
|
||||
mob/var/last_pain_message = ""
|
||||
mob/var/next_pain_time = 0
|
||||
@@ -30,20 +27,16 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0
|
||||
if(1 to 10)
|
||||
msg = "\red <b>Your [partname] burns.</b>"
|
||||
if(11 to 90)
|
||||
flash_weak_pain()
|
||||
msg = "\red <b><font size=2>Your [partname] burns badly!</font></b>"
|
||||
if(91 to 10000)
|
||||
flash_pain()
|
||||
msg = "\red <b><font size=3>OH GOD! Your [partname] is on fire!</font></b>"
|
||||
else
|
||||
switch(amount)
|
||||
if(1 to 10)
|
||||
msg = "<b>Your [partname] hurts.</b>"
|
||||
if(11 to 90)
|
||||
flash_weak_pain()
|
||||
msg = "<b><font size=2>Your [partname] hurts badly.</font></b>"
|
||||
if(91 to 10000)
|
||||
flash_pain()
|
||||
msg = "<b><font size=3>OH GOD! Your [partname] is hurting terribly!</font></b>"
|
||||
if(msg && (msg != last_pain_message || prob(10)))
|
||||
last_pain_message = msg
|
||||
|
||||
Reference in New Issue
Block a user