mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
@@ -56,7 +56,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
/obj/effect/proc_holder/proc/InterceptClickOn(mob/living/caller, params, atom/A)
|
||||
if(caller.ranged_ability != src || ranged_ability_user != caller) //I'm not actually sure how these would trigger, but, uh, safety, I guess?
|
||||
to_chat(caller, "<span class='warning'><b>[caller.ranged_ability.name]</b> has been disabled.</span>")
|
||||
to_chat(caller, span_warning("<b>[caller.ranged_ability.name]</b> has been disabled."))
|
||||
caller.ranged_ability.remove_ranged_ability()
|
||||
return TRUE //TRUE for failed, FALSE for passed.
|
||||
if(ranged_clickcd_override >= 0)
|
||||
@@ -71,7 +71,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
return
|
||||
if(user.ranged_ability && user.ranged_ability != src)
|
||||
if(forced)
|
||||
to_chat(user, "<span class='warning'><b>[user.ranged_ability.name]</b> has been replaced by <b>[name]</b>.</span>")
|
||||
to_chat(user, span_warning("<b>[user.ranged_ability.name]</b> has been replaced by <b>[name]</b>."))
|
||||
user.ranged_ability.remove_ranged_ability()
|
||||
else
|
||||
return
|
||||
@@ -157,7 +157,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
|
||||
if(player_lock)
|
||||
if(!user.mind || !(src in user.mind.spell_list) && !(src in user.mob_spell_list))
|
||||
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 FALSE
|
||||
else
|
||||
if(!(src in user.mob_spell_list))
|
||||
@@ -165,7 +165,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if(is_centcom_level(T.z) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
to_chat(user, "<span class='warning'>You can't cast this spell here!</span>")
|
||||
to_chat(user, span_warning("You can't cast this spell here!"))
|
||||
return FALSE
|
||||
|
||||
if(!skipcharge)
|
||||
@@ -173,25 +173,25 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
return FALSE
|
||||
|
||||
if(user.stat && !stat_allowed)
|
||||
to_chat(user, "<span class='warning'>Not when you're incapacitated!</span>")
|
||||
to_chat(user, span_warning("Not when you're incapacitated!"))
|
||||
return FALSE
|
||||
|
||||
if(!antimagic_allowed)
|
||||
var/antimagic = user.anti_magic_check(TRUE, FALSE, FALSE, 0, TRUE)
|
||||
if(antimagic)
|
||||
if(isitem(antimagic))
|
||||
to_chat(user, "<span class='notice'>[antimagic] is interfering with your magic.</span>")
|
||||
to_chat(user, span_notice("[antimagic] is interfering with your magic."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Magic seems to flee from you, you can't gather enough power to cast this spell.</span>")
|
||||
to_chat(user, span_warning("Magic seems to flee from you, you can't gather enough power to cast this spell."))
|
||||
return FALSE
|
||||
|
||||
if(!phase_allowed && istype(user.loc, /obj/effect/dummy))
|
||||
to_chat(user, "<span class='warning'>[name] cannot be cast unless you are completely manifested in the material plane!</span>")
|
||||
to_chat(user, span_warning("[name] cannot be cast unless you are completely manifested in the material plane!"))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/L = user
|
||||
if(istype(L) && (invocation_type == INVOCATION_WHISPER || invocation_type == INVOCATION_SHOUT) && !L.can_speak_vocal())
|
||||
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
|
||||
to_chat(user, span_warning("You can't get the words out!"))
|
||||
return FALSE
|
||||
|
||||
if(ishuman(user))
|
||||
@@ -207,24 +207,24 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
if(clothes_req) //clothes check
|
||||
if(!is_type_in_typecache(H.wear_suit, casting_clothes))
|
||||
to_chat(H, "<span class='warning'>You don't feel strong enough without your robe!</span>")
|
||||
to_chat(H, span_warning("You don't feel strong enough without your robe!"))
|
||||
return FALSE
|
||||
if(!is_type_in_typecache(H.head, casting_clothes))
|
||||
to_chat(H, "<span class='warning'>You don't feel strong enough without your hat!</span>")
|
||||
to_chat(H, span_warning("You don't feel strong enough without your hat!"))
|
||||
return FALSE
|
||||
if(cult_req) //CULT_REQ CLOTHES CHECK
|
||||
if(!istype(H.wear_suit, /obj/item/clothing/suit/magusred) && !istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit/cult))
|
||||
to_chat(H, "<span class='warning'>You don't feel strong enough without your armor.</span>")
|
||||
to_chat(H, span_warning("You don't feel strong enough without your armor."))
|
||||
return FALSE
|
||||
if(!istype(H.head, /obj/item/clothing/head/magus) && !istype(H.head, /obj/item/clothing/head/helmet/space/hardsuit/cult))
|
||||
to_chat(H, "<span class='warning'>You don't feel strong enough without your helmet.</span>")
|
||||
to_chat(H, span_warning("You don't feel strong enough without your helmet."))
|
||||
return FALSE
|
||||
else
|
||||
if(clothes_req || human_req)
|
||||
to_chat(user, "<span class='warning'>This spell can only be cast by humans!</span>")
|
||||
to_chat(user, span_warning("This spell can only be cast by humans!"))
|
||||
return FALSE
|
||||
if(nonabstract_req && (isbrain(user) || ispAI(user)))
|
||||
to_chat(user, "<span class='warning'>This spell can only be cast by physical beings!</span>")
|
||||
to_chat(user, span_warning("This spell can only be cast by physical beings!"))
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
if("charges")
|
||||
if(!charge_counter)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[name] has no charges left!</span>")
|
||||
to_chat(user, span_warning("[name] has no charges left!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -276,7 +276,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
. = ..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
still_recharging_msg = "<span class='warning'>[name] is still recharging!</span>"
|
||||
still_recharging_msg = span_warning("[name] is still recharging!")
|
||||
charge_counter = charge_max
|
||||
|
||||
/obj/effect/proc_holder/spell/Destroy()
|
||||
@@ -318,7 +318,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
before_cast(targets)
|
||||
invocation(user)
|
||||
if(user?.ckey)
|
||||
user.log_message("<span class='danger'>cast the spell [name].</span>", LOG_ATTACK)
|
||||
user.log_message(span_danger("cast the spell [name]."), LOG_ATTACK)
|
||||
if(recharge)
|
||||
recharging = TRUE
|
||||
if(sound)
|
||||
@@ -572,7 +572,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
/obj/effect/proc_holder/spell/self/basic_heal/cast(list/targets, mob/living/carbon/human/user) //Note the lack of "list/targets" here. Instead, use a "user" var depending on mob requirements.
|
||||
//Also, notice the lack of a "for()" statement that looks through the targets. This is, again, because the spell can only have a single target.
|
||||
user.visible_message("<span class='warning'>A wreath of gentle light passes over [user]!</span>", "<span class='notice'>You wreath yourself in healing light!</span>")
|
||||
user.visible_message(span_warning("A wreath of gentle light passes over [user]!"), span_notice("You wreath yourself in healing light!"))
|
||||
user.adjustBruteLoss(-10)
|
||||
user.adjustFireLoss(-10)
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
return
|
||||
var/msg
|
||||
if(!can_cast(user))
|
||||
msg = "<span class='warning'>You can no longer cast [name]!</span>"
|
||||
msg = span_warning("You can no longer cast [name]!")
|
||||
remove_ranged_ability(msg)
|
||||
return
|
||||
if(active)
|
||||
msg = "<span class='notice'>[deactive_msg]</span>"
|
||||
msg = span_notice("[deactive_msg]")
|
||||
if(charge_type == "recharge")
|
||||
var/refund_percent = current_amount/projectile_amount
|
||||
charge_counter = charge_max * refund_percent
|
||||
@@ -29,7 +29,7 @@
|
||||
remove_ranged_ability(msg)
|
||||
on_deactivation(user)
|
||||
else
|
||||
msg = "<span class='notice'>[active_msg] <B>Left-click to shoot it at a target!</B></span>"
|
||||
msg = span_notice("[active_msg] <B>Left-click to shoot it at a target!</B>")
|
||||
current_amount = projectile_amount
|
||||
add_ranged_ability(user, msg, TRUE)
|
||||
on_activation(user)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
L+=T
|
||||
|
||||
if(!L.len)
|
||||
to_chat(usr, "<span class='warning'>The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.</span>")
|
||||
to_chat(usr, span_warning("The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."))
|
||||
return
|
||||
|
||||
if(target?.buckled)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
return FALSE
|
||||
var/area/noteleport_check = get_area(user)
|
||||
if(noteleport_check && noteleport_check.area_flags & NOTELEPORT)
|
||||
to_chat(user, "<span class='danger'>Some dull, universal force is between you and your other existence, preventing you from blood crawling.</span>")
|
||||
to_chat(user, span_danger("Some dull, universal force is between you and your other existence, preventing you from blood crawling."))
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/bloodcrawl/choose_targets(mob/user = usr)
|
||||
@@ -29,7 +29,7 @@
|
||||
perform(target)
|
||||
return
|
||||
revert_cast()
|
||||
to_chat(user, "<span class='warning'>There must be a nearby source of blood!</span>")
|
||||
to_chat(user, span_warning("There must be a nearby source of blood!"))
|
||||
|
||||
/obj/effect/proc_holder/spell/bloodcrawl/perform(obj/effect/decal/cleanable/target, recharge = 1, mob/living/user = usr)
|
||||
if(istype(user))
|
||||
@@ -47,4 +47,4 @@
|
||||
start_recharge()
|
||||
return
|
||||
revert_cast()
|
||||
to_chat(user, "<span class='warning'>You are unable to blood crawl!</span>")
|
||||
to_chat(user, span_warning("You are unable to blood crawl!"))
|
||||
|
||||
@@ -26,26 +26,26 @@
|
||||
if(M.mind)
|
||||
for(var/obj/effect/proc_holder/spell/S in M.mind.spell_list)
|
||||
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."))
|
||||
burnt_out = TRUE
|
||||
charged_item = M
|
||||
break
|
||||
for(var/obj/item in hand_items)
|
||||
if(istype(item, /obj/item/spellbook))
|
||||
to_chat(L, "<span class='danger'>Glowing red letters appear on the front cover...</span>")
|
||||
to_chat(L, "<span class='warning'>[pick("NICE TRY BUT NO!","CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE! VERY CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?")]</span>")
|
||||
to_chat(L, span_danger("Glowing red letters appear on the front cover..."))
|
||||
to_chat(L, span_warning("[pick("NICE TRY BUT NO!","CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE! VERY CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?")]"))
|
||||
burnt_out = TRUE
|
||||
else if(istype(item, /obj/item/book/granter/spell))
|
||||
var/obj/item/book/granter/spell/I = item
|
||||
if(!I.oneuse)
|
||||
to_chat(L, "<span class='notice'>This book is infinite use and can't be recharged, yet the magic has improved the book somehow...</span>")
|
||||
to_chat(L, span_notice("This book is infinite use and can't be recharged, yet the magic has improved the book somehow..."))
|
||||
burnt_out = TRUE
|
||||
I.pages_to_mastery--
|
||||
break
|
||||
if(prob(80))
|
||||
L.visible_message("<span class='warning'>[I] catches fire!</span>")
|
||||
L.visible_message(span_warning("[I] catches fire!"))
|
||||
qdel(I)
|
||||
else
|
||||
I.used = FALSE
|
||||
@@ -93,9 +93,9 @@
|
||||
charged_item = item
|
||||
break
|
||||
if(!charged_item)
|
||||
to_chat(L, "<span class='notice'>You feel magical power surging through your hands, but the feeling rapidly fades...</span>")
|
||||
to_chat(L, span_notice("You feel magical power surging through your hands, but the feeling rapidly fades..."))
|
||||
else if(burnt_out)
|
||||
to_chat(L, "<span class='warning'>[charged_item] doesn't seem to be reacting to the spell!</span>")
|
||||
to_chat(L, span_warning("[charged_item] doesn't seem to be reacting to the spell!"))
|
||||
else
|
||||
playsound(get_turf(L), 'sound/magic/charge.ogg', 50, TRUE)
|
||||
to_chat(L, "<span class='notice'>[charged_item] suddenly feels very warm!</span>")
|
||||
to_chat(L, span_notice("[charged_item] suddenly feels very warm!"))
|
||||
|
||||
@@ -201,18 +201,18 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/pointed/abyssal_gaze/cast(list/targets, mob/user)
|
||||
if(!LAZYLEN(targets))
|
||||
to_chat(user, "<span class='warning'>No target found in range!</span>")
|
||||
to_chat(user, span_warning("No target found in range!"))
|
||||
return FALSE
|
||||
if(!can_target(targets[1], user))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/target = targets[1]
|
||||
if(target.anti_magic_check(TRUE, TRUE))
|
||||
to_chat(user, "<span class='warning'>The spell had no effect!</span>")
|
||||
to_chat(target, "<span class='warning'>You feel a freezing darkness closing in on you, but it rapidly dissipates.</span>")
|
||||
to_chat(user, span_warning("The spell had no effect!"))
|
||||
to_chat(target, span_warning("You feel a freezing darkness closing in on you, but it rapidly dissipates."))
|
||||
return FALSE
|
||||
|
||||
to_chat(target, "<span class='userdanger'>A freezing darkness surrounds you...</span>")
|
||||
to_chat(target, span_userdanger("A freezing darkness surrounds you..."))
|
||||
target.playsound_local(get_turf(target), 'sound/hallucinations/i_see_you1.ogg', 50, 1)
|
||||
user.playsound_local(get_turf(user), 'sound/effects/ghost2.ogg', 50, 1)
|
||||
target.become_blind(ABYSSAL_GAZE_BLIND)
|
||||
@@ -239,7 +239,7 @@
|
||||
return FALSE
|
||||
if(!iscarbon(target))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You can only target carbon based lifeforms!</span>")
|
||||
to_chat(user, span_warning("You can only target carbon based lifeforms!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/pointed/dominate/cast(list/targets, mob/user)
|
||||
if(!LAZYLEN(targets))
|
||||
to_chat(user, "<span class='notice'>No target found in range.</span>")
|
||||
to_chat(user, span_notice("No target found in range."))
|
||||
return FALSE
|
||||
if(!can_target(targets[1], user))
|
||||
return FALSE
|
||||
@@ -278,25 +278,25 @@
|
||||
return FALSE
|
||||
if(!isanimal(target))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>Target is not a lesser creature!</span>")
|
||||
to_chat(user, span_warning("Target is not a lesser creature!"))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/simple_animal/S = target
|
||||
if(S.mind)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[S] is too intelligent to dominate!</span>")
|
||||
to_chat(user, span_warning("[S] is too intelligent to dominate!"))
|
||||
return FALSE
|
||||
if(S.stat)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[S] is dead!</span>")
|
||||
to_chat(user, span_warning("[S] is dead!"))
|
||||
return FALSE
|
||||
if(S.sentience_type != SENTIENCE_ORGANIC)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[S] cannot be dominated!</span>")
|
||||
to_chat(user, span_warning("[S] cannot be dominated!"))
|
||||
return FALSE
|
||||
if("cult" in S.faction)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[S] is already serving Nar'Sie!</span>")
|
||||
to_chat(user, span_warning("[S] is already serving Nar'Sie!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ GLOBAL_VAR_INIT(curse_of_madness_triggered, FALSE)
|
||||
|
||||
/proc/curse_of_madness(mob/user, message)
|
||||
if(user) //in this case either someone holding a spellbook or a badmin
|
||||
to_chat(user, "<span class='warning'>You sent a curse of madness with the message \"[message]\"!</span>")
|
||||
to_chat(user, span_warning("You sent a curse of madness with the message \"[message]\"!"))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] sent a curse of madness with the message \"[message]\"!")
|
||||
log_game("[key_name(user)] sent a curse of madness with the message \"[message]\"!")
|
||||
|
||||
GLOB.curse_of_madness_triggered = message // So latejoiners are also afflicted.
|
||||
|
||||
deadchat_broadcast("A <span class='name'>Curse of Madness</span> has stricken the station, shattering their minds with the awful secret: \"<span class='big hypnophrase'>[message]</span>\"", message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
deadchat_broadcast("A [span_name("Curse of Madness")] has stricken the station, shattering their minds with the awful secret: \"<span class='big hypnophrase'>[message]</span>\"", message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == DEAD)
|
||||
@@ -17,14 +17,14 @@ GLOBAL_VAR_INIT(curse_of_madness_triggered, FALSE)
|
||||
if(T && !is_station_level(T.z))
|
||||
continue
|
||||
if(H.anti_magic_check(TRUE, FALSE, TRUE))
|
||||
to_chat(H, "<span class='notice'>You have a strange feeling for a moment, but then it passes.</span>")
|
||||
to_chat(H, span_notice("You have a strange feeling for a moment, but then it passes."))
|
||||
continue
|
||||
give_madness(H, message)
|
||||
|
||||
/proc/give_madness(mob/living/carbon/human/H, message)
|
||||
H.playsound_local(H,'sound/magic/curse.ogg',40,1)
|
||||
to_chat(H, "<span class='reallybig hypnophrase'>[message]</span>")
|
||||
to_chat(H, "<span class='warning'>Your mind shatters!</span>")
|
||||
to_chat(H, span_warning("Your mind shatters!"))
|
||||
switch(rand(1,10))
|
||||
if(1 to 3)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return FALSE
|
||||
var/area/noteleport_check = get_area(user)
|
||||
if(noteleport_check && noteleport_check.area_flags & NOTELEPORT)
|
||||
to_chat(user, "<span class='danger'>Some dull, universal force is stopping you from jaunting here.</span>")
|
||||
to_chat(user, span_danger("Some dull, universal force is stopping you from jaunting here."))
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets,mob/user = usr) //magnets, so mostly hardcoded
|
||||
@@ -98,5 +98,5 @@
|
||||
if(!.)
|
||||
return
|
||||
if (locate(/obj/effect/blessing, .))
|
||||
to_chat(user, "<span class='warning'>Holy energies block your path!</span>")
|
||||
to_chat(user, span_warning("Holy energies block your path!"))
|
||||
return null
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(!iscarbon(user)) //Look ma, no hands
|
||||
return
|
||||
if(!(user.mobility_flags & MOBILITY_USE))
|
||||
to_chat(user, "<span class='warning'>You can't reach out!</span>")
|
||||
to_chat(user, span_warning("You can't reach out!"))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!proximity || target == user || !istype(target) || !iscarbon(user) || !(user.mobility_flags & MOBILITY_USE)) //exploding after touching yourself would be bad
|
||||
return
|
||||
if(!user.can_speak_vocal())
|
||||
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
|
||||
to_chat(user, span_warning("You can't get the words out!"))
|
||||
return
|
||||
do_sparks(4, FALSE, target.loc)
|
||||
for(var/mob/living/L in view(src, 7))
|
||||
@@ -66,8 +66,8 @@
|
||||
var/atom/A = target.anti_magic_check()
|
||||
if(A)
|
||||
if(isitem(A))
|
||||
target.visible_message("<span class='warning'>[target]'s [A] glows brightly as it wards off the spell!</span>")
|
||||
user.visible_message("<span class='warning'>The feedback blows [user]'s arm off!</span>","<span class='userdanger'>The spell bounces from [target]'s skin back into your arm!</span>")
|
||||
target.visible_message(span_warning("[target]'s [A] glows brightly as it wards off the spell!"))
|
||||
user.visible_message(span_warning("The feedback blows [user]'s arm off!"),span_userdanger("The spell bounces from [target]'s skin back into your arm!"))
|
||||
user.flash_act()
|
||||
var/obj/item/bodypart/part = user.get_holding_bodypart_of_item(src)
|
||||
if(part)
|
||||
@@ -75,7 +75,7 @@
|
||||
return ..()
|
||||
var/obj/item/clothing/suit/hooded/bloated_human/suit = target.get_item_by_slot(ITEM_SLOT_OCLOTHING)
|
||||
if(istype(suit))
|
||||
target.visible_message("<span class='danger'>[target]'s [suit] explodes off of them into a puddle of gore!</span>")
|
||||
target.visible_message(span_danger("[target]'s [suit] explodes off of them into a puddle of gore!"))
|
||||
target.dropItemToGround(suit)
|
||||
qdel(suit)
|
||||
new /obj/effect/gibspawner(target.loc)
|
||||
@@ -95,15 +95,15 @@
|
||||
if(!proximity || target == user || !isliving(target) || !iscarbon(user)) //getting hard after touching yourself would also be bad
|
||||
return
|
||||
if(!(user.mobility_flags & MOBILITY_USE))
|
||||
to_chat(user, "<span class='warning'>You can't reach out!</span>")
|
||||
to_chat(user, span_warning("You can't reach out!"))
|
||||
return
|
||||
if(!user.can_speak_vocal())
|
||||
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
|
||||
to_chat(user, span_warning("You can't get the words out!"))
|
||||
return
|
||||
var/mob/living/M = target
|
||||
if(M.anti_magic_check())
|
||||
to_chat(user, "<span class='warning'>The spell can't seem to affect [M]!</span>")
|
||||
to_chat(M, "<span class='warning'>You feel your flesh turn to stone for a moment, then revert back!</span>")
|
||||
to_chat(user, span_warning("The spell can't seem to affect [M]!"))
|
||||
to_chat(M, span_warning("You feel your flesh turn to stone for a moment, then revert back!"))
|
||||
..()
|
||||
return
|
||||
M.Stun(40)
|
||||
@@ -123,16 +123,16 @@
|
||||
if(!proximity || target == user || !isliving(target) || !iscarbon(user)) //Roleplay involving touching is equally as bad
|
||||
return
|
||||
if(!(user.mobility_flags & MOBILITY_USE))
|
||||
to_chat(user, "<span class='warning'>You can't reach out!</span>")
|
||||
to_chat(user, span_warning("You can't reach out!"))
|
||||
return
|
||||
if(!user.can_speak_vocal())
|
||||
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
|
||||
to_chat(user, span_warning("You can't get the words out!"))
|
||||
return
|
||||
var/mob/living/carbon/duffelvictim = target
|
||||
var/elaborate_backstory = pick("spacewar origin story", "military background", "corporate connections", "life in the colonies", "anti-government activities", "upbringing on the space farm", "fond memories with your buddy Keith")
|
||||
if(duffelvictim.anti_magic_check())
|
||||
to_chat(user, "<span class='warning'>The spell can't seem to affect [duffelvictim]!</span>")
|
||||
to_chat(duffelvictim, "<span class='warning'>You really don't feel like talking about your [elaborate_backstory] with complete strangers today.</span>")
|
||||
to_chat(user, span_warning("The spell can't seem to affect [duffelvictim]!"))
|
||||
to_chat(duffelvictim, span_warning("You really don't feel like talking about your [elaborate_backstory] with complete strangers today."))
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -142,14 +142,14 @@
|
||||
duffelvictim.Knockdown(5 SECONDS)
|
||||
|
||||
if(HAS_TRAIT(target, TRAIT_DUFFEL_CURSE_PROOF))
|
||||
to_chat(user, "<span class='warning'>The burden of [duffelvictim]'s duffel bag becomes too much, shoving them to the floor!</span>")
|
||||
to_chat(duffelvictim, "<span class='warning'>The weight of this bag becomes overburdening!</span>")
|
||||
to_chat(user, span_warning("The burden of [duffelvictim]'s duffel bag becomes too much, shoving them to the floor!"))
|
||||
to_chat(duffelvictim, span_warning("The weight of this bag becomes overburdening!"))
|
||||
return ..()
|
||||
|
||||
var/obj/item/storage/backpack/duffelbag/cursed/conjuredduffel = new get_turf(target)
|
||||
|
||||
duffelvictim.visible_message("<span class='danger'>A growling duffel bag appears on [duffelvictim]!</span>", \
|
||||
"<span class='danger'>You feel something attaching itself to you, and a strong desire to discuss your [elaborate_backstory] at length!</span>")
|
||||
duffelvictim.visible_message(span_danger("A growling duffel bag appears on [duffelvictim]!"), \
|
||||
span_danger("You feel something attaching itself to you, and a strong desire to discuss your [elaborate_backstory] at length!"))
|
||||
|
||||
ADD_TRAIT(duffelvictim, TRAIT_DUFFEL_CURSE_PROOF, CURSED_ITEM_TRAIT(conjuredduffel.name))
|
||||
if(duffelvictim.dropItemToGround(duffelvictim.back))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(iscarbon(M))
|
||||
hand_items = list(M.get_active_held_item(),M.get_inactive_held_item())
|
||||
if(!hand_items.len)
|
||||
to_chat(M, "<span class='warning'>You must hold an item you wish to make your phylactery!</span>")
|
||||
to_chat(M, span_warning("You must hold an item you wish to make your phylactery!"))
|
||||
return
|
||||
|
||||
var/obj/item/marked_item
|
||||
@@ -37,17 +37,17 @@
|
||||
if((item.item_flags & ABSTRACT) || HAS_TRAIT(item, TRAIT_NODROP) || SEND_SIGNAL(item, COMSIG_ITEM_IMBUE_SOUL, user))
|
||||
continue
|
||||
marked_item = item
|
||||
to_chat(M, "<span class='warning'>You begin to focus your very being into [item]...</span>")
|
||||
to_chat(M, span_warning("You begin to focus your very being into [item]..."))
|
||||
break
|
||||
|
||||
if(!marked_item)
|
||||
to_chat(M, "<span class='warning'>None of the items you hold are suitable for emplacement of your fragile soul.</span>")
|
||||
to_chat(M, span_warning("None of the items you hold are suitable for emplacement of your fragile soul."))
|
||||
return
|
||||
|
||||
playsound(user, 'sound/effects/pope_entry.ogg', 100)
|
||||
|
||||
if(!do_after(M, 5 SECONDS, target = marked_item, timed_action_flags = IGNORE_HELD_ITEM))
|
||||
to_chat(M, "<span class='warning'>Your soul snaps back to your body as you stop ensouling [marked_item]!</span>")
|
||||
to_chat(M, span_warning("Your soul snaps back to your body as you stop ensouling [marked_item]!"))
|
||||
return
|
||||
|
||||
marked_item.name = "ensouled [marked_item.name]"
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
new /obj/item/phylactery(marked_item, M.mind)
|
||||
|
||||
to_chat(M, "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>")
|
||||
to_chat(M, span_userdanger("With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!"))
|
||||
M.set_species(/datum/species/skeleton)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -129,7 +129,7 @@
|
||||
mind.transfer_to(lich)
|
||||
mind.grab_ghost(force=TRUE)
|
||||
lich.hardset_dna(null,null,null,lich.real_name,null, new /datum/species/skeleton)
|
||||
to_chat(lich, "<span class='warning'>Your bones clatter and shudder as you are pulled back into this world!</span>")
|
||||
to_chat(lich, span_warning("Your bones clatter and shudder as you are pulled back into this world!"))
|
||||
var/turf/body_turf = get_turf(old_body)
|
||||
lich.Paralyze(200 + 200*resurrections)
|
||||
resurrections++
|
||||
@@ -144,7 +144,7 @@
|
||||
I.forceMove(body_turf)
|
||||
var/wheres_wizdo = dir2text(get_dir(body_turf, item_turf))
|
||||
if(wheres_wizdo)
|
||||
old_body.visible_message("<span class='warning'>Suddenly [old_body.name]'s corpse falls to pieces! You see a strange energy rise from the remains, and speed off towards the [wheres_wizdo]!</span>")
|
||||
old_body.visible_message(span_warning("Suddenly [old_body.name]'s corpse falls to pieces! You see a strange energy rise from the remains, and speed off towards the [wheres_wizdo]!"))
|
||||
body_turf.Beam(item_turf,icon_state="lichbeam", time = 10 + 10 * resurrections)
|
||||
old_body.dust()
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/tesla/proc/StartChargeup(mob/user = usr)
|
||||
ready = TRUE
|
||||
to_chat(user, "<span class='notice'>You start gathering the power.</span>")
|
||||
to_chat(user, span_notice("You start gathering the power."))
|
||||
Snd = new/sound('sound/magic/lightning_chargeup.ogg',channel = 7)
|
||||
halo = halo || mutable_appearance('icons/effects/effects.dmi', "electricity", EFFECTS_LAYER)
|
||||
user.add_overlay(halo)
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/tesla/revert_cast(mob/user = usr, message = 1)
|
||||
if(message)
|
||||
to_chat(user, "<span class='notice'>No target found in range.</span>")
|
||||
to_chat(user, span_notice("No target found in range."))
|
||||
Reset(user)
|
||||
..()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
Snd=sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
|
||||
playsound(get_turf(user),Snd,50,FALSE)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
|
||||
if(get_dist(user,target)>range)
|
||||
to_chat(user, "<span class='warning'>[target.p_theyre(TRUE)] too far away!</span>")
|
||||
to_chat(user, span_warning("[target.p_theyre(TRUE)] too far away!"))
|
||||
Reset(user)
|
||||
return
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/mob/living/carbon/current = target
|
||||
if(current.anti_magic_check())
|
||||
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, TRUE, -1)
|
||||
current.visible_message("<span class='warning'>[current] absorbs the spell, remaining unharmed!</span>", "<span class='userdanger'>You absorb the spell, remaining unharmed!</span>")
|
||||
current.visible_message(span_warning("[current] absorbs the spell, remaining unharmed!"), span_userdanger("You absorb the spell, remaining unharmed!"))
|
||||
else if(bounces < 1)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",flags = SHOCK_NOGLOVES)
|
||||
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, TRUE, -1)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall/Click()
|
||||
if(usr?.mind)
|
||||
if(!usr.mind.miming)
|
||||
to_chat(usr, "<span class='warning'>You must dedicate yourself to silence first!</span>")
|
||||
to_chat(usr, span_warning("You must dedicate yourself to silence first!"))
|
||||
return
|
||||
invocation = "<B>[usr.real_name]</B> looks as if a wall is in front of [usr.p_them()]."
|
||||
else
|
||||
@@ -51,7 +51,7 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/mime_chair/Click()
|
||||
if(usr?.mind)
|
||||
if(!usr.mind.miming)
|
||||
to_chat(usr, "<span class='warning'>You must dedicate yourself to silence first!</span>")
|
||||
to_chat(usr, span_warning("You must dedicate yourself to silence first!"))
|
||||
return
|
||||
invocation = "<B>[usr.real_name]</B> pulls out an invisible chair and sits down."
|
||||
else
|
||||
@@ -97,7 +97,7 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/mime_box/Click()
|
||||
if(usr?.mind)
|
||||
if(!usr.mind.miming)
|
||||
to_chat(usr, "<span class='warning'>You must dedicate yourself to silence first!</span>")
|
||||
to_chat(usr, span_warning("You must dedicate yourself to silence first!"))
|
||||
return
|
||||
invocation = "<B>[usr.real_name]</B> moves [usr.p_their()] hands in the shape of a cube, pressing a box out of the air."
|
||||
else
|
||||
@@ -128,20 +128,20 @@
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(H.mind.miming)
|
||||
still_recharging_msg = "<span class='warning'>You can't break your vow of silence that fast!</span>"
|
||||
still_recharging_msg = span_warning("You can't break your vow of silence that fast!")
|
||||
else
|
||||
still_recharging_msg = "<span class='warning'>You'll have to wait before you can give your vow of silence again!</span>"
|
||||
still_recharging_msg = span_warning("You'll have to wait before you can give your vow of silence again!")
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/mime/speak/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
H.mind.miming=!H.mind.miming
|
||||
if(H.mind.miming)
|
||||
to_chat(H, "<span class='notice'>You make a vow of silence.</span>")
|
||||
to_chat(H, span_notice("You make a vow of silence."))
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "vow")
|
||||
else
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "vow", /datum/mood_event/broken_vow)
|
||||
to_chat(H, "<span class='notice'>You break your vow of silence.</span>")
|
||||
to_chat(H, span_notice("You break your vow of silence."))
|
||||
|
||||
// These spells can only be gotten from the "Guide for Advanced Mimery series" for Mime Traitors.
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
/obj/effect/proc_holder/spell/targeted/forcewall/mime/Click()
|
||||
if(usr?.mind)
|
||||
if(!usr.mind.miming)
|
||||
to_chat(usr, "<span class='warning'>You must dedicate yourself to silence first!</span>")
|
||||
to_chat(usr, span_warning("You must dedicate yourself to silence first!"))
|
||||
return
|
||||
invocation = "<B>[usr.real_name]</B> looks as if a blockade is in front of [usr.p_them()]."
|
||||
else
|
||||
@@ -201,11 +201,11 @@
|
||||
/obj/effect/proc_holder/spell/aimed/finger_guns/Click()
|
||||
var/mob/living/carbon/human/owner = usr
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't properly point your fingers while incapacitated.</span>")
|
||||
to_chat(owner, span_warning("You can't properly point your fingers while incapacitated."))
|
||||
return
|
||||
if(usr?.mind)
|
||||
if(!usr.mind.miming)
|
||||
to_chat(usr, "<span class='warning'>You must dedicate yourself to silence first!</span>")
|
||||
to_chat(usr, span_warning("You must dedicate yourself to silence first!"))
|
||||
return
|
||||
invocation = "<B>[usr.real_name]</B> fires [usr.p_their()] finger gun!"
|
||||
else
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/finger_guns/InterceptClickOn(mob/living/caller, params, atom/target)
|
||||
if(caller.incapacitated())
|
||||
to_chat(caller, "<span class='warning'>You can't properly point your fingers while incapacitated.</span>")
|
||||
to_chat(caller, span_warning("You can't properly point your fingers while incapacitated."))
|
||||
if(charge_type == "recharge")
|
||||
var/refund_percent = current_amount/projectile_amount
|
||||
charge_counter = charge_max * refund_percent
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
// Pillaged and adapted from telepathy code
|
||||
/obj/effect/proc_holder/spell/targeted/personality_commune/cast(list/targets, mob/user)
|
||||
if(!istype(trauma))
|
||||
to_chat(user, "<span class='warning'>Something is wrong; Either due a bug or admemes, you are trying to cast this spell without a split personality!</span>")
|
||||
to_chat(user, span_warning("Something is wrong; Either due a bug or admemes, you are trying to cast this spell without a split personality!"))
|
||||
return
|
||||
var/msg = stripped_input(usr, "What would you like to tell your other self?", null , "")
|
||||
if(!msg)
|
||||
charge_counter = charge_max
|
||||
return
|
||||
to_chat(user, "<span class='boldnotice'>You concentrate and send thoughts to your other self:</span> <span class='notice'>[msg]</span>")
|
||||
to_chat(trauma.owner, "<span class='boldnotice'>[flufftext]</span> <span class='notice'>[msg]</span>")
|
||||
to_chat(user, span_boldnotice("You concentrate and send thoughts to your other self:</span> <span class='notice'>[msg]"))
|
||||
to_chat(trauma.owner, span_boldnotice("[flufftext]</span> <span class='notice'>[msg]"))
|
||||
log_directed_talk(user, trauma.owner, msg, LOG_SAY ,"[name]")
|
||||
for(var/ded in GLOB.dead_mob_list)
|
||||
if(!isobserver(ded))
|
||||
continue
|
||||
to_chat(ded, "[FOLLOW_LINK(ded, user)] <span class='boldnotice'>[user] [name]:</span> <span class='notice'>\"[msg]\" to</span> <span class='name'>[trauma]</span>")
|
||||
to_chat(ded, "[FOLLOW_LINK(ded, user)] [span_boldnotice("[user] [name]:")] [span_notice("\"[msg]\" to")] [span_name("[trauma]")]")
|
||||
|
||||
@@ -20,23 +20,23 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/pointed/barnyardcurse/cast(list/targets, mob/user)
|
||||
if(!targets.len)
|
||||
to_chat(user, "<span class='warning'>No target found in range!</span>")
|
||||
to_chat(user, span_warning("No target found in range!"))
|
||||
return FALSE
|
||||
if(!can_target(targets[1], user))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/target = targets[1]
|
||||
if(target.anti_magic_check())
|
||||
to_chat(user, "<span class='warning'>The spell had no effect!</span>")
|
||||
target.visible_message("<span class='danger'>[target]'s face bursts into flames, which instantly burst outward, leaving [target] unharmed!</span>", \
|
||||
"<span class='danger'>Your face starts burning up, but the flames are repulsed by your anti-magic protection!</span>")
|
||||
to_chat(user, span_warning("The spell had no effect!"))
|
||||
target.visible_message(span_danger("[target]'s face bursts into flames, which instantly burst outward, leaving [target] unharmed!"), \
|
||||
span_danger("Your face starts burning up, but the flames are repulsed by your anti-magic protection!"))
|
||||
return FALSE
|
||||
|
||||
var/choice = pick(GLOB.cursed_animal_masks)
|
||||
var/obj/item/clothing/mask/magichead = new choice(get_turf(target))
|
||||
|
||||
target.visible_message("<span class='danger'>[target]'s face bursts into flames, and a barnyard animal'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 barnyard animal!</span>")
|
||||
target.visible_message(span_danger("[target]'s face bursts into flames, and a barnyard animal's head takes its place!"), \
|
||||
span_danger("Your face burns up, and shortly after the fire you realise you have the face of a barnyard animal!"))
|
||||
if(!target.dropItemToGround(target.wear_mask))
|
||||
qdel(target.wear_mask)
|
||||
target.equip_to_slot_if_possible(magichead, ITEM_SLOT_MASK, 1, 1)
|
||||
@@ -48,6 +48,6 @@
|
||||
return FALSE
|
||||
if(!is_type_in_typecache(target, compatible_mobs_typecache))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You are unable to curse [target]!</span>")
|
||||
to_chat(user, span_warning("You are unable to curse [target]!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
return FALSE
|
||||
if(!isliving(target))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You can only blind living beings!</span>")
|
||||
to_chat(user, span_warning("You can only blind living beings!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
/obj/effect/proc_holder/spell/pointed/mind_transfer/cast(list/targets, mob/living/user, silent = FALSE)
|
||||
if(!targets.len)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>No mind found!</span>")
|
||||
to_chat(user, span_warning("No mind found!"))
|
||||
return FALSE
|
||||
if(targets.len > 1)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>Too many minds! You're not a hive damnit!</span>")
|
||||
to_chat(user, span_warning("Too many minds! You're not a hive damnit!"))
|
||||
return FALSE
|
||||
if(!can_target(targets[1], user, silent))
|
||||
return FALSE
|
||||
@@ -32,7 +32,7 @@
|
||||
var/datum/mind/VM = victim.mind
|
||||
if(victim.anti_magic_check(TRUE, FALSE) || VM.has_antag_datum(/datum/antagonist/wizard) || VM.has_antag_datum(/datum/antagonist/cult) || VM.has_antag_datum(/datum/antagonist/changeling) || VM.has_antag_datum(/datum/antagonist/rev) || victim.key[1] == "@")
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[victim.p_their(TRUE)] mind is resisting your spell!</span>")
|
||||
to_chat(user, span_warning("[victim.p_their(TRUE)] mind is resisting your spell!"))
|
||||
return FALSE
|
||||
if(istype(victim, /mob/living/simple_animal/hostile/guardian))
|
||||
var/mob/living/simple_animal/hostile/guardian/stand = victim
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
//You should not be able to enter one of the most powerful side-antags as a fucking wizard.
|
||||
if(istype(victim,/mob/living/simple_animal/hostile/imp/slaughter))
|
||||
to_chat(user, "<span class='warning'>The devilish contract doesn't include the 'mind swappable' package, please try again another lifetime.</span>")
|
||||
to_chat(user, span_warning("The devilish contract doesn't include the 'mind swappable' package, please try again another lifetime."))
|
||||
return
|
||||
|
||||
//MIND TRANSFER BEGIN
|
||||
@@ -67,11 +67,11 @@
|
||||
return FALSE
|
||||
if(!isliving(target))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You can only swap minds with living beings!</span>")
|
||||
to_chat(user, span_warning("You can only swap minds with living beings!"))
|
||||
return FALSE
|
||||
if(user == target)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You can't swap minds with yourself!</span>")
|
||||
to_chat(user, span_warning("You can't swap minds with yourself!"))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/victim = target
|
||||
@@ -79,25 +79,25 @@
|
||||
|
||||
if(ismegafauna(victim))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>This creature is too powerful to control!</span>")
|
||||
to_chat(user, span_warning("This creature is too powerful to control!"))
|
||||
return FALSE
|
||||
if(victim.stat == DEAD)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You don't particularly want to be dead!</span>")
|
||||
to_chat(user, span_warning("You don't particularly want to be dead!"))
|
||||
return FALSE
|
||||
if(!victim.key || !victim.mind)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[t_He] appear[victim.p_s()] to be catatonic! Not even magic can affect [victim.p_their()] vacant mind.</span>")
|
||||
to_chat(user, span_warning("[t_He] appear[victim.p_s()] to be catatonic! Not even magic can affect [victim.p_their()] vacant mind."))
|
||||
return FALSE
|
||||
if(user.suiciding)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You're killing yourself! You can't concentrate enough to do this!</span>")
|
||||
to_chat(user, span_warning("You're killing yourself! You can't concentrate enough to do this!"))
|
||||
return FALSE
|
||||
if(istype(victim, /mob/living/simple_animal/hostile/guardian))
|
||||
var/mob/living/simple_animal/hostile/guardian/stand = victim
|
||||
if(stand.summoner)
|
||||
if(stand.summoner == user)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>Swapping minds with your own guardian would just put you back into your own head!</span>")
|
||||
to_chat(user, span_warning("Swapping minds with your own guardian would just put you back into your own head!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
return
|
||||
var/msg
|
||||
if(!can_cast(user))
|
||||
msg = "<span class='warning'>You can no longer cast [name]!</span>"
|
||||
msg = span_warning("You can no longer cast [name]!")
|
||||
remove_ranged_ability(msg)
|
||||
return
|
||||
if(active)
|
||||
msg = "<span class='notice'>[deactive_msg]</span>"
|
||||
msg = span_notice("[deactive_msg]")
|
||||
remove_ranged_ability(msg)
|
||||
else
|
||||
msg = "<span class='notice'>[active_msg] <B>Left-click to activate spell on a target!</B></span>"
|
||||
msg = span_notice("[active_msg] <B>Left-click to activate spell on a target!</B>")
|
||||
add_ranged_ability(user, msg, TRUE)
|
||||
|
||||
/obj/effect/proc_holder/spell/pointed/on_lose(mob/living/user)
|
||||
@@ -93,11 +93,11 @@
|
||||
/obj/effect/proc_holder/spell/pointed/proc/intercept_check(mob/user, atom/target, silent = FALSE)
|
||||
if(!self_castable && target == user)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>You cannot cast the spell on yourself!</span>")
|
||||
to_chat(user, span_warning("You cannot cast the spell on yourself!"))
|
||||
return FALSE
|
||||
if(!(target in view_or_range(range, user, selection_type)))
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[target.p_theyre(TRUE)] too far away!</span>")
|
||||
to_chat(user, span_warning("[target.p_theyre(TRUE)] too far away!"))
|
||||
return FALSE
|
||||
if(!can_target(target, user, silent))
|
||||
return FALSE
|
||||
|
||||
@@ -118,7 +118,7 @@ GLOBAL_LIST_INIT(summoned_magic_objectives, list(
|
||||
|
||||
var/in_hand = H.put_in_hands(G) // not always successful
|
||||
|
||||
to_chat(H, "<span class='warning'>\A [G] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
|
||||
to_chat(H, span_warning("\A [G] appears [in_hand ? "in your hand" : "at your feet"]!"))
|
||||
|
||||
/proc/give_magic(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
@@ -144,14 +144,14 @@ GLOBAL_LIST_INIT(summoned_magic_objectives, list(
|
||||
|
||||
var/in_hand = H.put_in_hands(M)
|
||||
|
||||
to_chat(H, "<span class='warning'>\A [M] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
|
||||
to_chat(H, span_warning("\A [M] appears [in_hand ? "in your hand" : "at your feet"]!"))
|
||||
if(lucky)
|
||||
to_chat(H, "<span class='notice'>You feel incredibly lucky.</span>")
|
||||
to_chat(H, span_notice("You feel incredibly lucky."))
|
||||
|
||||
|
||||
/proc/rightandwrong(summon_type, mob/user, survivor_probability)
|
||||
if(user) //in this case either someone holding a spellbook or a badmin
|
||||
to_chat(user, "<span class='warning'>You summoned [summon_type]!</span>")
|
||||
to_chat(user, span_warning("You summoned [summon_type]!"))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] summoned [summon_type]!")
|
||||
log_game("[key_name(user)] summoned [summon_type]!")
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/effect/proc_holder/spell/targeted/rod_form/cast(list/targets,mob/user = usr)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to trash Wizard Federation property. Best wait until you leave to use [src].</span>")
|
||||
to_chat(user, span_warning("You know better than to trash Wizard Federation property. Best wait until you leave to use [src]."))
|
||||
return
|
||||
for(var/mob/living/M in targets)
|
||||
var/turf/start = get_turf(M)
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
/obj/effect/immovablerod/wizard/penetrate(mob/living/L)
|
||||
if(L.anti_magic_check())
|
||||
L.visible_message("<span class='danger'>[src] hits [L], but it bounces back, then vanishes!</span>" , "<span class='userdanger'>[src] hits you... but it bounces back, then vanishes!</span>" , "<span class='danger'>You hear a weak, sad, CLANG.</span>")
|
||||
L.visible_message(span_danger("[src] hits [L], but it bounces back, then vanishes!") , span_userdanger("[src] hits you... but it bounces back, then vanishes!") , span_danger("You hear a weak, sad, CLANG."))
|
||||
qdel(src)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[L] is penetrated by an immovable rod!</span>" , "<span class='userdanger'>The rod penetrates you!</span>" , "<span class='danger'>You hear a CLANG!</span>")
|
||||
L.visible_message(span_danger("[L] is penetrated by an immovable rod!") , span_userdanger("The rod penetrates you!") , span_danger("You hear a CLANG!"))
|
||||
L.adjustBruteLoss(70 + damage_bonus)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
return FALSE
|
||||
var/area/noteleport_check = get_area(user)
|
||||
if(noteleport_check && noteleport_check.area_flags & NOTELEPORT)
|
||||
to_chat(user, "<span class='danger'>Some dull, universal force is stopping you from melting into the shadows here.</span>")
|
||||
to_chat(user, span_danger("Some dull, universal force is stopping you from melting into the shadows here."))
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shadowwalk/cast(list/targets,mob/living/user = usr)
|
||||
@@ -36,14 +36,14 @@
|
||||
var/light_amount = T.get_lumcount()
|
||||
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
|
||||
playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='boldwarning'>[user] melts into the shadows!</span>")
|
||||
visible_message(span_boldwarning("[user] melts into the shadows!"))
|
||||
user.SetAllImmobility(0)
|
||||
user.setStaminaLoss(0, 0)
|
||||
var/obj/effect/dummy/phased_mob/shadow/S2 = new(get_turf(user.loc))
|
||||
user.forceMove(S2)
|
||||
S2.jaunter = user
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It isn't dark enough here!</span>")
|
||||
to_chat(user, span_warning("It isn't dark enough here!"))
|
||||
|
||||
/obj/effect/dummy/phased_mob/shadow
|
||||
var/mob/living/jaunter
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/effect/dummy/phased_mob/shadow/phased_check(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(. && isspaceturf(.))
|
||||
to_chat(user, "<span class='warning'>It really would not be wise to go into space.</span>")
|
||||
to_chat(user, span_warning("It really would not be wise to go into space."))
|
||||
return FALSE
|
||||
|
||||
/obj/effect/dummy/phased_mob/shadow/proc/check_light_level()
|
||||
@@ -88,9 +88,9 @@
|
||||
/obj/effect/dummy/phased_mob/shadow/proc/end_jaunt(forced = FALSE)
|
||||
if(jaunter)
|
||||
if(forced)
|
||||
visible_message("<span class='boldwarning'>[jaunter] is revealed by the light!</span>")
|
||||
visible_message(span_boldwarning("[jaunter] is revealed by the light!"))
|
||||
else
|
||||
visible_message("<span class='boldwarning'>[jaunter] emerges from the darkness!</span>")
|
||||
visible_message(span_boldwarning("[jaunter] emerges from the darkness!"))
|
||||
playsound(loc, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
else
|
||||
ourpipeline = pipenets
|
||||
|
||||
to_chat(M, "<span class='userdanger'>Casting [src] inside of [pipeyoudiein] quickly turns you into a bloody mush!</span>")
|
||||
to_chat(M, span_userdanger("Casting [src] inside of [pipeyoudiein] quickly turns you into a bloody mush!"))
|
||||
var/gibtype = /obj/effect/gibspawner/generic
|
||||
if(isalien(M))
|
||||
gibtype = /obj/effect/gibspawner/xeno
|
||||
@@ -101,7 +101,7 @@
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/proc/Shapeshift(mob/living/caster)
|
||||
var/obj/shapeshift_holder/H = locate() in caster
|
||||
if(H)
|
||||
to_chat(caster, "<span class='warning'>You're already shapeshifted!</span>")
|
||||
to_chat(caster, span_warning("You're already shapeshifted!"))
|
||||
return
|
||||
|
||||
var/mob/living/shape = new shapeshift_type(caster.loc)
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
action_icon_state = "soultap"
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tap/cast(list/targets, mob/living/user = usr)
|
||||
to_chat(user, "<span class='danger'>Your body feels drained and there is a burning pain in your chest.</span>")
|
||||
to_chat(user, span_danger("Your body feels drained and there is a burning pain in your chest."))
|
||||
user.maxHealth -= HEALTH_LOST_PER_SOUL_TAP
|
||||
user.health = min(user.health, user.maxHealth)
|
||||
if(user.maxHealth <= 0)
|
||||
to_chat(user, "<span class='userdanger'>Your weakened soul is completely consumed by the tap!</span>")
|
||||
to_chat(user, span_userdanger("Your weakened soul is completely consumed by the tap!"))
|
||||
return
|
||||
for(var/obj/effect/proc_holder/spell/spell in user.mind.spell_list)
|
||||
spell.charge_counter = spell.charge_max
|
||||
|
||||
@@ -36,17 +36,17 @@
|
||||
|
||||
if(!marked_item)
|
||||
if(hand_items)
|
||||
message = "<span class='warning'>You aren't holding anything that can be marked for recall!</span>"
|
||||
message = span_warning("You aren't holding anything that can be marked for recall!")
|
||||
else
|
||||
message = "<span class='warning'>You must hold the desired item in your hands to mark it for recall!</span>"
|
||||
message = span_warning("You must hold the desired item in your hands to mark it for recall!")
|
||||
|
||||
else if(marked_item && (marked_item in hand_items)) //unlinking item to the spell
|
||||
message = "<span class='notice'>You remove the mark on [marked_item] to use elsewhere.</span>"
|
||||
message = span_notice("You remove the mark on [marked_item] to use elsewhere.")
|
||||
name = "Instant Summons"
|
||||
marked_item = null
|
||||
|
||||
else if(marked_item && QDELETED(marked_item)) //the item was destroyed at some point
|
||||
message = "<span class='warning'>You sense your marked item has been destroyed!</span>"
|
||||
message = span_warning("You sense your marked item has been destroyed!")
|
||||
name = "Instant Summons"
|
||||
marked_item = null
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
var/mob/M = item_to_retrieve.loc
|
||||
|
||||
if(issilicon(M)) //Items in silicons warp the whole silicon
|
||||
M.loc.visible_message("<span class='warning'>[M] suddenly disappears!</span>")
|
||||
M.loc.visible_message(span_warning("[M] suddenly disappears!"))
|
||||
M.forceMove(L.loc)
|
||||
M.loc.visible_message("<span class='warning'>[M] suddenly appears!</span>")
|
||||
M.loc.visible_message(span_warning("[M] suddenly appears!"))
|
||||
item_to_retrieve = null
|
||||
break
|
||||
M.dropItemToGround(item_to_retrieve)
|
||||
@@ -92,13 +92,13 @@
|
||||
return
|
||||
|
||||
if(item_to_retrieve.loc)
|
||||
item_to_retrieve.loc.visible_message("<span class='warning'>The [item_to_retrieve.name] suddenly disappears!</span>")
|
||||
item_to_retrieve.loc.visible_message(span_warning("The [item_to_retrieve.name] suddenly disappears!"))
|
||||
if(!L.put_in_hands(item_to_retrieve))
|
||||
item_to_retrieve.forceMove(L.drop_location())
|
||||
item_to_retrieve.loc.visible_message("<span class='warning'>The [item_to_retrieve.name] suddenly appears!</span>")
|
||||
item_to_retrieve.loc.visible_message(span_warning("The [item_to_retrieve.name] suddenly appears!"))
|
||||
playsound(get_turf(L), 'sound/magic/summonitems_generic.ogg', 50, TRUE)
|
||||
else
|
||||
item_to_retrieve.loc.visible_message("<span class='warning'>The [item_to_retrieve.name] suddenly appears in [L]'s hand!</span>")
|
||||
item_to_retrieve.loc.visible_message(span_warning("The [item_to_retrieve.name] suddenly appears in [L]'s hand!"))
|
||||
playsound(get_turf(L), 'sound/magic/summonitems_generic.ogg', 50, TRUE)
|
||||
|
||||
|
||||
|
||||
@@ -29,4 +29,4 @@
|
||||
continue
|
||||
var/follow_rev = FOLLOW_LINK(ded, user)
|
||||
var/follow_whispee = FOLLOW_LINK(ded, M)
|
||||
to_chat(ded, "[follow_rev] <span class='[boldnotice]'>[user] [name]:</span> <span class='[notice]'>\"[msg]\" to</span> [follow_whispee] <span class='name'>[M]</span>")
|
||||
to_chat(ded, "[follow_rev] <span class='[boldnotice]'>[user] [name]:</span> <span class='[notice]'>\"[msg]\" to</span> [follow_whispee] [span_name("[M]")]")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
remove_hand()
|
||||
if(action?.owner)
|
||||
var/mob/guy_who_needs_to_know = action.owner
|
||||
to_chat(guy_who_needs_to_know, "<span class='notice'>The power of the spell dissipates from your hand.</span>")
|
||||
to_chat(guy_who_needs_to_know, span_notice("The power of the spell dissipates from your hand."))
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/touch/proc/remove_hand(recharge = FALSE)
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets,mob/user = usr)
|
||||
if(!QDELETED(attached_hand))
|
||||
remove_hand(TRUE)
|
||||
to_chat(user, "<span class='notice'>[dropmessage]</span>")
|
||||
to_chat(user, span_notice("[dropmessage]"))
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
@@ -51,11 +51,11 @@
|
||||
if(!user.put_in_hands(attached_hand))
|
||||
remove_hand(TRUE)
|
||||
if (user.usable_hands == 0)
|
||||
to_chat(user, "<span class='warning'>You dont have any usable hands!</span>")
|
||||
to_chat(user, span_warning("You dont have any usable hands!"))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Your hands are full!</span>")
|
||||
to_chat(user, span_warning("Your hands are full!"))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>[drawmessage]</span>")
|
||||
to_chat(user, span_notice("[drawmessage]"))
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/voice_of_god/can_cast(mob/user = usr)
|
||||
if(!user.can_speak())
|
||||
to_chat(user, "<span class='warning'>You are unable to speak!</span>")
|
||||
to_chat(user, span_warning("You are unable to speak!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
if(M.anti_magic_check())
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
|
||||
M.visible_message(span_warning("[src] vanishes on contact with [target]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/mutate
|
||||
@@ -288,13 +288,13 @@
|
||||
var/mob/living/M = AM
|
||||
M.Paralyze(100)
|
||||
M.adjustBruteLoss(5)
|
||||
to_chat(M, "<span class='userdanger'>You're slammed into the floor by [user]!</span>")
|
||||
to_chat(M, span_userdanger("You're slammed into the floor by [user]!"))
|
||||
else
|
||||
new sparkle_path(get_turf(AM), get_dir(user, AM)) //created sparkles will disappear on their own
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.Paralyze(stun_amt)
|
||||
to_chat(M, "<span class='userdanger'>You're thrown back by [user]!</span>")
|
||||
to_chat(M, span_userdanger("You're thrown back by [user]!"))
|
||||
AM.safe_throw_at(throwtarget, ((clamp((maxthrow - (clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user, force = repulse_force)//So stuff gets tossed around at the same time.
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno //i fixed conflicts only to find out that this is in the WIZARD file instead of the xeno file?!
|
||||
|
||||
Reference in New Issue
Block a user