Merge pull request #12715 from Very-Soft/capturecrystalfix

Allow capture crystals without owners to obtain owners
This commit is contained in:
Casey
2022-04-11 15:26:42 -04:00
committed by GitHub

View File

@@ -226,6 +226,13 @@
//Tries to unleash or recall your stored mob
/obj/item/capture_crystal/attack_self(mob/living/user)
if(bound_mob && !owner)
if(bound_mob == user)
to_chat(user, "<span class='notice'>\The [src] emits an unpleasant tone... It does not activate for you.</span>")
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
return
if(tgui_alert(user, "\The [src] hasn't got an owner. It has \the [bound_mob] registered to it. Would you like to claim this as yours?", "Claim ownership", list("No","Yes")) == "Yes")
owner = user
if(!cooldown_check())
to_chat(user, "<span class='notice'>\The [src] emits an unpleasant tone... It is not ready yet.</span>")
if(bound_mob)