mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-30 08:38:13 +01:00
to_chat replacing stream operator
This commit is contained in:
@@ -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
|
||||
M <<"<span class='notice'>You feel raw magic flowing through you, it feels good!</span>"
|
||||
to_chat(M, "<span class='notice'>You feel raw magic flowing through you, it feels good!</span>")
|
||||
else
|
||||
M <<"<span class='notice'>You feel very strange for a moment, but then it passes.</span>"
|
||||
to_chat(M, "<span class='notice'>You feel very strange for a moment, but then it passes.</span>")
|
||||
return M
|
||||
|
||||
/spell/aoe_turf/charge/proc/cast_charge(var/atom/target)
|
||||
|
||||
@@ -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))
|
||||
user << "<span class='warning'>You can't build things on shuttles!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't build things on shuttles!</span>")
|
||||
continue
|
||||
spawn_place.ChangeTurf(summoned_object_type)
|
||||
summoned_object = spawn_place
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
/obj/item/weapon/scrying/attack_self(mob/user as mob)
|
||||
if((user.mind && !wizards.is_antagonist(user.mind)))
|
||||
user << "<span class='warning'>You stare into the orb and see nothing but your own reflection.</span>"
|
||||
to_chat(user, "<span class='warning'>You stare into the orb and see nothing but your own reflection.</span>")
|
||||
return
|
||||
|
||||
user << "<span class='info'>You can see... everything!</span>"
|
||||
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>")
|
||||
|
||||
user.teleop = user.ghostize(1)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
L+=T
|
||||
|
||||
if(!L.len)
|
||||
user <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
|
||||
to_chat(user, "The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.")
|
||||
return
|
||||
|
||||
if(user && user.buckled)
|
||||
|
||||
@@ -171,5 +171,5 @@
|
||||
R.word3=cultwords["technology"]
|
||||
R.check_icon()
|
||||
else
|
||||
user << "<span class='warning'> You do not have enough space to write a proper rune.</span>"
|
||||
to_chat(user, "<span class='warning'> You do not have enough space to write a proper rune.</span>")
|
||||
return
|
||||
|
||||
@@ -156,7 +156,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
for(var/atom/target in targets)
|
||||
var/location = get_turf(target)
|
||||
if(istype(target,/mob/living) && message)
|
||||
target << text("[message]")
|
||||
to_chat(target, "[message]")
|
||||
if(sparks_spread)
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is
|
||||
@@ -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.")
|
||||
user << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
|
||||
to_chat(user, "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>")
|
||||
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)
|
||||
user << "<span class='warning'>You cannot cast spells in null space!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot cast spells in null space!</span>")
|
||||
|
||||
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)
|
||||
SM << "<span class='warning'>The nullrod's power interferes with your own!</span>"
|
||||
to_chat(SM, "<span class='warning'>The nullrod's power interferes with your own!</span>")
|
||||
return 0
|
||||
|
||||
if(!src.check_charge(skipcharge, user)) //sees if we can cast based on charges alone
|
||||
@@ -209,12 +209,12 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
|
||||
if(!(spell_flags & GHOSTCAST) && holder == user)
|
||||
if(user.stat && !(spell_flags & STATALLOWED))
|
||||
usr << "Not when you're incapacitated."
|
||||
to_chat(usr, "Not when you're incapacitated.")
|
||||
return 0
|
||||
|
||||
if(ishuman(user) && !(invocation_type in list(SpI_EMOTE, SpI_NONE)))
|
||||
if(user.is_muzzled())
|
||||
user << "Mmmf mrrfff!"
|
||||
to_chat(user, "Mmmf mrrfff!")
|
||||
return 0
|
||||
|
||||
var/spell/noclothes/spell = locate() in user.spell_list
|
||||
@@ -229,11 +229,11 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
switch(charge_type)
|
||||
if(Sp_RECHARGE)
|
||||
if(charge_counter < charge_max)
|
||||
user << still_recharging_msg
|
||||
to_chat(user,still_recharging_msg)
|
||||
return 0
|
||||
if(Sp_CHARGES)
|
||||
if(!charge_counter)
|
||||
user << "<span class='notice'>[name] has no charges left.</span>"
|
||||
to_chat(user, "<span class='notice'>[name] has no charges left.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(!user)
|
||||
return
|
||||
if((user.mind && !wizards.is_antagonist(user.mind)))
|
||||
usr << "<span class='warning'>You stare at the book but cannot make sense of the markings!</span>"
|
||||
to_chat(usr, "<span class='warning'>You stare at the book but cannot make sense of the markings!</span>")
|
||||
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
|
||||
H << "<span class='notice'>The walls suddenly disappear.</span>"
|
||||
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
|
||||
temp = "You have purchased a scrying orb, and gained x-ray vision."
|
||||
max_uses--
|
||||
else
|
||||
@@ -261,15 +261,15 @@
|
||||
if(user.mind)
|
||||
// TODO: Update to new antagonist system.
|
||||
if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard")
|
||||
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 class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>")
|
||||
else
|
||||
user <<"<span class='notice'>You've already read this one.</span>"
|
||||
to_chat(user, "<span class='notice'>You've already read this one.</span>")
|
||||
return
|
||||
if(used)
|
||||
recoil(user)
|
||||
else
|
||||
user.add_spell(S)
|
||||
user <<"<span class='notice'>you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>"
|
||||
to_chat(user, "<span class='notice'>you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>[user.real_name] ([user.ckey]) learned the spell [spellname] ([S]).</font>")
|
||||
onlearned(user)
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/smoke/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='caution'>Your stomach rumbles...</span>"
|
||||
to_chat(user, "<span class='caution'>Your stomach rumbles...</span>")
|
||||
if(user.nutrition)
|
||||
user.nutrition -= 200
|
||||
if(user.nutrition <= 0)
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You go blind!</span>"
|
||||
to_chat(user, "<span class='warning'>You go blind!</span>")
|
||||
user.Blind(10)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap
|
||||
@@ -338,10 +338,10 @@
|
||||
stored_swap = null
|
||||
if(!stored_swap)
|
||||
stored_swap = user
|
||||
user <<"<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>"
|
||||
to_chat(user, "<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>")
|
||||
return
|
||||
if(stored_swap == user)
|
||||
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 class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>")
|
||||
return
|
||||
|
||||
if(user.mind.special_verbs.len)
|
||||
@@ -370,8 +370,8 @@
|
||||
for(var/V in user.mind.special_verbs)
|
||||
user.verbs += V
|
||||
|
||||
stored_swap <<"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>"
|
||||
user <<"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>"
|
||||
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>")
|
||||
stored_swap = null
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/forcewall
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/forcewall/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You suddenly feel very solid!</span>"
|
||||
to_chat(user, "<span class='warning'>You suddenly feel very solid!</span>")
|
||||
var/obj/structure/closet/statue/S = new /obj/structure/closet/statue(user.loc, user)
|
||||
S.timer = 30
|
||||
user.drop_item()
|
||||
@@ -396,7 +396,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/knock/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You're knocked down!</span>"
|
||||
to_chat(user, "<span class='warning'>You're knocked down!</span>")
|
||||
user.Weaken(20)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/horsemask
|
||||
@@ -407,7 +407,7 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/horsemask/recoil(mob/living/carbon/user as mob)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
user <<"<font size='15' color='red'><b>HOR-SIE HAS RISEN</b></font>"
|
||||
to_chat(user, "<font size='15' color='red'><b>HOR-SIE HAS RISEN</b></font>")
|
||||
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
|
||||
magichead.canremove = 0 //curses!
|
||||
magichead.flags_inv = null //so you can still see their face
|
||||
@@ -416,7 +416,7 @@
|
||||
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
||||
qdel(src)
|
||||
else
|
||||
user <<"<span class='notice'>I say thee neigh</span>"
|
||||
to_chat(user, "<span class='notice'>I say thee neigh</span>")
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/charge
|
||||
spell = /spell/aoe_turf/charge
|
||||
@@ -426,5 +426,5 @@
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/charge/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>[src] suddenly feels very warm!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] suddenly feels very warm!</span>")
|
||||
empulse(src, 1, 1, 1, 1)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
if(!T.contains_dense_objects())
|
||||
last_valid_turf = T
|
||||
else
|
||||
user << "<span class='warning'>Some strange aura is blocking the way!</span>"
|
||||
to_chat(user, "<span class='warning'>Some strange aura is blocking the way!</span>")
|
||||
src.canmove = 0
|
||||
spawn(2) src.canmove = 1
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
M.forceMove(destination)
|
||||
if(M != user)
|
||||
prey = 1
|
||||
user << "<span class='sinister'>You warp back to Nar-Sie[prey ? " along with your prey":""].</span>"
|
||||
to_chat(user, "<span class='sinister'>You warp back to Nar-Sie[prey ? " along with your prey":""].</span>")
|
||||
else
|
||||
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 class='danger'>...something's wrong!</span>")//There shouldn't be an instance of Harvesters when Nar-Sie isn't in the world.
|
||||
*/
|
||||
@@ -24,15 +24,15 @@
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
if(target.stat == DEAD)
|
||||
user << "You didn't study necromancy back at the Space Wizard Federation academy."
|
||||
to_chat(user, "You didn't study necromancy back at the Space Wizard Federation academy.")
|
||||
continue
|
||||
|
||||
if(!target.key || !target.mind)
|
||||
user << "They appear to be catatonic. Not even magic can affect their vacant mind."
|
||||
to_chat(user, "They appear to be catatonic. Not even magic can affect their vacant mind.")
|
||||
continue
|
||||
|
||||
if(target.mind.special_role in protected_roles)
|
||||
user << "Their mind is resisting your spell."
|
||||
to_chat(user, "Their mind is resisting your spell.")
|
||||
continue
|
||||
|
||||
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
|
||||
@@ -78,4 +78,4 @@
|
||||
|
||||
//After a certain amount of time the victim gets a message about being in a different body.
|
||||
spawn(msg_wait)
|
||||
caster << "<span class='danger'>You feel woozy and lightheaded. Your body doesn't seem like your own.</span>"
|
||||
to_chat(caster, "<span class='danger'>You feel woozy and lightheaded. Your body doesn't seem like your own.</span>")
|
||||
|
||||
Reference in New Issue
Block a user