mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
* Add pAI movement freedom when emagged * Update PaiCard.tsx * Emagging can remove the leash now --------- Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
32 lines
528 B
Plaintext
32 lines
528 B
Plaintext
/obj/item/pai_card/download_candidate(mob/user, ckey)
|
|
. = ..()
|
|
|
|
if(!.)
|
|
return
|
|
|
|
if(isnull(pai.leash))
|
|
return
|
|
|
|
pai.leash.disable_leash() // leash starts off disabled by default
|
|
|
|
/obj/item/pai_card/ui_data(mob/user)
|
|
. = ..()
|
|
if(!pai)
|
|
return
|
|
|
|
.["pai"]["leash_enabled"] = pai.leash?.enabled
|
|
|
|
/obj/item/pai_card/ui_act(action, list/params, datum/tgui/ui)
|
|
. = ..()
|
|
if(.)
|
|
return TRUE
|
|
|
|
if(pai && action == "toggle_leash")
|
|
if(isnull(pai.leash))
|
|
return FALSE
|
|
|
|
pai.leash.toggle_leash()
|
|
return TRUE
|
|
|
|
return FALSE
|