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
+5 -5
View File
@@ -27,9 +27,9 @@
for(var/spell/S in M.spell_list)
if(!istype(S, /spell/aoe_turf/charge))
S.charge_counter = S.charge_max
to_chat(M, "<span class='notice'>You feel raw magic flowing through you, it feels good!</span>")
to_chat(M, span_notice("You feel raw magic flowing through you, it feels good!"))
else
to_chat(M, "<span class='notice'>You feel very strange for a moment, but then it passes.</span>")
to_chat(M, span_notice("You feel very strange for a moment, but then it passes."))
return M
/spell/aoe_turf/charge/proc/cast_charge(var/atom/target)
@@ -47,7 +47,7 @@
if(istype(target, /obj/item/spellbook/oneuse))
var/obj/item/spellbook/oneuse/I = target
if(prob(50))
I.visible_message("<span class='warning'>[I] catches fire!</span>")
I.visible_message(span_warning("[I] catches fire!"))
qdel(I)
else
I.used = 0
@@ -65,5 +65,5 @@
if(!charged_item)
return 0
else
charged_item.visible_message("<span class='notice'>[charged_item] suddenly sparks with energy!</span>")
return 1
charged_item.visible_message(span_notice("[charged_item] suddenly sparks with energy!"))
return 1
@@ -45,7 +45,7 @@ How they spawn stuff is decided by behaviour vars, which are explained below
var/atom/summoned_object
if(ispath(summoned_object_type,/turf))
if(istype(get_turf(user),/turf/simulated/shuttle) || istype(spawn_place, /turf/simulated/shuttle))
to_chat(user, "<span class='warning'>You can't build things on shuttles!</span>")
to_chat(user, span_warning("You can't build things on shuttles!"))
continue
spawn_place.ChangeTurf(summoned_object_type)
summoned_object = spawn_place
@@ -72,4 +72,4 @@ How they spawn stuff is decided by behaviour vars, which are explained below
return
/spell/aoe_turf/conjure/proc/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
qdel(animation)
qdel(animation)
+4 -4
View File
@@ -14,12 +14,12 @@
/obj/item/scrying/attack_self(mob/user as mob)
if((user.mind && !wizards.is_antagonist(user.mind)))
to_chat(user, "<span class='warning'>You stare into the orb and see nothing but your own reflection.</span>")
to_chat(user, span_warning("You stare into the orb and see nothing but your own reflection."))
return
to_chat(user, "<span class='info'>You can see... everything!</span>")
visible_message("<span class='danger'>[user] stares into [src], their eyes glazing over.</span>")
to_chat(user, span_info("You can see... everything!"))
visible_message(span_danger("[user] stares into [src], their eyes glazing over."))
user.teleop = user.ghostize(1)
announce_ghost_joinleave(user.teleop, 1, "You feel that they used a powerful artifact to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place with their presence.")
return
+1 -1
View File
@@ -171,5 +171,5 @@
R.word3=cultwords["technology"]
R.check_icon()
else
to_chat(user, "<span class='warning'> You do not have enough space to write a proper rune.</span>")
to_chat(user, span_warning(" You do not have enough space to write a proper rune."))
return
+6 -6
View File
@@ -12,7 +12,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
var/charge_max = 100 //recharge time in deciseconds if charge_type = Sp_RECHARGE or starting charges if charge_type = Sp_CHARGES
var/charge_counter = 0 //can only cast spells if it equals recharge, ++ each decisecond if charge_type = Sp_RECHARGE or -- each cast if charge_type = Sp_CHARGES
var/still_recharging_msg = "<span class='notice'>The spell is still recharging.</span>"
var/still_recharging_msg = span_notice("The spell is still recharging.")
var/silenced = 0 //not a binary - the length of time we can't cast this for
@@ -61,7 +61,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
/spell/New()
..()
//still_recharging_msg = "<span class='notice'>[name] is still recharging.</span>"
//still_recharging_msg = span_notice("[name] is still recharging.")
charge_counter = charge_max
/spell/process()
@@ -180,7 +180,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
if(!(src in user.spell_list) && holder == user)
error("[user] utilized the spell '[src]' without having it.")
to_chat(user, "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>")
to_chat(user, span_warning("You shouldn't have this spell! Something's wrong."))
return 0
if(silenced > 0)
@@ -188,7 +188,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
var/turf/user_turf = get_turf(user)
if(!user_turf)
to_chat(user, "<span class='warning'>You cannot cast spells in null space!</span>")
to_chat(user, span_warning("You cannot cast spells in null space!"))
if(spell_flags & Z2NOCAST && (user_turf.z in using_map.admin_levels)) //Certain spells are not allowed on the CentCom zlevel
return 0
@@ -201,7 +201,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
if(istype(user, /mob/living/simple_mob) && holder == user)
var/mob/living/simple_mob/SM = user
if(SM.purge)
to_chat(SM, "<span class='warning'>The nullrod's power interferes with your own!</span>")
to_chat(SM, span_warning("The nullrod's power interferes with your own!"))
return 0
if(!src.check_charge(skipcharge, user)) //sees if we can cast based on charges alone
@@ -233,7 +233,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
return 0
if(Sp_CHARGES)
if(!charge_counter)
to_chat(user, "<span class='notice'>[name] has no charges left.</span>")
to_chat(user, span_notice("[name] has no charges left."))
return 0
return 1
+17 -17
View File
@@ -15,7 +15,7 @@
if(!user)
return
if((user.mind && !wizards.is_antagonist(user.mind)))
to_chat(usr, "<span class='warning'>You stare at the book but cannot make sense of the markings!</span>")
to_chat(usr, span_warning("You stare at the book but cannot make sense of the markings!"))
return
user.set_machine(src)
@@ -229,7 +229,7 @@
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
to_chat(H, span_notice("The walls suddenly disappear."))
temp = "You have purchased a scrying orb, and gained x-ray vision."
max_uses--
else
@@ -261,24 +261,24 @@
if(user.mind)
// TODO: Update to new antagonist system.
if(user.mind.special_role == JOB_APPRENTICE || user.mind.special_role == JOB_WIZARD)
to_chat(user, "<span class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>")
to_chat(user, span_notice("You're already far more versed in this spell than this flimsy how-to book can provide."))
else
to_chat(user, "<span class='notice'>You've already read this one.</span>")
to_chat(user, span_notice("You've already read this one."))
return
if(used)
recoil(user)
else
user.add_spell(S)
to_chat(user, "<span class='notice'>you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>")
to_chat(user, span_notice("you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!"))
user.attack_log += text("\[[time_stamp()]\] [span_orange("[user.real_name] ([user.ckey]) learned the spell [spellname] ([S]).")]")
onlearned(user)
/obj/item/spellbook/oneuse/proc/recoil(mob/user as mob)
user.visible_message("<span class='warning'>[src] glows in a black light!</span>")
user.visible_message(span_warning("[src] glows in a black light!"))
/obj/item/spellbook/oneuse/proc/onlearned(mob/user as mob)
used = 1
user.visible_message("<span class='caution'>[src] glows dark for a second!</span>")
user.visible_message(span_warning("[src] glows dark for a second!"))
/obj/item/spellbook/oneuse/attackby()
return
@@ -302,7 +302,7 @@
/obj/item/spellbook/oneuse/smoke/recoil(mob/living/user as mob)
..()
to_chat(user, "<span class='caution'>Your stomach rumbles...</span>")
to_chat(user, span_warning("Your stomach rumbles..."))
if(user.nutrition)
user.adjust_nutrition(-200)
@@ -314,7 +314,7 @@
/obj/item/spellbook/oneuse/blind/recoil(mob/user as mob)
..()
to_chat(user, "<span class='warning'>You go blind!</span>")
to_chat(user, span_warning("You go blind!"))
user.Blind(10)
/obj/item/spellbook/oneuse/mindswap
@@ -336,10 +336,10 @@
stored_swap = null
if(!stored_swap)
stored_swap = user
to_chat(user, "<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>")
to_chat(user, span_warning("For a moment you feel like you don't even know who you are anymore."))
return
if(stored_swap == user)
to_chat(user, "<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>")
to_chat(user, span_notice("You stare at the book some more, but there doesn't seem to be anything else to learn..."))
return
if(user.mind.special_verbs.len)
@@ -368,8 +368,8 @@
for(var/V in user.mind.special_verbs)
user.verbs += V
to_chat(stored_swap, "<span class='warning'>You're suddenly somewhere else... and someone else?!</span>")
to_chat(user, "<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
to_chat(stored_swap, span_warning("You're suddenly somewhere else... and someone else?!"))
to_chat(user, span_warning("Suddenly you're staring at [src] again... where are you, who are you?!"))
stored_swap = null
/obj/item/spellbook/oneuse/forcewall
@@ -380,7 +380,7 @@
/obj/item/spellbook/oneuse/forcewall/recoil(mob/user as mob)
..()
to_chat(user, "<span class='warning'>You suddenly feel very solid!</span>")
to_chat(user, span_warning("You suddenly feel very solid!"))
var/obj/structure/closet/statue/S = new /obj/structure/closet/statue(user.loc, user)
S.timer = 30
user.drop_item()
@@ -394,7 +394,7 @@
/obj/item/spellbook/oneuse/knock/recoil(mob/user as mob)
..()
to_chat(user, "<span class='warning'>You're knocked down!</span>")
to_chat(user, span_warning("You're knocked down!"))
user.Weaken(20)
/obj/item/spellbook/oneuse/horsemask
@@ -414,7 +414,7 @@
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
qdel(src)
else
to_chat(user, "<span class='notice'>I say thee neigh</span>")
to_chat(user, span_notice("I say thee neigh"))
/obj/item/spellbook/oneuse/charge
spell = /spell/aoe_turf/charge
@@ -424,5 +424,5 @@
/obj/item/spellbook/oneuse/charge/recoil(mob/user as mob)
..()
to_chat(user, "<span class='warning'>[src] suddenly feels very warm!</span>")
to_chat(user, span_warning("[src] suddenly feels very warm!"))
empulse(src, 1, 1, 1, 1)
@@ -24,8 +24,8 @@
/spell/targeted/equip_item/horsemask/cast(list/targets, mob/user = usr)
..()
for(var/mob/living/target in targets)
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
target.visible_message( span_danger("[target]'s face lights up in fire, and after the event a horse's head takes its place!"), \
span_danger("Your face burns up, and shortly after the fire you realise you have the face of a horse!"))
target.flash_eyes()
/spell/targeted/equip_item/horsemask/summon_item(var/new_type)
@@ -97,11 +97,11 @@
if(!T.contains_dense_objects())
last_valid_turf = T
else
to_chat(user, "<span class='warning'>Some strange aura is blocking the way!</span>")
to_chat(user, span_warning("Some strange aura is blocking the way!"))
src.canmove = 0
spawn(2) src.canmove = 1
/obj/effect/dummy/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/spell_jaunt/bullet_act(blah)
return
return
+2 -2
View File
@@ -37,7 +37,7 @@ code\game\dna\genes\goon_powers.dm
spell_flags = 0
invocation = "STI KALY"
invocation_type = SpI_WHISPER
message = "<span class='danger'>Your eyes cry out in pain!</span>"
message = span_danger("Your eyes cry out in pain!")
cooldown_min = 50
range = 7
@@ -57,7 +57,7 @@ code\game\dna\genes\goon_powers.dm
spell_flags = Z2NOCAST | NEEDSCLOTHES | INCLUDEUSER
invocation = "BIRUZ BENNAR"
invocation_type = SpI_SHOUT
message = "<span class='notice'>You feel strong! You feel a pressure building behind your eyes!</span>"
message = span_notice("You feel strong! You feel a pressure building behind your eyes!")
range = 0
max_targets = 1
+3 -3
View File
@@ -38,7 +38,7 @@
M.forceMove(destination)
if(M != user)
prey = 1
to_chat(user, "<span class='sinister'>You warp back to Nar-Sie[prey ? " along with your prey":""].</span>")
to_chat(user, span_sinister("You warp back to Nar-Sie[prey ? " along with your prey":""]."))
else
to_chat(user, "<span class='danger'>...something's wrong!</span>")//There shouldn't be an instance of Harvesters when Nar-Sie isn't in the world.
*/
to_chat(user, span_danger("...something's wrong!"))//There shouldn't be an instance of Harvesters when Nar-Sie isn't in the world.
*/
@@ -78,4 +78,4 @@
//After a certain amount of time the victim gets a message about being in a different body.
spawn(msg_wait)
to_chat(caster, "<span class='danger'>You feel woozy and lightheaded. Your body doesn't seem like your own.</span>")
to_chat(caster, span_danger("You feel woozy and lightheaded. Your body doesn't seem like your own."))
@@ -24,7 +24,7 @@
amt_dam_fire = 10
/spell/targeted/projectile/magic_missile/prox_cast(var/list/targets, atom/spell_holder)
spell_holder.visible_message("<span class='danger'>\The [spell_holder] pops with a flash!</span>")
spell_holder.visible_message(span_danger("\The [spell_holder] pops with a flash!"))
for(var/mob/living/M in targets)
apply_spell_damage(M)
return
+1 -1
View File
@@ -7,7 +7,7 @@
spell_flags = 0
invocation = "DII ODA BAJI"
invocation_type = SpI_WHISPER
message = "<span class='danger'>You suddenly feel completely overwhelmed!</span>"
message = span_danger("You suddenly feel completely overwhelmed!")
max_targets = 1