mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user