Merge Conflict

This commit is contained in:
FalseIncarnate
2016-04-05 19:26:30 -04:00
252 changed files with 1730 additions and 2379 deletions
+2 -2
View File
@@ -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> | "
+2 -2
View File
@@ -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 "-"
+1 -1
View File
@@ -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])
+1 -1
View File
@@ -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]\"")
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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]\"")
-66
View File
@@ -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")
+11 -12
View File
@@ -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()
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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--)
+2 -2
View File
@@ -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
+8 -8
View File
@@ -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) == "'")
+1 -4
View File
@@ -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)
-6
View File
@@ -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."
+1 -1
View File
@@ -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)
+4 -4
View File
@@ -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")
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+3 -5
View File
@@ -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)
+37
View File
@@ -0,0 +1,37 @@
/datum/event/disease_outbreak
announceWhen = 15
var/virus_type
/datum/event/disease_outbreak/setup()
announceWhen = rand(15, 30)
/datum/event/disease_outbreak/announce()
command_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/start()
if(!virus_type)
virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
if(issmall(H)) //don't infect monkies; that's a waste
continue
if(H.species.virus_immune) //don't let virus immune things get diseases they're not supposed to get.
continue
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
break
if(H.stat == DEAD || foundAlready)
continue
var/datum/disease/D
D = new virus_type()
D.carrier = 1
H.AddDisease(D)
break
+3 -1
View File
@@ -139,6 +139,7 @@ var/list/event_last_fired = list()
severity = EVENT_LEVEL_MODERATE
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 200, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 40, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 250, list(ASSIGNMENT_ENGINEER = 10)),
@@ -169,7 +170,8 @@ var/list/event_last_fired = list()
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Revenant", /datum/event/revenant, 150),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Swarmer Spawn", /datum/event/spawn_swarmer, 150, is_one_shot = 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 0, is_one_shot = 1)
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 0, is_one_shot = 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, 0, list(ASSIGNMENT_MEDICAL = 150), 1)
)
/datum/event_container/major
+17
View File
@@ -0,0 +1,17 @@
/datum/event/meteor_wave/gore/announce()
command_announcement.Announce("Unknown biological debris have been detected near [station_name()], please stand-by.", "Debris Alert")
/datum/event/meteor_wave/gore/setup()
waves = 3
/datum/event/meteor_wave/gore/tick()
if(waves && activeFor >= next_meteor)
spawn() spawn_meteors(rand(5,8), meteors_gore)
next_meteor += rand(15, 30)
waves--
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
/datum/event/meteor_wave/gore/end()
command_announcement.Announce("The station has cleared the debris.", "Debris Alert")
+19
View File
@@ -0,0 +1,19 @@
/datum/event/meteor_wave/goreop/announce()
var/meteor_declaration = "MeteorOps have declared thier intent to utterly destroy [station_name()] with thier own bodies, and dares the crew to try and stop them."
command_announcement.Announce(meteor_declaration, "Declaration of 'War'", 'sound/effects/siren.ogg')
/datum/event/meteor_wave/goreop/setup()
waves = 3
/datum/event/meteor_wave/goreop/tick()
if(waves && activeFor >= next_meteor)
spawn() spawn_meteors(5, meteors_ops)
next_meteor += rand(15, 30)
waves--
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
/datum/event/meteor_wave/goreops/end()
command_announcement.Announce("All MeteorOps are dead. Major Station Victory.", "MeteorOps")
@@ -0,0 +1,15 @@
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
if(issmall(H)) //don't infect monkies; that's a waste.
continue
if(H.species.virus_immune) //don't count things that are virus immune; they'll just get picked and auto-cure
continue
var/foundAlready = 0 //don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
H.ForceContractDisease(D)
break
+10 -8
View File
@@ -41,15 +41,17 @@
if(animation) qdel(animation)
spawn(rand(30,120))
var/blocked = blocked_mobs //global variable for blocked mobs
var/list/tear_critters = list()
for(var/T in typesof(/mob/living/simple_animal))
var/mob/living/simple_animal/SA = T
if(initial(SA.gold_core_spawnable) == CHEM_MOB_SPAWN_HOSTILE)
tear_critters += T
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
for(var/i = 1, i <= 5, i++)
var/chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
C.faction = list("slimesummon")
C.loc = src.loc
for(var/i in 1 to 5)
var/chosen = pick(tear_critters)
var/mob/living/simple_animal/C = new chosen
C.faction |= "chemicalsummon"
C.forceMove(get_turf(src))
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(C, pick(NORTH,SOUTH,EAST,WEST))
-29
View File
@@ -1,29 +0,0 @@
/datum/event/viral_infection
severity = 1
/datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(1, 3)
/datum/event/viral_infection/announce()
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.client && G.stat != DEAD)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom()
D.infectionchance = 1
message_admins("Viral Infection: releasing strain [D.uniqueID]")
while(severity > 0 && candidates.len)
var/mob/living/carbon/human/H = candidates[1]
H.virus2["[D.uniqueID]"] = D
candidates.Remove(candidates[1])
severity--
-28
View File
@@ -1,28 +0,0 @@
/datum/event/viral_outbreak
severity = 1
/datum/event/viral_outbreak/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(2, 4)
/datum/event/viral_outbreak/announce()
command_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/viral_outbreak/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.client && G.stat != DEAD)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom()
message_admins("Viral Outbreak: releasing strain [D.uniqueID]")
while(severity > 0 && candidates.len)
var/mob/living/carbon/human/H = candidates[1]
H.virus2["[D.uniqueID]"] = D
candidates.Remove(candidates[1])
severity--
+4 -4
View File
@@ -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
+9 -9
View File
@@ -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)
+1 -1
View File
@@ -211,7 +211,7 @@
return ..()
/obj/item/device/mobcapsule/attack(var/atom/A, mob/user, prox_flag)
if(!istype(A, /mob/living/simple_animal))
if(!istype(A, /mob/living/simple_animal) || isbot(A))
return ..()
capture(A, user)
return 1
@@ -110,18 +110,6 @@ Works together with spawning an observer, noted above.
if(!loc) return
if(!client) return 0
//regular_hud_updates()
//if(client.images.len)
// for(var/image/hud in client.images)
// if(copytext(hud.icon_state,1,4) == "hud")
// client.images.Remove(hud)
//if(antagHUD)
// var/list/target_list = list()
// for(var/mob/living/target in oview(src, 14))
// if(target.mind && (target.mind.special_role || issilicon(target) || target.mind.nation))
// target_list += target
// if(target_list.len)
// assess_targets(target_list, src)
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
@@ -320,9 +308,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//var/adding_hud = (usr in A.hudusers) ? 0 : 1
for(var/datum/atom_hud/antag/H in (huds))
//if(istype(H, /datum/atom_hud/antag))// || istype(H, /datum/atom_hud/data/human/security/advanced))
if(!M.antagHUD)
//(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
H.add_hud_to(usr)
else
H.remove_hud_from(usr)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
+21 -1
View File
@@ -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
+54 -5
View File
@@ -309,9 +309,54 @@
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
if(weakeyes)
Stun(2)
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
@@ -844,6 +889,10 @@ so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/get_access()
. = ..()
var/obj/item/I = get_active_hand()
if(I)
. |= I.GetAccess()
var/obj/item/RH = get_active_hand()
if(RH)
. |= RH.GetAccess()
var/obj/item/LH = get_inactive_hand()
if(LH)
. |= LH.GetAccess()
@@ -129,7 +129,6 @@
if(!gibbed)
update_canmove()
if(client) blind.layer = 0
timeofdeath = worldtime2text()
med_hud_set_health()
+18 -10
View File
@@ -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
@@ -53,6 +53,8 @@
return 1
if (istype(other, /mob/living/silicon))
return 1
if (istype(other, /mob/living/simple_animal/bot))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/carbon/slime))
@@ -64,6 +64,8 @@
var/ventcrawler = 0 //Determines if the mob can go through the vents.
var/has_fine_manipulation = 1 // Can use small items.
var/list/allowed_consumed_mobs = list() //If a species can consume mobs, put the type of mobs it can consume here.
var/flags = 0 // Various specific features.
var/clothing_flags = 0 // Underwear and socks.
var/exotic_blood
@@ -414,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)
@@ -56,6 +56,9 @@
reagent_tag = PROCESS_ORG
base_color = "#066000"
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken,
/mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble)
suicide_messages = list(
"is attempting to bite their tongue off!",
"is jamming their claws into their eye sockets!",
@@ -107,6 +110,9 @@
flesh_color = "#AFA59E"
base_color = "#333333"
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/chick, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot,
/mob/living/simple_animal/tribble)
suicide_messages = list(
"is attempting to bite their tongue off!",
"is jamming their claws into their eye sockets!",
@@ -148,6 +154,9 @@
flesh_color = "#966464"
base_color = "#B43214"
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken,
/mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble)
suicide_messages = list(
"is attempting to bite their tongue off!",
"is jamming their claws into their eye sockets!",
@@ -355,6 +364,8 @@
blood_color = "#FB9800"
reagent_tag = PROCESS_ORG
allowed_consumed_mobs = list(/mob/living/simple_animal/diona)
suicide_messages = list(
"is attempting to bite their antenna off!",
"is jamming their claws into their eye sockets!",
+47 -75
View File
@@ -245,7 +245,7 @@
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && stat != 2)
if(istype(M, /mob/living) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
@@ -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()
+5
View File
@@ -0,0 +1,5 @@
/mob/living/death(gibbed)
blinded = max(blinded, 1)
clear_fullscreens()
..(gibbed)
+31 -24
View File
@@ -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
+14 -3
View File
@@ -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)
+2 -4
View File
@@ -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
+2 -3
View File
@@ -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
+5 -8
View File
@@ -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)
+1 -13
View File
@@ -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()
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -20,7 +20,7 @@
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
var/obj/item/stack/sheet/wood/cyborg/stack_wood = null
var/obj/item/stack/sheet/wood/stack_wood = null
var/obj/item/stack/sheet/glass/cyborg/stack_glass = null
var/obj/item/stack/sheet/mineral/plastic/cyborg/stack_plastic = null
var/obj/item/weapon/matter_decompiler/decompiler = null
@@ -61,7 +61,7 @@
//Grab stacks.
stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module
stack_wood = locate(/obj/item/stack/sheet/wood/cyborg) in src.module
stack_wood = locate(/obj/item/stack/sheet/wood) in src.module
stack_glass = locate(/obj/item/stack/sheet/glass/cyborg) in src.module
stack_plastic = locate(/obj/item/stack/sheet/mineral/plastic/cyborg) in src.module
@@ -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 ..()
@@ -364,7 +364,7 @@
stack = stack_glass
if("wood")
if(!stack_wood)
stack_wood = new /obj/item/stack/sheet/wood/cyborg(src.module)
stack_wood = new /obj/item/stack/sheet/wood(src.module)
stack_wood.amount = 1
stack = stack_wood
if("plastic")
@@ -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))
@@ -175,7 +175,7 @@
/obj/item/stack/sheet/glass/cyborg = 50,
/obj/item/stack/sheet/rglass/cyborg = 50,
/obj/item/stack/cable_coil/cyborg = 50,
/obj/item/stack/rods = 30,
/obj/item/stack/rods/cyborg = 60,
/obj/item/stack/tile/plasteel = 20
)
@@ -460,10 +460,10 @@
name = "drone module"
module_type = "Engineer"
stacktypes = list(
/obj/item/stack/sheet/wood/cyborg = 10,
/obj/item/stack/sheet/wood = 10,
/obj/item/stack/sheet/rglass/cyborg = 50,
/obj/item/stack/tile/wood = 20,
/obj/item/stack/rods = 30,
/obj/item/stack/rods/cyborg = 60,
/obj/item/stack/tile/plasteel = 20,
/obj/item/stack/sheet/metal/cyborg = 50,
/obj/item/stack/sheet/glass/cyborg = 50,
+2
View File
@@ -56,6 +56,8 @@
return 1
if (istype(other, /mob/living/silicon))
return 1
if (istype(other, /mob/living/simple_animal/bot))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
return ..()
+5 -1
View File
@@ -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)
@@ -3,7 +3,7 @@
// AI (i.e. game AI, not the AI player) controlled bots
/mob/living/simple_animal/bot
icon = 'icons/obj/aibots.dmi'
layer = MOB_LAYER
layer = MOB_LAYER - 0.1
light_range = 3
stop_automated_movement = 1
wander = 0
@@ -132,6 +132,13 @@
radio_config["[radio_channel]"] = 1
Radio.config(radio_config)
add_language("Galactic Common", 1)
add_language("Sol Common", 1)
add_language("Tradeband", 1)
add_language("Gutter", 1)
add_language("Trinary", 1)
default_language = all_languages["Galactic Common"]
bot_core = new bot_core_type(src)
spawn(30)
if(radio_controller && bot_filter)
@@ -389,8 +396,8 @@
/mob/living/simple_animal/bot/proc/speak(message, channel) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
if((!on) || (!message))
return
if(channel && Radio.channels[channel])// Use radio if we have channel key
Radio.autosay(message, name, channel)
if(channel)
Radio.autosay(message, name, channel == "headset" ? null : channel)
else
say(message)
return
@@ -591,7 +591,8 @@
bloodiness--
for(var/mob/living/carbon/human/H in next)
RunOver(H)
if(H != load)
RunOver(H)
// calculates a path to the current destination
// given an optional turf to avoid
@@ -18,6 +18,7 @@
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
ventcrawler = 2
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 0)
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/butterfly/New()
..()
@@ -20,6 +20,7 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
//RUNTIME IS ALIVE! SQUEEEEEEEE~
/mob/living/simple_animal/pet/cat/Runtime
@@ -32,6 +33,7 @@
gender = FEMALE
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/mob/living/simple_animal/pet/cat/Runtime/handle_automated_action()
..()
@@ -96,4 +98,5 @@
flags = NO_BREATHE
faction = list("syndicate")
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
var/mob/living/simple_animal/mouse/movement_target
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
@@ -26,6 +26,7 @@
var/obj/item/inventory_head
var/obj/item/inventory_back
var/facehugger
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/pet/corgi/New()
..()
@@ -397,6 +398,7 @@
response_help = "pets"
response_disarm = "bops"
response_harm = "kicks"
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/mob/living/simple_animal/pet/corgi/Ian/process_ai()
..()
@@ -553,6 +555,7 @@
response_harm = "kicks"
var/turns_since_scan = 0
var/puppies = 0
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
//Lisa already has a cute bow!
/mob/living/simple_animal/pet/corgi/Lisa/Topic(href, href_list)
@@ -22,6 +22,7 @@
var/obj/item/inventory_mask
can_hide = 1
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/crab/handle_automated_movement()
//CRAB movement
@@ -46,6 +47,7 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "stomps"
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
//LOOK AT THIS - ..()??
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
@@ -14,4 +14,5 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
can_collar = 1
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
@@ -111,6 +111,7 @@
health = 50
var/milk_content = 0
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/cow/New()
..()
@@ -178,6 +179,7 @@
small = 1
can_hide = 1
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/chick/New()
..()
@@ -220,6 +222,7 @@ var/global/chicken_count = 0
small = 1
can_hide = 1
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/chicken/New()
..()
@@ -297,6 +300,7 @@ var/global/chicken_count = 0
attacktext = "kicks"
health = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/turkey
name = "turkey"
@@ -318,6 +322,7 @@ var/global/chicken_count = 0
attacktext = "pecks"
health = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/goose
name = "goose"
@@ -339,6 +344,7 @@ var/global/chicken_count = 0
attacktext = "kicks"
health = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/seal
name = "seal"
@@ -360,6 +366,7 @@ var/global/chicken_count = 0
attacktext = "kicks"
health = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/walrus
name = "walrus"
@@ -381,3 +388,4 @@ var/global/chicken_count = 0
attacktext = "kicks"
health = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
@@ -17,11 +17,13 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
//Captain fox
/mob/living/simple_animal/pet/fox/Renault
name = "Renault"
desc = "Renault, the Captain's trustworthy fox. I wonder what it says?"
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
//Syndi fox
/mob/living/simple_animal/pet/fox/Syndifox
@@ -33,3 +35,4 @@
icon_resting = "Syndifox_rest"
flags = NO_BREATHE
faction = list("syndicate")
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
@@ -22,3 +22,4 @@
can_hide = 1
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 1)
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
@@ -31,6 +31,7 @@
can_hide = 1
holder_type = /obj/item/weapon/holder/mouse
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/mouse/handle_automated_speech()
..()
@@ -144,3 +145,4 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "splats"
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
@@ -17,6 +17,7 @@
response_disarm = "bops"
response_harm = "kicks"
see_in_dark = 5
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/pet/pug/process_ai()
..()
@@ -14,4 +14,5 @@
response_harm = "smacks the"
harm_intent_damage = 5
pass_flags = PASSTABLE
can_hide = 1
can_hide = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
@@ -29,6 +29,7 @@
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
heat_damage_per_tick = 20
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/alien/drone
@@ -127,6 +128,7 @@
move_to_delay = 4
maxHealth = 400
health = 400
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/obj/item/projectile/neurotox
name = "neurotoxin"
@@ -151,6 +153,7 @@
icon_state = "maid"
icon_living = "maid"
icon_dead = "maid_dead"
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID //no fun allowed
/mob/living/simple_animal/hostile/alien/maid/AttackingTarget()
if(istype(target, /atom/movable))
@@ -29,6 +29,7 @@
faction = list("scarybat")
var/mob/living/owner
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/scarybat/New(loc, mob/living/L as mob)
..()
@@ -31,6 +31,7 @@
var/stance_step = 0
faction = list("russian")
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/hostile/bear/Hudson
@@ -33,6 +33,7 @@
faction = list("carp")
flying = 1
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/movement_dir = 0)
return 1 //No drifting in space for space carp! //original comments do not steal
@@ -53,6 +54,7 @@
icon_state = "holocarp"
icon_living = "holocarp"
maxbodytemp = INFINITY
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/mob/living/simple_animal/hostile/carp/holocarp/death()
..()
@@ -13,4 +13,5 @@
attacktext = "chomps"
attack_sound = 'sound/weapons/bite.ogg'
faction = list("creature")
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
@@ -25,6 +25,7 @@
speed = 4
faction = list("faithless")
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/movement_dir = 0)
return 1
@@ -49,6 +49,7 @@
move_to_delay = 6
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
//nursemaids - these create webs and eggs
/mob/living/simple_animal/hostile/poison/giant_spider/nurse
@@ -21,6 +21,7 @@
ventcrawler = 2
var/datum/mind/origin
var/egg_lain = 0
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/headcrab/proc/Infect(mob/living/carbon/victim)
var/obj/item/organ/internal/body_egg/changeling_egg/egg = new(victim)
@@ -80,8 +81,12 @@
if(origin && origin.current && (origin.current.stat == DEAD))
origin.transfer_to(M)
if(origin.changeling)
origin.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null)
if(!origin.changeling)
M.make_changeling()
if(origin.changeling.can_absorb_dna(M, owner))
origin.changeling.absorb_dna(owner, M)
origin.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null)
M.key = origin.key
owner.gib()
@@ -21,6 +21,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
speak_emote = list("states")
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/hivebot/range
name = "Hivebot"
@@ -30,6 +30,7 @@
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
var/stalk_tick_delay = 3
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/panther/ListTargets()
var/list/targets = list()
@@ -87,6 +88,7 @@
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
var/stalk_tick_delay = 3
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/snake/ListTargets()
var/list/targets = list()
@@ -30,6 +30,7 @@
move_to_delay = 9
var/is_electronic = 0
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/mimic/FindTarget()
. = ..()
@@ -139,6 +140,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
var/mob/living/creator = null // the creator
var/destroy_objects = 0
var/knockdown_people = 0
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/mob/living/creator, var/destroy_original = 0)
..(loc)
@@ -24,6 +24,7 @@
//Spaceborn beings don't get hurt by space
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/poison/bees/Process_Spacemove(var/check_drift = 0)
return 1
@@ -132,6 +132,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
flying = 1
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/viscerator/death()
..()
@@ -28,6 +28,7 @@
minbodytemp = 0
faction = list("hostile", "winter")
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/tree/FindTarget()
. = ..()
@@ -33,6 +33,7 @@
bodytemperature = 73.0 //it's made of snow and hatred, so it's pretty cold.
maxbodytemp = 280.15 //at roughly 7 C, these will start melting (dying) from the warmth. Mind over matter or something.
heat_damage_per_tick = 10 //Now With Rapid Thawing Action!
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/winter/snowman/death()
@@ -63,6 +64,7 @@
melee_damage_lower = 5
melee_damage_upper = 10
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/winter/santa
maxHealth = 150 //if this seems low for a "boss", it's because you have to fight him multiple times, with him fully healing between stages
@@ -82,6 +82,7 @@
//Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding.
var/obj/item/held_item = null
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
/mob/living/simple_animal/parrot/New()
@@ -272,13 +273,13 @@
//Sprite and AI update for when a parrot gets pulled
if(pulledby && stat == CONSCIOUS)
icon_state = "parrot_fly"
icon_state = "parrot_fly"
/mob/living/simple_animal/parrot/process_ai()
if(pulledby)
parrot_state = PARROT_WANDER
return
if(!isturf(src.loc) || !canmove || buckled)
return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove)
@@ -682,6 +683,7 @@
name = "Poly"
desc = "Poly the Parrot. An expert on quantum cracker theory."
speak = list("Poly wanna cracker!", ":eCheck the singlo, you chucklefucks!",":eCheck the tesla, you shits!",":eSTOP HOT-WIRING THE ENGINE, FUCKING CHRIST!",":eWire the solars, you lazy bums!",":eWHO TOOK THE DAMN HARDSUITS?",":eOH GOD ITS FREE CALL THE SHUTTLE")
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/mob/living/simple_animal/parrot/Poly/New()
ears = new /obj/item/device/radio/headset/headset_eng(src)
@@ -67,6 +67,8 @@
var/scan_ready = 1
var/simplespecies //Sorry, no spider+corgi buttbabies.
var/gold_core_spawnable = CHEM_MOB_SPAWN_INVALID //if CHEM_MOB_SPAWN_HOSTILE can be spawned by plasma with gold core, CHEM_MOB_SPAWN_FRIENDLY are 'friendlies' spawned with blood
var/master_commander = null //holding var for determining who own/controls a sentient simple animal (for sentience potions).
var/sentience_type = SENTIENCE_ORGANIC // Sentience type, for slime potions
@@ -695,4 +697,4 @@
. |= collar.GetAccess()
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
return
return

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