[MIRROR] Refactors how movetypes are added and removed, No timers this time. (#2358)

* Refactors how movetypes are added and removed, No timers this time. (#55444)

* Refactors how movetypes are added and removed, No timers this time.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-12-29 02:39:03 +00:00
committed by GitHub
co-authored by Ghom
parent b7f50181ca
commit 94ed7ed0f1
53 changed files with 302 additions and 150 deletions
+8 -1
View File
@@ -24,6 +24,10 @@
var/respawn_time = 50
var/respawn_sound = 'sound/magic/staff_animation.ogg'
/obj/structure/life_candle/ComponentInitialize()
. = ..()
AddElement(/datum/element/movetype_handler)
/obj/structure/life_candle/attack_hand(mob/user)
. = ..()
if(.)
@@ -33,12 +37,15 @@
if(user.mind in linked_minds)
user.visible_message("<span class='notice'>[user] reaches out and pinches the flame of [src].</span>", "<span class='warning'>You sever the connection between yourself and [src].</span>")
linked_minds -= user.mind
if(!linked_minds.len)
REMOVE_TRAIT(src, TRAIT_MOVE_FLOATING, LIFECANDLE_TRAIT)
else
if(!linked_minds.len)
ADD_TRAIT(src, TRAIT_MOVE_FLOATING, LIFECANDLE_TRAIT)
user.visible_message("<span class='notice'>[user] touches [src]. It seems to respond to [user.p_their()] presence!</span>", "<span class='warning'>You create a connection between you and [src].</span>")
linked_minds |= user.mind
update_icon()
float(linked_minds.len)
if(linked_minds.len)
START_PROCESSING(SSobj, src)
set_light(lit_luminosity)