mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -50,7 +50,7 @@ var/list/exploration_cartridges = list(
|
||||
..(over_object)
|
||||
|
||||
/obj/item/cartridge/storage/attack_self(mob/user as mob)
|
||||
to_chat(user, "<span class='notice'>You empty [src].</span>")
|
||||
to_chat(user, span_notice("You empty [src]."))
|
||||
var/turf/T = get_turf(src)
|
||||
hold.hide_from(usr)
|
||||
for(var/obj/item/I in hold.contents)
|
||||
|
||||
@@ -178,12 +178,12 @@
|
||||
var/titlenote = "Note [alphabet_uppercase[currentnote]]"
|
||||
if(!isnull(notetitle) && notetitle != "")
|
||||
titlenote = notetitle
|
||||
to_chat(usr, "<span class='notice'>Successfully printed [titlenote]!</span>")
|
||||
to_chat(usr, span_notice("Successfully printed [titlenote]!"))
|
||||
P.set_content( pencode2html(note), titlenote)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You can only print to empty paper!</span>")
|
||||
to_chat(usr, span_notice("You can only print to empty paper!"))
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You must be holding paper for the pda to print to!</span>")
|
||||
to_chat(usr, span_notice("You must be holding paper for the pda to print to!"))
|
||||
|
||||
|
||||
/datum/data/pda/app/notekeeper/proc/changetonote(var/noteindex)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
to_chat(U, "ERROR: Cannot reach recipient.")
|
||||
return
|
||||
useMS.send_pda_message("[P.owner]","[pda.owner]","[t]")
|
||||
pda.investigate_log("<span class='game say'>PDA Message - <span class='name'>[U.key] - [pda.owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t]</span></span>", "pda")
|
||||
pda.investigate_log(span_game(span_say("PDA Message - <span class='name'>[U.key] - [pda.owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t]</span>")), "pda")
|
||||
|
||||
receive_message(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]"), "\ref[P]")
|
||||
PM.receive_message(list("sent" = 0, "owner" = "[pda.owner]", "job" = "[pda.ownjob]", "message" = "[t]", "target" = "\ref[pda]"), "\ref[pda]")
|
||||
@@ -184,7 +184,7 @@
|
||||
log_pda("(PDA: [src.name]) sent \"[t]\" to [P.name]", usr)
|
||||
to_chat(U, "[icon2html(pda,U.client)] <b>Sent message to [P.owner] ([P.ownjob]), </b>\"[t]\"")
|
||||
else
|
||||
to_chat(U, "<span class='notice'>ERROR: Messaging server is not responding.</span>")
|
||||
to_chat(U, span_notice("ERROR: Messaging server is not responding."))
|
||||
|
||||
/datum/data/pda/app/messenger/proc/available_pdas()
|
||||
var/list/names = list()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/datum/data/pda/messenger_plugin/virus/clown/user_act(mob/user as mob, obj/item/pda/P)
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
user.show_message("<span class='notice'>Virus sent!</span>", 1)
|
||||
user.show_message(span_notice("Virus sent!"), 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
P.ttone = "honk"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/datum/data/pda/messenger_plugin/virus/mime/user_act(mob/user as mob, obj/item/pda/P)
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
user.show_message("<span class='notice'>Virus sent!</span>", 1)
|
||||
user.show_message(span_notice("Virus sent!"), 1)
|
||||
var/datum/data/pda/app/M = P.find_program(/datum/data/pda/app/messenger)
|
||||
if(M)
|
||||
M.notify_silent = 1
|
||||
@@ -55,18 +55,18 @@
|
||||
difficulty += 2
|
||||
|
||||
if(!P.detonate || P.hidden_uplink)
|
||||
user.show_message("<span class='warning'>The target PDA does not seem to respond to the detonation command.</span>", 1)
|
||||
user.show_message(span_warning("The target PDA does not seem to respond to the detonation command."), 1)
|
||||
pda.cartridge.charges++
|
||||
else if(prob(difficulty * 12))
|
||||
user.show_message("<span class='warning'>An error flashes on your [pda].</span>", 1)
|
||||
user.show_message(span_warning("An error flashes on your [pda]."), 1)
|
||||
else if(prob(difficulty * 3))
|
||||
user.show_message("<span class='danger'>Energy feeds back into your [pda]!</span>", 1)
|
||||
user.show_message(span_danger("Energy feeds back into your [pda]!"), 1)
|
||||
pda.close(user)
|
||||
pda.explode()
|
||||
log_admin("[key_name(user)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
|
||||
message_admins("[key_name_admin(user)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
|
||||
else
|
||||
user.show_message("<span class='notice'>Success!</span>", 1)
|
||||
user.show_message(span_notice("Success!"), 1)
|
||||
log_admin("[key_name(user)] just attempted to blow up [P] with the Detomatix cartridge and succeded")
|
||||
message_admins("[key_name_admin(user)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1)
|
||||
P.explode()
|
||||
@@ -78,7 +78,7 @@
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
var/lock_code = "[rand(100,999)] [pick("Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-ray","Yankee","Zulu")]"
|
||||
user.show_message("<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
user.show_message(span_notice("Virus Sent! The unlock code to the target is: [lock_code]"))
|
||||
if(!P.hidden_uplink)
|
||||
var/obj/item/uplink/hidden/uplink = new(P)
|
||||
P.hidden_uplink = uplink
|
||||
|
||||
@@ -99,7 +99,7 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
if(id)
|
||||
remove_id()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>This PDA does not have an ID in it.</span>")
|
||||
to_chat(usr, span_notice("This PDA does not have an ID in it."))
|
||||
|
||||
/obj/item/pda/proc/play_ringtone()
|
||||
var/S
|
||||
@@ -301,7 +301,7 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
message += "Your [P] shatters in a thousand pieces!"
|
||||
|
||||
if(M && isliving(M))
|
||||
message = "<span class='warning'>[message]</span>"
|
||||
message = span_warning("[message]")
|
||||
M.show_message(message, 1)
|
||||
|
||||
/obj/item/pda/proc/remove_id()
|
||||
@@ -309,7 +309,7 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
if (ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(id)
|
||||
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
|
||||
to_chat(usr, span_notice("You remove the ID from the [name]."))
|
||||
playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
|
||||
else
|
||||
id.loc = get_turf(src)
|
||||
@@ -323,12 +323,12 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
var/mob/M = loc
|
||||
if(M.get_active_hand() == null)
|
||||
M.put_in_hands(O)
|
||||
to_chat(usr, "<span class='notice'>You remove \the [O] from \the [src].</span>")
|
||||
to_chat(usr, span_notice("You remove \the [O] from \the [src]."))
|
||||
cut_overlay("pda-pen")
|
||||
return
|
||||
O.loc = get_turf(src)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>This PDA does not have a pen in it.</span>")
|
||||
to_chat(usr, span_notice("This PDA does not have a pen in it."))
|
||||
|
||||
/obj/item/pda/verb/verb_reset_pda()
|
||||
set category = "Object"
|
||||
@@ -342,9 +342,9 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
start_program(find_program(/datum/data/pda/app/main_menu))
|
||||
notifying_programs.Cut()
|
||||
cut_overlay("pda-r")
|
||||
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
|
||||
to_chat(usr, span_notice("You press the reset button on \the [src]."))
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
to_chat(usr, span_notice("You cannot do this while restrained."))
|
||||
|
||||
/obj/item/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
@@ -358,9 +358,9 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
if(id)
|
||||
remove_id()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>This PDA does not have an ID in it.</span>")
|
||||
to_chat(usr, span_notice("This PDA does not have an ID in it."))
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
to_chat(usr, span_notice("You cannot do this while restrained."))
|
||||
|
||||
|
||||
/obj/item/pda/verb/verb_remove_pen()
|
||||
@@ -374,7 +374,7 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
if ( can_use(usr) )
|
||||
remove_pen()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
to_chat(usr, span_notice("You cannot do this while restrained."))
|
||||
|
||||
/obj/item/pda/verb/verb_remove_cartridge()
|
||||
set category = "Object"
|
||||
@@ -385,11 +385,11 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
return
|
||||
|
||||
if(!can_use(usr))
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
to_chat(usr, span_notice("You cannot do this while restrained."))
|
||||
return
|
||||
|
||||
if(isnull(cartridge))
|
||||
to_chat(usr, "<span class='notice'>There's no cartridge to eject.</span>")
|
||||
to_chat(usr, span_notice("There's no cartridge to eject."))
|
||||
return
|
||||
|
||||
cartridge.forceMove(get_turf(src))
|
||||
@@ -400,7 +400,7 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
// scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
to_chat(usr, "<span class='notice'>You remove \the [cartridge] from the [name].</span>")
|
||||
to_chat(usr, span_notice("You remove \the [cartridge] from the [name]."))
|
||||
playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
|
||||
cartridge = null
|
||||
update_programs()
|
||||
@@ -438,26 +438,26 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
cartridge.loc = src
|
||||
cartridge.update_programs(src)
|
||||
update_shortcuts()
|
||||
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
to_chat(usr, span_notice("You insert [cartridge] into [src]."))
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
else if(istype(C, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = C
|
||||
if(!idcard.registered_name)
|
||||
to_chat(user, "<span class='notice'>\The [src] rejects the ID.</span>")
|
||||
to_chat(user, span_notice("\The [src] rejects the ID."))
|
||||
return
|
||||
if(!owner)
|
||||
owner = idcard.registered_name
|
||||
ownjob = idcard.assignment
|
||||
ownrank = idcard.rank
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
to_chat(user, "<span class='notice'>Card scanned.</span>")
|
||||
to_chat(user, span_notice("Card scanned."))
|
||||
else
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
||||
if(id_check(user, 2))
|
||||
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.</span>")
|
||||
to_chat(user, span_notice("You put the ID into \the [src]'s slot."))
|
||||
add_overlay("pda-id")
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
return //Return in case of failed check or when successful.
|
||||
@@ -466,16 +466,16 @@ var/global/list/obj/item/pda/PDAs = list()
|
||||
user.drop_item()
|
||||
C.loc = src
|
||||
pai = C
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You slot \the [C] into \the [src]."))
|
||||
SStgui.update_uis(src) // update all UIs attached to src
|
||||
else if(istype(C, /obj/item/pen))
|
||||
var/obj/item/pen/O = locate() in src
|
||||
if(O)
|
||||
to_chat(user, "<span class='notice'>There is already a pen in \the [src].</span>")
|
||||
to_chat(user, span_notice("There is already a pen in \the [src]."))
|
||||
else
|
||||
user.drop_item()
|
||||
C.loc = src
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You slot \the [C] into \the [src]."))
|
||||
add_overlay("pda-pen")
|
||||
return
|
||||
|
||||
|
||||
@@ -47,28 +47,28 @@
|
||||
/datum/data/pda/utility/scanmode/medical/scan_mob(mob/living/C as mob, mob/living/user as mob)
|
||||
C.visible_message("<span class=warning>[user] has analyzed [C]'s vitals!</span>")
|
||||
|
||||
user.show_message("<span class='notice'>Analyzing Results for [C]:</span>")
|
||||
user.show_message("<span class='notice'> Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]</span>", 1)
|
||||
user.show_message(span_notice("Analyzing Results for [C]:"))
|
||||
user.show_message(span_notice(" Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]"), 1)
|
||||
user.show_message(text("<span class='notice'> Damage Specifics:</span> <span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>",
|
||||
(C.getOxyLoss() > 50) ? "warning" : "", C.getOxyLoss(),
|
||||
(C.getToxLoss() > 50) ? "warning" : "", C.getToxLoss(),
|
||||
(C.getFireLoss() > 50) ? "warning" : "", C.getFireLoss(),
|
||||
(C.getBruteLoss() > 50) ? "warning" : "", C.getBruteLoss()
|
||||
), 1)
|
||||
user.show_message("<span class='notice'> Key: Suffocation/Toxin/Burns/Brute</span>", 1)
|
||||
user.show_message("<span class='notice'> Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
user.show_message(span_notice(" Key: Suffocation/Toxin/Burns/Brute"), 1)
|
||||
user.show_message(span_notice(" Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)"), 1)
|
||||
if(C.tod && (C.stat == DEAD || (C.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'> Time of Death: [C.tod]</span>")
|
||||
user.show_message(span_notice(" Time of Death: [C.tod]"))
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
|
||||
user.show_message(span_notice("Localized Damage, Brute/Burn:"),1)
|
||||
if(length(damaged)>0)
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message(text("<span class='notice'> []: <span class='[]'>[]</span>-<span class='[]'>[]</span></span>",
|
||||
capitalize(org.name), (org.brute_dam > 0) ? "warning" : "notice", org.brute_dam, (org.burn_dam > 0) ? "warning" : "notice", org.burn_dam),1)
|
||||
else
|
||||
user.show_message("<span class='notice'> Limbs are OK.</span>",1)
|
||||
user.show_message(span_notice(" Limbs are OK."),1)
|
||||
|
||||
/datum/data/pda/utility/scanmode/dna
|
||||
base_name = "DNA Scanner"
|
||||
@@ -118,13 +118,13 @@
|
||||
if(!isnull(A.reagents))
|
||||
if(A.reagents.reagent_list.len > 0)
|
||||
var/reagents_length = A.reagents.reagent_list.len
|
||||
to_chat(user, "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>")
|
||||
to_chat(user, span_notice("[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found."))
|
||||
for(var/re in A.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice'>\t [re]</span>")
|
||||
to_chat(user, span_notice("\t [re]"))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>No active chemical agents found in [A].</span>")
|
||||
to_chat(user, span_notice("No active chemical agents found in [A]."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>No significant chemical agents found in [A].</span>")
|
||||
to_chat(user, span_notice("No significant chemical agents found in [A]."))
|
||||
|
||||
/datum/data/pda/utility/scanmode/gas
|
||||
base_name = "Gas Scanner"
|
||||
|
||||
Reference in New Issue
Block a user