Misc fixes (#1370)

changes:

bugfix: "Fixed formatting of forms when held up to a security camera."
spellcheck: "Fixed grammar error in IA and CE's headsets."
Fixes #1196.
Fixes #1358.
Fixes #1376.
Fixes #1347.
Replaces some BYOND text macros with spans.

Issues:

M'sai's preview image does not work (missing image).
This commit is contained in:
Lohikar
2017-01-02 17:54:30 -06:00
committed by skull132
parent 33c44ad093
commit cef746cd6d
22 changed files with 73 additions and 63 deletions

View File

@@ -749,7 +749,7 @@ proc/api_update_command_database()
G.has_enabled_antagHUD = 2
G.can_reenter_corpse = 1
G:show_message(text("\blue <B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B>"), 1)
G:show_message(text("<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>"), 1)
log_admin("[senderkey] allowed [key_name(G)] to bypass the 30 minute respawn limit via the API")
message_admins("Admin [senderkey] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit via the API", 1)
@@ -903,7 +903,7 @@ proc/api_update_command_database()
if(reportannounce == 1)
command_announcement.Announce(reportbody, reporttitle, new_sound = 'sound/AI/commandreport.ogg', do_newscast = 1, msg_sanitized = 1);
if(reportannounce == 0)
world << "\red New NanoTrasen Update available at all communication consoles."
world << "<span class='alert'>New NanoTrasen Update available at all communication consoles.</span>"
world << sound('sound/AI/commandreport.ogg')

View File

@@ -393,7 +393,7 @@
else if (href_list["obj_announce"])
var/obj_count = 1
current << "\blue Your current objectives:"
current << "<span class='notice'>Your current objectives:</span>"
for(var/datum/objective/objective in objectives)
current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
@@ -540,7 +540,7 @@
..()
mind.assigned_role = "Armalis"
mind.special_role = "Vox Raider"
/mob/living/silicon/robot/syndicate/mind_initialize()
..()
mind.assigned_role = "Syndicate Robot"

View File

@@ -625,7 +625,7 @@
var/command = input(src, "Command your victim.", "Your command.")
if (!command)
src << "\red Cancelled."
src << "<span class='alert'>Cancelled.</span>"
return
admin_attack_log(src, T, "used dominate on [key_name(T)]", "was dominated by [key_name(src)]", "used dominate and issued the command of '[command]' to")
@@ -860,17 +860,17 @@
vampire.status |= VAMP_DRAINING
visible_message("\red <b>[src.name] bites [T.name]'s neck!</b>", "\red <b>You bite [T.name]'s neck and begin to drain their blood, as the first step of introducing the corruption of the Veil to them.</b>", "\blue You hear a soft puncture and a wet sucking noise")
visible_message("<span class='danger'>[src.name] bites [T.name]'s neck!</span>", "<span class='danger'>You bite [T.name]'s neck and begin to drain their blood, as the first step of introducing the corruption of the Veil to them.</span>", "<span class='notice'>You hear a soft puncture and a wet sucking noise.</span>")
T << "<span class='notice'><br>You are currently being turned into a vampire. You will die in the course of this, but you will be revived by the end. Please do not ghost out of your body until the process is complete.</span>"
while (do_mob(src, T, 50))
if (!mind.vampire)
src << "\red Your fangs have disappeared!"
src << "<span class='alert'>Your fangs have disappeared!</span>"
return
if (!T.vessel.get_reagent_amount("blood"))
src << "\red [T] is now drained of blood. You begin forcing your own blood into their body, spreading the corruption of the Veil to their body."
src << "<span class='alert'>[T] is now drained of blood. You begin forcing your own blood into their body, spreading the corruption of the Veil to their body.</span>"
break
T.vessel.remove_reagent("blood", 50)

View File

@@ -140,7 +140,7 @@
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if (src.victim)
usr << "\blue <B>The table is already occupied!</B>"
usr << "<span class='notice'><B>The table is already occupied!</B></span>"
return 0
var/mob/living/L = G.affecting

View File

@@ -118,10 +118,10 @@
return
var/mob/living/M = O//Theres no reason this shouldn't be /mob/living
if (src.occupant)
user << "\blue <B>The scanner is already occupied!</B>"
user << "<span class='notice'><B>The scanner is already occupied!</B></span>"
return
if (M.abiotic())
user << "\blue <B>Subject cannot have abiotic items on.</B>"
user << "<span class='notice'><B>Subject cannot have abiotic items on.</B></span>"
return
var/mob/living/L = O

View File

@@ -481,15 +481,15 @@
icon_state = occupied_icon_state
L << "\blue You feel cool air surround you. You go numb as your senses turn inward."
L << "\blue <b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b>"
L << "<span class='notice'>You feel cool air surround you. You go numb as your senses turn inward.</span>"
L << "<span class='notice'><b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b></span>"
occupant = L
time_entered = world.time
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(L)] has entered a stasis pod.")
message_admins("\blue [key_name_admin(L)] has entered a stasis pod.(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
message_admins("<span class='notice'>[key_name_admin(L)] has entered a stasis pod.(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)</span>")
//Despawning occurs when process() is called with an occupant without a client.
src.add_fingerprint(L)

View File

@@ -132,6 +132,8 @@
if(stat & (NOPOWER|BROKEN))
return
update_icon()
if(src.timing)
if(src.time > 0)
src.time = src.time - ((world.timeofday - last_process)/10)
@@ -207,8 +209,6 @@
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
return
/obj/machinery/firealarm/New(loc, dir, building)
..()

View File

@@ -108,7 +108,7 @@
if(prob(10))
M.apply_damage(30, BRUTE, "head")
M.apply_damage(45, HALLOSS)
M.visible_message("\red [user]'s hair catches in the [src]!", "\red Your hair gets caught in the [src]!")
M.visible_message("<span class='danger'>[user]'s hair catches in the [src]!</span>", "<span class='danger'>Your hair gets caught in the [src]!</span>")
M.say("*scream")
/obj/machinery/gibber/MouseDrop_T(mob/target, mob/user)

View File

@@ -22,10 +22,10 @@ obj/machinery/recharger
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(portable && istype(G, /obj/item/weapon/wrench))
if(charging)
user << "\red Remove [charging] first!"
user << "<span class='alert'>Remove [charging] first!</span>"
return
anchored = !anchored
user << "You [anchored ? "attached" : "detached"] the recharger."
user << "You have [anchored ? "attached" : "detached"] the recharger."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
return

View File

@@ -521,17 +521,17 @@
if(coin.string_attached)
if(prob(50))
user << "<span class='notice'>You successfully pull the coin out before \the [src] could swallow it.</span>"
src.visible_message("\blue The [src] putters to life, coughing out its 'premium' item after a moment.")
src.visible_message("<span class='notice'>The [src] putters to life, coughing out its 'premium' item after a moment.</span>")
playsound(src.loc, 'sound/items/poster_being_created.ogg', 50, 1)
else
user << "<span class='notice'>You weren't able to pull the coin out fast enough, the machine ate it, string and all.</span>"
src.visible_message("\blue The [src] putters to life, coughing out its 'premium' item after a moment.")
src.visible_message("<span class='notice'>The [src] putters to life, coughing out its 'premium' item after a moment.</span>")
playsound(src.loc, 'sound/items/poster_being_created.ogg', 50, 1)
qdel(coin)
coin = null
categories &= ~CAT_COIN
else
src.visible_message("\blue The [src] putters to life, coughing out its 'premium' item after a moment.")
src.visible_message("<span class='notice'>The [src] putters to life, coughing out its 'premium' item after a moment.</span>")
playsound(src.loc, 'sound/items/poster_being_created.ogg', 50, 1)
qdel(coin)
coin = null

View File

@@ -93,7 +93,7 @@
if(prob(10))
M.apply_damage(30, BRUTE, "head")
M.apply_damage(45, HALLOSS)
M.visible_message("\red [user]'s hair catches in the [src]!", "\red Your hair gets caught in the [src]!")
M.visible_message("<span class='danger'>[user]'s hair catches in the [src]!</span>", "<span class='danger'>Your hair gets caught in the [src]!</span>")
M.say("*scream")
ui_interact(user)
@@ -209,19 +209,19 @@
return
if(target == user)
if(target.h_style == "Floorlength Braid" || target.h_style == "Very Long Hair")
user.visible_message("\blue [user] looks like they're about to feed their own hair into the [src], but think better of it.", "\blue You grasp your hair and are about to feed it into the [src], but stop and come to your sense.")
user.visible_message(span("notice", "[user] looks like they're about to feed their own hair into the [src], but think better of it."), span("notice", "You grasp your hair and are about to feed it into the [src], but stop and come to your senses."))
return
src.add_fingerprint(user)
var/target_loc = target.loc
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
if(target.h_style != "Cut Hair" || target.h_style != "Short Hair" || target.h_style != "Skinhead" || target.h_style != "Buzzcut" || target.h_style != "Crewcut" || target.h_style != "Bald" || target.h_style != "Balding Hair")
user.visible_message("\red [user] starts feeding [target]'s hair into the [src]!", "\red You start feeding [target]'s hair into the [src]!")
user.visible_message("<span class='warning'>[user] starts feeding [target]'s hair into the [src]!</span>", "<span class='warning'>You start feeding [target]'s hair into the [src]!</span>")
if(!do_after(usr, 50))
return
if(target_loc != target.loc)
return
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
user.visible_message("\red [user] feeds the [target]'s hair into the [src] and flicks it on!", "\red You turn the [src] on!")
user.visible_message(span("warning", "[user] feeds the [target]'s hair into the [src] and flicks it on!"), span("alert", "You turn the [src] on!"))
target.apply_damage(30, BRUTE, "head")
target.apply_damage(25, HALLOSS)
target.say("*scream")
@@ -236,12 +236,12 @@
if(target_loc != target.loc)
return
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
user.visible_message("\red [user] starts tugging on [target]'s head as the [src] keeps running!", "\red You start tugging on [target]'s head!")
user.visible_message(span("alert", "[user] starts tugging on [target]'s head as the [src] keeps running!"), span("alert", "You start tugging on [target]'s head!"))
target.apply_damage(25, BRUTE, "head")
target.apply_damage(10, HALLOSS)
target.say("*scream")
spawn(10)
user.visible_message("\red [user] stops the [src] and leaves [target] resting as they are.", "\red You turn the [src] off and let go of [target].")
user.visible_message(span("alert", "[user] stops the [src] and leaves [target] resting as they are."), span("alert", "You turn the [src] off and let go of [target]."))
/obj/machinery/mecha_part_fabricator/emag_act(var/remaining_charges, var/mob/user)
switch(emagged)

View File

@@ -199,7 +199,7 @@
var/target_atom = pick(nearby)
walk_to(src, target_atom, 5)
if(prob(25))
src.visible_message("\blue \the [src] skitters[pick(" away"," around","")].")
src.visible_message(span("notice", "\the [src] skitters[pick(" away"," around","")]."))
else if(prob(5))
//vent crawl!
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
@@ -209,7 +209,7 @@
break
if(prob(1))
src.visible_message("\blue \the [src] chitters.")
src.visible_message(span("notice", "\the [src] chitters."))
if(isturf(loc) && amount_grown > 0)
amount_grown += (rand(0,2)*growth_rate)
if(amount_grown >= 100)

View File

@@ -170,7 +170,7 @@
/obj/item/device/radio/headset/heads/ce
name = "chief engineer's headset"
desc = "The headset of the guy who is in charge of morons"
desc = "The headset of the guy who is in charge of morons."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/ce
@@ -211,7 +211,7 @@
ks2type = /obj/item/device/encryptionkey/ert
/obj/item/device/radio/headset/ia
name = "internal affair's headset"
name = "internal affairs headset"
desc = "The headset of your worst enemy."
icon_state = "com_headset"
item_state = "headset"

View File

@@ -59,7 +59,7 @@
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if(!E)
return
usr << "\red Your eyes burn with the intense light of the flash!."
usr << span("alert", "Your eyes burn with the intense light of the flash!.")
E.damage += rand(10, 11)
if(E.damage > 12)
M.eye_blurry += rand(3,6)

View File

@@ -33,13 +33,13 @@
active= !active
if(active)
playsound(user, 'sound/weapons/chainsawhit.ogg', 50, 1)
user << "\blue \The [src] rumbles to life."
user << span("notice", "\The [src] rumbles to life.")
force = 35
hitsound = 'sound/weapons/chainsawhit.ogg'
icon_state = "chainswordon"
slot_flags = null
else
user << "\blue \The [src] slowly powers down."
user << span("notice", "\The [src] slowly powers down.")
force = initial(force)
hitsound = initial(hitsound)
icon_state = initial(icon_state)

View File

@@ -58,13 +58,13 @@ var/list/tape_roll_applications = list()
/obj/item/taperoll/attack_self(mob/user as mob)
if(icon_state == "[icon_base]_start")
start = get_turf(src)
usr << "\blue You place the first end of the [src]."
usr << span("notice", "You place the first end of the [src].")
icon_state = "[icon_base]_stop"
else
icon_state = "[icon_base]_start"
end = get_turf(src)
if(start.y != end.y && start.x != end.x || start.z != end.z)
usr << "\blue [src] can only be laid horizontally or vertically."
usr << span("notice", "[src] can only be laid horizontally or vertically.")
return
var/turf/cur = start
@@ -93,7 +93,7 @@ var/list/tape_roll_applications = list()
break
cur = get_step_towards(cur,end)
if (!can_place)
usr << "\blue You can't run \the [src] through that!"
usr << span("notice", "You can't run \the [src] through that!")
return
cur = start
@@ -106,7 +106,7 @@ var/list/tape_roll_applications = list()
var/obj/item/tape/P = new tape_type(cur)
P.icon_state = "[P.icon_base]_[dir]"
cur = get_step_towards(cur,end)
usr << "\blue You finish placing the [src]." //Git Test
usr << span("notice", "You finish placing the [src].") //Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if(!proximity)
@@ -118,7 +118,7 @@ var/list/tape_roll_applications = list()
P.loc = locate(T.x,T.y,T.z)
P.icon_state = "[src.icon_base]_door"
P.layer = 3.2
user << "\blue You finish placing the [src]."
user << span("notice", "You finish placing the [src].")
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
var/turf/F = A
@@ -157,7 +157,7 @@ var/list/tape_roll_applications = list()
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == I_HELP && src.allowed(user))
user.show_viewers("\blue [user] lifts [src], allowing passage.")
user.show_viewers(span("notice", "[user] lifts [src], allowing passage."))
crumple()
lifted = 1
spawn(200)
@@ -171,7 +171,7 @@ var/list/tape_roll_applications = list()
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
user << "You can't break the [src] with that!"
return
user.show_viewers("\blue [user] breaks the [src]!")
user.show_viewers(span("notice", "[user] breaks the [src]!"))
var/dir[2]
var/icon_dir = src.icon_state

View File

@@ -16,9 +16,9 @@
var/mob/living/carbon/human/H = user
var/obj/item/organ/O = H.internal_organs_by_name[pick("eyes","appendix","kidneys","liver", "heart", "lungs", "brain")]
if(O == null)
user << "\blue You can't make any sense of the arcane glyphs. . . maybe you should try again."
user << span("notice", "You can't make any sense of the arcane glyphs. . . maybe you should try again.")
else
user << "\red As you stumble over the arcane glyphs, you feel a twisting sensation in [O]!"
user << span("alert", "As you stumble over the arcane glyphs, you feel a twisting sensation in [O]!")
user.visible_message("<span class='danger'>A flash of smoke pours out of [user]'s orifices!</span>")
playsound(user, 'sound/magic/lightningshock.ogg', 40, 1)
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()

View File

@@ -291,6 +291,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
// Actual whitelist checks are handled elsewhere, this is just for accessing the preview window.
var/choice = input("Which species would you like to look at?") as null|anything in playable_species
if(!choice) return
choice = html_decode(choice)
pref.species_preview = choice
SetSpecies(preference_mob())
pref.alternate_languages.Cut() // Reset their alternate languages. Todo: attempt to just fix it instead?
@@ -302,7 +303,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_NOACTION
var/prev_species = pref.species
pref.species = href_list["set_species"]
pref.species = html_decode(href_list["set_species"])
if(prev_species != pref.species)
mob_species = all_species[pref.species]
@@ -649,7 +650,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(restricted == 2)
dat += "<font color='red'><b>You cannot play as this species.</br><small>This species is not available for play as a station race..</small></b></font></br>"
if(!restricted || check_rights(R_ADMIN, 0))
dat += "\[<a href='?src=\ref[src];set_species=[pref.species_preview]'>select</a>\]"
dat += "\[<a href='?src=\ref[src];set_species=[html_encode(pref.species_preview)]'>select</a>\]"
dat += "</center></body>"
user << browse(dat, "window=species;size=700x400")

View File

@@ -467,7 +467,7 @@ var/list/ai_verbs_default = list(
if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name()))
ai_actual_track(target)
else
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
src << "<span class='warning'>System error. Cannot locate [html_decode(href_list["trackname"])].</span>"
return
if (href_list["readcapturedpaper"]) //Yep stolen from admin faxes
var/entry = text2num(href_list["readcapturedpaper"])
@@ -476,7 +476,7 @@ var/list/ai_verbs_default = list(
src << "<span class='notice'>Unable to locate visual entry.</span>"
return
var/info = cameraRecords[entry]
src<< browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", html_encode(info[1]), html_encode(info[2])), text("window=[]", html_encode(info[1])))
src << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", info[1], info[2]), text("window=[]", html_encode(info[1])))
return
return
@@ -556,7 +556,7 @@ var/list/ai_verbs_default = list(
if(network in C.network)
eyeobj.setLoc(get_turf(C))
break
src << "\blue Switched to [network] camera network."
src << "<span class='notice'>Switched to [network] camera network.</span>"
//End of code by Mord_Sith
/mob/living/silicon/ai/proc/ai_statuschange()
@@ -666,19 +666,19 @@ var/list/ai_verbs_default = list(
else if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
if(!do_after(user,40))
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
return
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
anchored = 0
return
else
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating.</span>..")
if(!do_after(user,40))
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>")
return
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>")
anchored = 1
return
else

View File

@@ -74,8 +74,8 @@
src.take_organ_damage(0,10,emp=1)
Stun(rand(1,5))
flick("noise", src:flash)
src << "\red <B>*BZZZT*</B>"
src << "\red Warning: Electromagnetic pulse detected."
src << "<span class='danger'>*BZZZT*</span>"
src << "<span class='warning'>Warning: Electromagnetic pulse detected.</span>"
..()
/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount)
@@ -90,9 +90,9 @@
shock_damage *= 0.75 //take reduced damage
take_overall_damage(0, shock_damage)
visible_message("\red [src] was shocked by \the [source]!", \
"\red <B>Energy pulse detected, system damaged!</B>", \
"\red You hear an electrical crack")
visible_message("<span class='warning'>[src] was shocked by \the [source]!</span>", \
"<span class='danger'>Energy pulse detected, system damaged!</span>", \
"<span class='warning'>You hear an electrical crack.</span>")
if(prob(20))
Stun(2)
return

View File

@@ -42,8 +42,12 @@
/obj/item/weapon/paper/proc/set_content(text,title)
if(title)
name = title
info = html_encode(text)
info = parsepencode(text)
if (text && length(text))
info = html_encode(text)
info = parsepencode(text)
else
info = ""
update_icon()
update_space(info)
updateinfolinks()
@@ -51,7 +55,7 @@
/obj/item/weapon/paper/update_icon()
if(icon_state == "paper_talisman")
return
else if(info)
else if (info && length(trim(info)))
icon_state = "paper_words"
else
icon_state = "paper"

View File

@@ -0,0 +1,5 @@
author: Lohikar
delete-after: True
changes:
- bugfix: "Fixed formatting of forms when held up to a security camera."
- spellcheck: "Fixed grammar error in IA and CE's headsets."