refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+22 -22
View File
@@ -105,13 +105,13 @@
if (M.use(1))
var/obj/item/secbot_assembly/ed209_assembly/B = new /obj/item/secbot_assembly/ed209_assembly
B.loc = get_turf(src)
to_chat(user, "<span class='notice'>You armed the robot frame.</span>")
to_chat(user, span_notice("You armed the robot frame."))
if (user.get_inactive_hand()==src)
user.remove_from_mob(src)
user.put_in_inactive_hand(B)
qdel(src)
else
to_chat(user, "<span class='warning'>You need one sheet of metal to arm the robot frame.</span>")
to_chat(user, span_warning("You need one sheet of metal to arm the robot frame."))
if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg) return
user.drop_item()
@@ -148,9 +148,9 @@
src.chest = W
src.update_icon()
else if(!W:wires)
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
to_chat(user, span_warning("You need to attach wires to it first!"))
else
to_chat(user, "<span class='warning'>You need to attach a cell to it first!</span>")
to_chat(user, span_warning("You need to attach a cell to it first!"))
if(istype(W, /obj/item/robot_parts/head))
if(src.head) return
@@ -160,17 +160,17 @@
src.head = W
src.update_icon()
else
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
to_chat(user, span_warning("You need to attach a flash to it first!"))
if(istype(W, /obj/item/mmi))
var/obj/item/mmi/M = W
if(check_completion())
if(!istype(loc,/turf))
to_chat(user, "<span class='warning'>You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise.</span>")
to_chat(user, span_warning("You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise."))
return
if(!istype(W, /obj/item/mmi/inert))
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [W] into the frame would sort of defeat the purpose.</span>")
to_chat(user, span_warning("Sticking an empty [W] into the frame would sort of defeat the purpose."))
return
if(!M.brainmob.key)
var/ghost_can_reenter = 0
@@ -178,18 +178,18 @@
for(var/mob/observer/dead/G in player_list)
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
ghost_can_reenter = 1 //May come in use again at another point.
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; though it may be able to auto-resuscitate.</span>") //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
to_chat(user, span_notice("\The [W] is completely unresponsive; though it may be able to auto-resuscitate.")) //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
return
if(!ghost_can_reenter)
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; there's no point.</span>")
to_chat(user, span_notice("\The [W] is completely unresponsive; there's no point."))
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [W] into the frame would sort of defeat the purpose.</span>")
to_chat(user, span_warning("Sticking a dead [W] into the frame would sort of defeat the purpose."))
return
if(jobban_isbanned(M.brainmob, JOB_CYBORG))
to_chat(user, "<span class='warning'>This [W] does not seem to fit.</span>")
to_chat(user, span_warning("This [W] does not seem to fit."))
return
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
@@ -226,7 +226,7 @@
qdel(src)
else
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
to_chat(user, span_warning("The MMI must go in after everything else!"))
if (istype(W, /obj/item/pen))
var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
@@ -243,22 +243,22 @@
..()
if(istype(W, /obj/item/cell))
if(src.cell)
to_chat(user, "<span class='warning'>You have already inserted a cell!</span>")
to_chat(user, span_warning("You have already inserted a cell!"))
return
else
user.drop_item()
W.loc = src
src.cell = W
to_chat(user, "<span class='notice'>You insert the cell!</span>")
to_chat(user, span_notice("You insert the cell!"))
if(istype(W, /obj/item/stack/cable_coil))
if(src.wires)
to_chat(user, "<span class='warning'>You have already inserted wire!</span>")
to_chat(user, span_warning("You have already inserted wire!"))
return
else
var/obj/item/stack/cable_coil/coil = W
coil.use(1)
src.wires = 1.0
to_chat(user, "<span class='notice'>You insert the wire!</span>")
to_chat(user, span_notice("You insert the wire!"))
return
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
@@ -267,7 +267,7 @@
if(istype(user,/mob/living/silicon/robot))
var/current_module = user.get_active_hand()
if(current_module == W)
to_chat(user, "<span class='warning'>How do you propose to do that?</span>")
to_chat(user, span_warning("How do you propose to do that?"))
return
else
add_flashes(W,user)
@@ -277,24 +277,24 @@
/obj/item/robot_parts/head/proc/add_flashes(obj/item/W as obj, mob/user as mob) //Made into a seperate proc to avoid copypasta
if(src.flash1 && src.flash2)
to_chat(user, "<span class='notice'>You have already inserted the eyes!</span>")
to_chat(user, span_notice("You have already inserted the eyes!"))
return
else if(src.flash1)
user.drop_item()
W.loc = src
src.flash2 = W
to_chat(user, "<span class='notice'>You insert the flash into the eye socket!</span>")
to_chat(user, span_notice("You insert the flash into the eye socket!"))
else
user.drop_item()
W.loc = src
src.flash1 = W
to_chat(user, "<span class='notice'>You insert the flash into the eye socket!</span>")
to_chat(user, span_notice("You insert the flash into the eye socket!"))
/obj/item/robot_parts/emag_act(var/remaining_charges, var/mob/user)
if(sabotaged)
to_chat(user, "<span class='warning'>[src] is already sabotaged!</span>")
to_chat(user, span_warning("[src] is already sabotaged!"))
else
to_chat(user, "<span class='warning'>You short out the safeties.</span>")
to_chat(user, span_warning("You short out the safeties."))
sabotaged = 1
return 1
@@ -14,7 +14,7 @@
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
if(R.stat == DEAD)
to_chat(usr, "<span class='warning'>The [src] will not function on a deceased robot.</span>")
to_chat(usr, span_warning("The [src] will not function on a deceased robot."))
return 1
return 0
@@ -236,7 +236,7 @@
var/obj/T = R.has_upgrade_module(/obj/item/dogborg/sleeper)
if(!T)
to_chat(usr, "<span class='warning'>This robot has had its processor removed!</span>")
to_chat(usr, span_warning("This robot has had its processor removed!"))
return 0
if(R.has_advanced_upgrade(type))
@@ -328,7 +328,7 @@
var/obj/T = R.has_upgrade_module(/obj/item/dogborg/sleeper)
if(!T)
to_chat(usr, "<span class='warning'>This robot has had its processor removed!</span>")
to_chat(usr, span_warning("This robot has had its processor removed!"))
return 0
if(R.has_restricted_upgrade(type))
@@ -362,7 +362,7 @@
var/obj/T = R.has_upgrade_module(/obj/item/gun/energy/taser/mounted/cyborg)
if(!T)
to_chat(usr, "<span class='warning'>This robot has had its taser removed!</span>")
to_chat(usr, span_warning("This robot has had its taser removed!"))
return 0
if(R.has_restricted_upgrade(type))