mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
refactors most spans
This commit is contained in:
+30
-30
@@ -236,10 +236,10 @@
|
||||
if (user.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
to_chat(user, "<span class='notice'>You try to move your [temp.name], but cannot!</span>")
|
||||
to_chat(user, span_notice("You try to move your [temp.name], but cannot!"))
|
||||
return
|
||||
if(!temp)
|
||||
to_chat(user, "<span class='notice'>You try to use your hand, but realize it is no longer attached!</span>")
|
||||
to_chat(user, span_notice("You try to use your hand, but realize it is no longer attached!"))
|
||||
return
|
||||
if(istype(src, /obj/item/holder))
|
||||
var/obj/item/holder/D = src
|
||||
@@ -436,12 +436,12 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(slot_wear_id)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
|
||||
to_chat(H, span_warning("You need a jumpsuit before you can attach this [name]."))
|
||||
return 0
|
||||
if(slot_l_store, slot_r_store)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
|
||||
to_chat(H, span_warning("You need a jumpsuit before you can attach this [name]."))
|
||||
return 0
|
||||
if(slot_flags & SLOT_DENYPOCKET)
|
||||
return 0
|
||||
@@ -450,11 +450,11 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(slot_s_store)
|
||||
if(!H.wear_suit && (slot_wear_suit in mob_equip))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a suit before you can attach this [name].</span>")
|
||||
to_chat(H, span_warning("You need a suit before you can attach this [name]."))
|
||||
return 0
|
||||
if(!H.wear_suit.allowed)
|
||||
if(!disable_warning)
|
||||
to_chat(usr, "<span class='warning'>You somehow have a suit with no defined allowed items for suit storage, stop that.</span>")
|
||||
to_chat(usr, span_warning("You somehow have a suit with no defined allowed items for suit storage, stop that."))
|
||||
return 0
|
||||
if( !(istype(src, /obj/item/pda) || istype(src, /obj/item/pen) || is_type_in_list(src, H.wear_suit.allowed)) )
|
||||
return 0
|
||||
@@ -480,7 +480,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
break
|
||||
if(!allow)
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You're not wearing anything you can attach this [name] to.</span>")
|
||||
to_chat(H, span_warning("You're not wearing anything you can attach this [name] to."))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -511,23 +511,23 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(isanimal(usr)) //VOREStation Edit Start - Allows simple mobs with hands to use the pickup verb
|
||||
var/mob/living/simple_mob/s = usr
|
||||
if(!s.has_hands)
|
||||
to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
|
||||
to_chat(usr, span_warning("You can't pick things up!"))
|
||||
return
|
||||
else if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
|
||||
to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
|
||||
to_chat(usr, span_warning("You can't pick things up!"))
|
||||
return
|
||||
var/mob/living/L = usr
|
||||
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
||||
to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
|
||||
to_chat(usr, span_warning("You can't pick things up!"))
|
||||
return
|
||||
if(src.anchored) //Object isn't anchored
|
||||
to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
|
||||
to_chat(usr, span_warning("You can't pick that up!"))
|
||||
return
|
||||
if(L.get_active_hand()) //Hand is not full //VOREStation Edit End
|
||||
to_chat(usr, "<span class='warning'>Your hand is full.</span>")
|
||||
to_chat(usr, span_warning("Your hand is full."))
|
||||
return
|
||||
if(!istype(src.loc, /turf)) //Object is on a turf
|
||||
to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
|
||||
to_chat(usr, span_warning("You can't pick that up!"))
|
||||
return
|
||||
//All checks are done, time to pick it up!
|
||||
usr.UnarmedAttack(src)
|
||||
@@ -562,11 +562,11 @@ var/list/global/slot_flags_enumeration = list(
|
||||
for(var/obj/item/protection in list(H.head, H.wear_mask, H.glasses))
|
||||
if(protection && (protection.body_parts_covered & EYES))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
to_chat(user, "<span class='warning'>You're going to need to remove the eye covering first.</span>")
|
||||
to_chat(user, span_warning("You're going to need to remove the eye covering first."))
|
||||
return
|
||||
|
||||
if(!M.has_eyes())
|
||||
to_chat(user, "<span class='warning'>You cannot locate any eyes on [M]!</span>")
|
||||
to_chat(user, span_warning("You cannot locate any eyes on [M]!"))
|
||||
return
|
||||
|
||||
//this should absolutely trigger even if not aim-impaired in some way
|
||||
@@ -586,7 +586,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
//if((CLUMSY in user.mutations) && prob(50))
|
||||
// M = user
|
||||
/*
|
||||
to_chat(M, "<span class='warning'>You stab yourself in the eye.</span>")
|
||||
to_chat(M, span_warning("You stab yourself in the eye."))
|
||||
M.sdisabilities |= BLIND
|
||||
M.weakened += 4
|
||||
M.adjustBruteLoss(10)
|
||||
@@ -598,30 +598,30 @@ var/list/global/slot_flags_enumeration = list(
|
||||
|
||||
if(H != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("<span class='danger'>[M] has been stabbed in the eye with [src] by [user].</span>", 1)
|
||||
to_chat(M, "<span class='danger'>[user] stabs you in the eye with [src]!</span>")
|
||||
to_chat(user, "<span class='danger'>You stab [M] in the eye with [src]!</span>")
|
||||
O.show_message(span_danger("[M] has been stabbed in the eye with [src] by [user]."), 1)
|
||||
to_chat(M, span_danger("[user] stabs you in the eye with [src]!"))
|
||||
to_chat(user, span_danger("You stab [M] in the eye with [src]!"))
|
||||
else
|
||||
user.visible_message( \
|
||||
"<span class='danger'>[user] has stabbed themself with [src]!</span>", \
|
||||
"<span class='danger'>You stab yourself in the eyes with [src]!</span>" \
|
||||
span_danger("[user] has stabbed themself with [src]!"), \
|
||||
span_danger("You stab yourself in the eyes with [src]!") \
|
||||
)
|
||||
|
||||
eyes.damage += rand(3,4)
|
||||
if(eyes.damage >= eyes.min_bruised_damage)
|
||||
if(M.stat != 2)
|
||||
if(!(eyes.robotic >= ORGAN_ROBOT)) //robot eyes bleeding might be a bit silly
|
||||
to_chat(M, "<span class='danger'>Your eyes start to bleed profusely!</span>")
|
||||
to_chat(M, span_danger("Your eyes start to bleed profusely!"))
|
||||
if(prob(50))
|
||||
if(M.stat != 2)
|
||||
to_chat(M, "<span class='warning'>You drop what you're holding and clutch at your eyes!</span>")
|
||||
to_chat(M, span_warning("You drop what you're holding and clutch at your eyes!"))
|
||||
M.drop_item()
|
||||
M.eye_blurry += 10
|
||||
M.Paralyse(1)
|
||||
M.Weaken(4)
|
||||
if (eyes.damage >= eyes.min_broken_damage)
|
||||
if(M.stat != 2)
|
||||
to_chat(M, "<span class='warning'>You go blind!</span>")
|
||||
to_chat(M, span_warning("You go blind!"))
|
||||
var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD)
|
||||
if(affecting.take_damage(7))
|
||||
M:UpdateDamageIcon()
|
||||
@@ -685,7 +685,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
|
||||
|
||||
/obj/item/proc/showoff(mob/user)
|
||||
for (var/mob/M in view(user))
|
||||
M.show_message("<span class='filter_notice'>[user] holds up [src]. <a HREF=?src=\ref[M];lookitem=\ref[src]>Take a closer look.</a></span>",1)
|
||||
M.show_message(span_filter_notice("[user] holds up [src]. <a HREF=?src=\ref[M];lookitem=\ref[src]>Take a closer look.</a>"),1)
|
||||
|
||||
/mob/living/carbon/verb/showoff()
|
||||
set name = "Show Held Item"
|
||||
@@ -722,13 +722,13 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
var/cannotzoom
|
||||
|
||||
if((M.stat && !zoom) || !(istype(M,/mob/living/carbon/human)))
|
||||
to_chat(M, "<span class='filter_notice'>You are unable to focus through the [devicename].</span>")
|
||||
to_chat(M, span_filter_notice("You are unable to focus through the [devicename]."))
|
||||
cannotzoom = 1
|
||||
else if(!zoom && (global_hud.darkMask[1] in M.client.screen))
|
||||
to_chat(M, "<span class='filter_notice'>Your visor gets in the way of looking through the [devicename].</span>")
|
||||
to_chat(M, span_filter_notice("Your visor gets in the way of looking through the [devicename]."))
|
||||
cannotzoom = 1
|
||||
else if(!zoom && M.get_active_hand() != src)
|
||||
to_chat(M, "<span class='filter_notice'>You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better.</span>")
|
||||
to_chat(M, span_filter_notice("You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better."))
|
||||
cannotzoom = 1
|
||||
|
||||
//We checked above if they are a human and returned already if they weren't.
|
||||
@@ -759,7 +759,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
H.client.pixel_x = -viewoffset
|
||||
H.client.pixel_y = 0
|
||||
|
||||
H.visible_message("<span class='filter_notice'>[M] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].</span>")
|
||||
H.visible_message(span_filter_notice("[M] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"]."))
|
||||
if(!ignore_visor_zoom_restriction)
|
||||
H.looking_elsewhere = TRUE
|
||||
H.handle_vision()
|
||||
@@ -777,7 +777,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
H.handle_vision()
|
||||
|
||||
if(!cannotzoom)
|
||||
M.visible_message("<span class='filter_notice'>[zoomdevicename ? "[M] looks up from the [src.name]" : "[M] lowers the [src.name]"].</span>")
|
||||
M.visible_message(span_filter_notice("[zoomdevicename ? "[M] looks up from the [src.name]" : "[M] lowers the [src.name]"]."))
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user