mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Adds attack logging to learning spells from one time use spellbooks and casting of spells.
This commit is contained in:
@@ -132,9 +132,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
sleep(1)
|
||||
charge_counter++
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1) //if recharge is started is important for the trigger spells
|
||||
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1, mob/user = usr) //if recharge is started is important for the trigger spells
|
||||
before_cast(targets)
|
||||
invocation()
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>[user.real_name] ([user.ckey]) cast the spell [name].</font>")
|
||||
spawn(0)
|
||||
if(charge_type == "recharge" && recharge)
|
||||
start_recharge()
|
||||
@@ -285,4 +286,4 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
|
||||
perform(targets)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -342,6 +342,7 @@
|
||||
else
|
||||
user.spell_list += S
|
||||
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)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user