From 4edf69c3c0f8c3ce66b01572e5816eba3ac3ffb0 Mon Sep 17 00:00:00 2001 From: Markolie Date: Sun, 12 Mar 2017 20:59:28 +0100 Subject: [PATCH 1/6] Revenant nightvision fix --- .../gamemodes/miniantags/revenant/revenant.dm | 2 +- .../miniantags/revenant/revenant_abilities.dm | 2 ++ .../mob/living/simple_animal/hostile/statue.dm | 18 +++++++----------- .../mob/living/simple_animal/simple_animal.dm | 9 +++++---- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index f263d658f6b..d3bcdce9f7e 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -17,7 +17,7 @@ invisibility = INVISIBILITY_REVENANT health = INFINITY //Revenants don't use health, they use essence instead maxHealth = INFINITY - see_invisible = INVISIBILITY_REVENANT + see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING see_in_dark = 8 universal_understand = 1 response_help = "passes through" diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 85560dda620..3504ada2a94 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -110,6 +110,8 @@ message = "You toggle your night vision." action_icon_state = "r_nightvision" action_background_icon_state = "bg_revenant" + non_night_vision = INVISIBILITY_REVENANT + night_vision = SEE_INVISIBLE_OBSERVER_NOLIGHTING //Transmit: the revemant's only direct way to communicate. Sends a single message silently to a single mob /obj/effect/proc_holder/spell/targeted/revenant_transmit diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 41ca671bc56..168ed2d441c 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -39,6 +39,7 @@ search_objects = 1 // So that it can see through walls + see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS anchored = 1 status_flags = GODMODE // Cannot push also @@ -56,9 +57,6 @@ AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(null)) AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(null)) - // Give nightvision - see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING - // Set creator if(creator) src.creator = creator @@ -190,7 +188,7 @@ //Toggle Night Vision /obj/effect/proc_holder/spell/targeted/night_vision - name = "Toggle Nightvision \[ON\]" + name = "Toggle Nightvision" desc = "Toggle your nightvision mode." charge_max = 10 @@ -199,17 +197,15 @@ message = "You toggle your night vision!" range = -1 include_user = 1 + var/non_night_vision = SEE_INVISIBLE_LIVING + var/night_vision = SEE_INVISIBLE_OBSERVER_NOLIGHTING /obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets, mob/user = usr) - for(var/mob/living/target in targets) - if(target.see_invisible == SEE_INVISIBLE_LIVING) - target.see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING - name = "Toggle Nightvision \[ON\]" + if(target.see_invisible == non_night_vision) + target.see_invisible = night_vision else - target.see_invisible = SEE_INVISIBLE_LIVING - name = "Toggle Nightvision \[OFF\]" - return + target.see_invisible = non_night_vision /mob/living/simple_animal/hostile/statue/sentience_act() faction -= "neutral" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 9669c90b3ec..aec9d2d0c95 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -712,16 +712,17 @@ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion return -/mob/living/simple_animal/update_sight() +/mob/living/simple_animal/update_sight(reset_sight = FALSE) if(!client) return if(stat == DEAD) grant_death_vision() return - see_invisible = initial(see_invisible) - see_in_dark = initial(see_in_dark) - sight = initial(sight) + if(reset_sight) + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + sight = initial(sight) if(client.eye != src) var/atom/A = client.eye From 60496300ea3f6a297f8ceb8be934c76319071ab9 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 13 Mar 2017 13:42:12 +0100 Subject: [PATCH 2/6] Fix attack message on vent weld --- code/ATMOSPHERICS/components/unary_devices/vent_pump.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index eabeccb641f..86e7ad2b22f 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -337,8 +337,8 @@ welded = 0 update_icon() else - to_chat(user, "The welding tool needs to be on to start this task.") + return 1 else to_chat(user, "You need more welding fuel to complete this task.") return 1 @@ -366,7 +366,7 @@ to_chat(user, "You can't shove that down there when it is closed") else to_chat(user, "The vent is welded.") - return + return 1 if(istype(W, /obj/item/device/multitool)) update_multitool_menu(user) return 1 From 3d8b2543c5a8283aa02916ab3359edaf95bf65d1 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 13 Mar 2017 13:46:19 +0100 Subject: [PATCH 3/6] Fix follow source on brig doors --- code/game/machinery/doors/brigdoors.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 66547ff0759..ecdd959f717 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -37,6 +37,7 @@ Radio = new /obj/item/device/radio(src) Radio.listening = 0 Radio.config(list("Security" = 0)) + Radio.follow_target = src pixel_x = ((dir & 3)? (0) : (dir == 4 ? 32 : -32)) pixel_y = ((dir & 3)? (dir ==1 ? 24 : -32) : (0)) From d458902782d2c6ae5f77bb794a16d8c1689169e9 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 13 Mar 2017 14:11:19 +0100 Subject: [PATCH 4/6] Fix Jaws of Life unpowered door forcing --- code/game/machinery/doors/airlock.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index ba861667045..ccacb4fef30 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -873,14 +873,11 @@ About the new airlock wires panel: qdel(src) return - else if(istype(C, /obj/item/weapon/crowbar/power)) + if(istype(C, /obj/item/weapon/crowbar/power) && density) if(isElectrified()) shock(user, 100)//it's like sticking a fork in a power socket return - if(!density)//already open - return - if(locked) to_chat(user, "The bolts are down, it won't budge!") return @@ -900,7 +897,8 @@ About the new airlock wires panel: open(2) if(density && !open(2)) to_chat(user, "Despite your attempts, the [src] refuses to open.") - else if(arePowerSystemsOn()) + return + if(arePowerSystemsOn()) to_chat(user, "\blue The airlock's motors resist your efforts to force it.") else if(locked) to_chat(user, "\blue The airlock's bolts prevent it from being forced.") From e2a30cc7fec387ab4d56c41a598814b91b58a1d3 Mon Sep 17 00:00:00 2001 From: Markolie Date: Thu, 16 Mar 2017 23:39:26 +0100 Subject: [PATCH 5/6] Preference, changeling and record fixes --- code/game/gamemodes/changeling/changeling.dm | 10 ++-- code/game/gamemodes/cult/cult.dm | 4 +- code/game/gamemodes/cult/runes.dm | 3 + code/game/machinery/computer/medical.dm | 35 ++++++------ code/game/machinery/computer/security.dm | 55 +++++++------------ code/modules/client/preference/preferences.dm | 32 +++++------ 6 files changed, 63 insertions(+), 76 deletions(-) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 1e67760322c..5c3f94a44a3 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -108,11 +108,11 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" if(identity_theft.target && identity_theft.target.current) identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this. var/mob/living/carbon/human/H = identity_theft.target.current - if(check_species_absorb(H.species)) // For species that can't be absorbed - should default to an escape objective - return - else + if(can_absorb_species(H.species)) // For species that can't be absorbed - should default to an escape objective identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [identity_theft.target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card." - changeling.objectives += identity_theft + changeling.objectives += identity_theft + else + qdel(identity_theft) if(!(locate(/datum/objective/escape) in changeling.objectives)) if(prob(70)) @@ -316,5 +316,5 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" return 1 -/proc/check_species_absorb(datum/species/S) +/proc/can_absorb_species(datum/species/S) return !(S.flags & NO_DNA) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 2e5fa3cfe61..bce324ade0c 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -339,10 +339,10 @@ var/global/list/all_cults = list() if("harvest") if(harvested > harvest_target) - explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] eaten) Success!" + explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] sacrificed) Success!" feedback_add_details("cult_objective","cult_harvest|SUCCESS") else - explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] eaten) Fail!" + explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] sacrificed) Fail!" feedback_add_details("cult_objective","cult_harvest|FAIL") if("hijack") diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index a83a4551dc3..15fdfc6f61c 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -427,6 +427,9 @@ var/list/teleport_runes = list() if(is_sacrifice_target(T.mind)) sacrifice_fulfilled = 1 new /obj/effect/overlay/temp/cult/sac(loc) + if(ticker && ticker.mode && ticker.mode.name == "cult") + var/datum/game_mode/cult/cult_mode = ticker.mode + cult_mode.harvested++ for(var/M in invokers) if(sacrifice_fulfilled) to_chat(M, "\"Yes! This is the one I desire! You have done well.\"") diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 79696fe1c9d..7c2df327285 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -234,7 +234,6 @@ screen = MED_DATA_MAIN if(authenticated) - var/incapable = (usr.stat || usr.restrained() || (!in_range(src, usr) && !issilicon(usr))) if(href_list["logout"]) authenticated = null screen = null @@ -281,7 +280,7 @@ setTemp("

Are you sure you wish to delete all records?

", buttons) if(href_list["field"]) - if(incapable) + if(..()) return 1 var/a1 = active1 var/a2 = active2 @@ -289,7 +288,7 @@ if("fingerprint") if(istype(active1, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", active1.fields["fingerprint"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 active1.fields["fingerprint"] = t1 if("sex") @@ -301,61 +300,61 @@ if("age") if(istype(active1, /datum/data/record)) var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 active1.fields["age"] = t1 if("mi_dis") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", active2.fields["mi_dis"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["mi_dis"] = t1 if("mi_dis_d") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", active2.fields["mi_dis_d"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["mi_dis_d"] = t1 if("ma_dis") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", active2.fields["ma_dis"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["ma_dis"] = t1 if("ma_dis_d") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", active2.fields["ma_dis_d"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["ma_dis_d"] = t1 if("alg") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", active2.fields["alg"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["alg"] = t1 if("alg_d") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", active2.fields["alg_d"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["alg_d"] = t1 if("cdi") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", active2.fields["cdi"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["cdi"] = t1 if("cdi_d") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", active2.fields["cdi_d"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["cdi_d"] = t1 if("notes") if(istype(active2, /datum/data/record)) var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(active2.fields["notes"]), null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["notes"] = t1 if("p_stat") @@ -390,21 +389,21 @@ if("b_dna") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input DNA hash:", "Med. records", active2.fields["b_dna"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["b_dna"] = t1 if("vir_name") var/datum/data/record/v = locate(href_list["edit_vir"]) if(v) var/t1 = copytext(trim(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 v.fields["name"] = t1 if("vir_desc") var/datum/data/record/v = locate(href_list["edit_vir"]) if(v) var/t1 = copytext(trim(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 v.fields["description"] = t1 @@ -454,7 +453,7 @@ return 1 var/a2 = active2 var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [worldtime2text()]
[t1]" @@ -465,7 +464,7 @@ if(href_list["search"]) var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text - if(!t1 || incapable) + if(!t1 || ..()) return 1 active1 = null active2 = null diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index bdb1110379d..6fdb90575ea 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -120,7 +120,7 @@ else security["empty"] = 1 return data - + /obj/machinery/computer/secure_data/Topic(href, href_list) if(..()) return 1 @@ -139,10 +139,12 @@ if("del_all2") for(var/datum/data/record/R in data_core.security) qdel(R) + update_all_mob_security_hud() setTemp("

All records deleted.

") if("del_r2") if(active2) qdel(active2) + update_all_mob_security_hud() if("del_rg2") if(active1) for(var/datum/data/record/R in data_core.medical) @@ -153,6 +155,7 @@ if(active2) qdel(active2) active2 = null + update_all_mob_security_hud() screen = SEC_DATA_R_LIST if("criminal") if(active2) @@ -168,8 +171,7 @@ if("released") active2.fields["criminal"] = "Released" - for(var/mob/living/carbon/human/H in mob_list) - H.sec_hud_set_security_status() + update_all_mob_security_hud() if("rank") if(active1) active1.fields["rank"] = temp_href[2] @@ -208,7 +210,6 @@ screen = SEC_DATA_R_LIST if(authenticated) - var/incapable = (usr.stat || usr.restrained() || (!in_range(src, usr) && !issilicon(usr))) if(href_list["logout"]) authenticated = null screen = null @@ -247,24 +248,6 @@ active2 = M screen = SEC_DATA_RECORD - /*else if("s_fingerprint") - var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text - if(!t1 || usr.stat || !authenticated || usr.restrained() || (!in_range(src, usr) && (!issilicon(usr))) - return - active1 = null - active2 = null - t1 = lowertext(t1) - for(var/datum/data/record/R in data_core.general) - if(lowertext(R.fields["fingerprint"]) == t1) - active1 = R - if(!active1) - setTemp("Could not locate record [t1].") - else - for(var/datum/data/record/E in data_core.security) - if((E.fields["name"] == active1.fields["name"] && E.fields["id"] == active1.fields["id"])) - active2 = E - screen = SEC_DATA_RECORD */ - else if(href_list["del_all"]) var/list/buttons = list() buttons[++buttons.len] = list("name" = "Yes", "icon" = "check", "href" = "del_all2=1", "status" = null) @@ -363,7 +346,7 @@ if(istype(active2, /datum/data/record)) var/a2 = active2 var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [worldtime2text()]
[t1]" @@ -373,7 +356,7 @@ active2.fields["comments"] -= active2.fields["comments"][index] if(href_list["field"]) - if(incapable) + if(..()) return 1 var/a1 = active1 var/a2 = active2 @@ -381,7 +364,7 @@ if("name") if(istype(active1, /datum/data/record)) var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) - if(!t1 || !length(trim(t1)) || incapable || active1 != a1) + if(!t1 || !length(trim(t1)) || ..() || active1 != a1) return 1 active1.fields["name"] = t1 if(istype(active2, /datum/data/record)) @@ -389,7 +372,7 @@ if("id") if(istype(active1, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 active1.fields["id"] = t1 if(istype(active2, /datum/data/record)) @@ -397,7 +380,7 @@ if("fingerprint") if(istype(active1, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 active1.fields["fingerprint"] = t1 if("sex") @@ -409,37 +392,37 @@ if("age") if(istype(active1, /datum/data/record)) var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 active1.fields["age"] = t1 if("mi_crim") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input minor crimes list:", "Secure. records", active2.fields["mi_crim"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["mi_crim"] = t1 if("mi_crim_d") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please summarize minor crimes:", "Secure. records", active2.fields["mi_crim_d"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["mi_crim_d"] = t1 if("ma_crim") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please input major crimes list:", "Secure. records", active2.fields["ma_crim"], null) as text)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["ma_crim"] = t1 if("ma_crim_d") if(istype(active2, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please summarize major crimes:", "Secure. records", active2.fields["ma_crim_d"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["ma_crim_d"] = t1 if("notes") if(istype(active2, /datum/data/record)) var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active2 != a2) + if(!t1 || ..() || active2 != a2) return 1 active2.fields["notes"] = t1 if("criminal") @@ -464,13 +447,17 @@ if("species") if(istype(active1, /datum/data/record)) var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)), 1, MAX_MESSAGE_LEN) - if(!t1 || incapable || active1 != a1) + if(!t1 || ..() || active1 != a1) return 1 active1.fields["species"] = t1 return 1 /obj/machinery/computer/secure_data/proc/setTemp(text, list/buttons = list()) temp = list("text" = text, "buttons" = buttons, "has_buttons" = buttons.len > 0) + +/obj/machinery/computer/secure_data/proc/update_all_mob_security_hud() + for(var/mob/living/carbon/human/H in mob_list) + H.sec_hud_set_security_status() /obj/machinery/computer/secure_data/proc/create_record_photo(datum/data/record/R) // basically copy-pasted from the camera code but different enough that it has to be redone diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index a849b2576f4..8abda089a34 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -268,9 +268,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "" dat += "
" dat += "Slot [slot_name] - " - dat += "Load slot - " - dat += "Save slot - " - dat += "Reload slot" + dat += "Load slot - " + dat += "Save slot - " + dat += "Reload slot" dat += "
" dat += "" dat += "" + HTML += "
\[[GetPlayerAltTitle(job)]\]" HTML += "" continue /* @@ -674,7 +674,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts HTML += "[prefLevelLabel]" if(job.alt_titles) - HTML += "
\[[GetPlayerAltTitle(job)]\]" + HTML += "
\[[GetPlayerAltTitle(job)]\]" HTML += "" @@ -841,36 +841,34 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts /datum/preferences/proc/SetRecords(mob/user) var/HTML = "" HTML += "
" - HTML += "Set Character Records
" - HTML += "Medical Records
" + HTML += "Medical Records
" if(lentext(med_record) <= 40) HTML += "[med_record]" else HTML += "[copytext(med_record, 1, 37)]..." - HTML += "

Employment Records
" + HTML += "
Employment Records
" if(lentext(gen_record) <= 40) HTML += "[gen_record]" else HTML += "[copytext(gen_record, 1, 37)]..." - HTML += "

Security Records
" + HTML += "
Security Records
" if(lentext(sec_record) <= 40) HTML += "[sec_record]
" else HTML += "[copytext(sec_record, 1, 37)]...
" - HTML += "
" - HTML += "\[Done\]" + HTML += "\[Done\]" HTML += "
" - user << browse(null, "window=preferences") - user << browse(HTML, "window=records;size=350x300") - return + var/datum/browser/popup = new(user, "records", "
Character Records
", 300, 390) + popup.set_content(HTML) + popup.open(0) /datum/preferences/proc/GetPlayerAltTitle(datum/job/job) return player_alt_titles.Find(job.title) > 0 \ @@ -2236,7 +2234,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "[name]
" dat += "
" - dat += "Close
" + dat += "Close
" dat += "" // user << browse(dat, "window=saves;size=300x390") var/datum/browser/popup = new(user, "saves", "
Character Saves
", 300, 390) From 31e10b1b07ea12a2ad3606061546bac514519073 Mon Sep 17 00:00:00 2001 From: Markolie Date: Thu, 16 Mar 2017 23:51:46 +0100 Subject: [PATCH 6/6] Flavor text fix, disabilities window popup --- code/modules/client/preference/preferences.dm | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 8abda089a34..7956b9f5a1c 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -294,7 +294,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Skin Tone: [species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"]
" dat += "Disabilities: \[Set\]
" dat += "Nanotrasen Relation: [nanotrasen_relation]
" - dat += "Set Flavor Text
" + dat += "Set Flavor Text
" if(lentext(flavor_text) <= 40) if(!lentext(flavor_text)) dat += "\[...\]
" else dat += "[flavor_text]
" @@ -812,12 +812,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts /datum/preferences/proc/SetDisabilities(mob/user) var/HTML = "" + HTML += "
" - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\modules\client\preferences.dm:474: HTML += "
" - HTML += {"
- Choose disabilities
    "} - // END AUTOFIX HTML += ShowDisabilityState(user,DISABILITY_FLAG_NEARSIGHTED,"Needs Glasses") HTML += ShowDisabilityState(user,DISABILITY_FLAG_FAT,"Obese") HTML += ShowDisabilityState(user,DISABILITY_FLAG_EPILEPTIC,"Seizures") @@ -827,16 +823,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts HTML += ShowDisabilityState(user,DISABILITY_FLAG_MUTE,"Mute") - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\modules\client\preferences.dm:481: HTML += "
" HTML += {" \[Done\] \[Reset\]
"} - // END AUTOFIX - user << browse(null, "window=preferences") - user << browse(HTML, "window=disabil;size=350x300") - return + + var/datum/browser/popup = new(user, "disabil", "
Choose Disabilities
", 350, 300) + popup.set_content(HTML) + popup.open(0) /datum/preferences/proc/SetRecords(mob/user) var/HTML = "" @@ -866,7 +860,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts HTML += "\[Done\]" HTML += "
" - var/datum/browser/popup = new(user, "records", "
Character Records
", 300, 390) + var/datum/browser/popup = new(user, "records", "
Character Records
", 350, 300) popup.set_content(HTML) popup.open(0)
" @@ -294,7 +294,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Skin Tone: [species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"]
" dat += "Disabilities: \[Set\]
" dat += "Nanotrasen Relation: [nanotrasen_relation]
" - dat += "Set Flavor Text
" + dat += "Set Flavor Text
" if(lentext(flavor_text) <= 40) if(!lentext(flavor_text)) dat += "\[...\]
" else dat += "[flavor_text]
" @@ -358,7 +358,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(jobban_isbanned(user, "Records")) dat += "You are banned from using character records.
" else - dat += "Character Records
" + dat += "Character Records
" dat += "

Limbs

" if(species in list("Unathi")) //Species with alt heads. @@ -658,7 +658,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else HTML += " \[No]" if(job.alt_titles) - HTML += "
\[[GetPlayerAltTitle(job)]\]