Re-Adds leashing to pAIs as a pAI side optional toggle (#4297)

## About The Pull Request

pAIs can now toggle if they wish to project out of their cards or take
their cards with them. This can be toggled whenever they are in their
card form with a new action button spirited by ExusA
## Why It's Good For The Game

Lets pAI players choose between projecting out as a hologram, and
running around with their card inside of their hologram thingy

## Proof Of Testing
Compiled the game and spawned as pAI. Tested turning on and off the
leash, and made sure couldnt change it while folded out

## Changelog
🆑
code: Added toggle to turn leashing on or off for pAIs, from pAI side
image: Added new sprite for Leash toggle for pAIs, made by ExusA
/🆑

---------

Co-authored-by: Kobo <>
This commit is contained in:
KeptheKobold
2025-08-01 13:11:24 -04:00
committed by GitHub
co-authored by Kobo <>
parent 160afc0322
commit bd999f2829
6 changed files with 77 additions and 21 deletions
+8 -3
View File
@@ -220,7 +220,7 @@
pai_card.set_personality(src)
card = pai_card
forceMove(pai_card)
// BUBBER EDIT REMOVAL: PAI Freedom: ORIGINAL: leash = AddComponent(/datum/component/leash, pai_card, HOLOFORM_DEFAULT_RANGE, force_teleport_out_effect = /obj/effect/temp_visual/guardian/phase/out)
leash = AddComponent(/datum/component/leash, pai_card, HOLOFORM_DEFAULT_RANGE, force_teleport_out_effect = /obj/effect/temp_visual/guardian/phase/out)
addtimer(VARSET_WEAK_CALLBACK(src, holochassis_ready, TRUE), HOLOCHASSIS_INIT_TIME)
if(!holoform)
add_traits(list(TRAIT_IMMOBILIZED, TRAIT_HANDS_BLOCKED), PAI_FOLDED)
@@ -261,7 +261,12 @@
SEND_SIGNAL(src, COMSIG_LIVING_HEALTH_UPDATE)
/mob/living/silicon/pai/update_desc(updates)
desc = "A pAI mobile hard-light holographics emitter. This one appears in the form of a [chassis]." // BUBBER EDIT: PAI Freedom: ORIGINAL: desc = "A hard-light holographic avatar representing a pAI. This one appears in the form of a [chassis]."
// BUBBER EDIT START: PAI ReLeashed: ORIGINAL: desc = "A hard-light holographic avatar representing a pAI. This one appears in the form of a [chassis]."
if(!holo_leash)
desc = "A pAI mobile hard-light holographics emitter. This one appears in the form of a [chassis]."
else
desc = "A hard-light holographic avatar representing a pAI. This one appears in the form of a [chassis]."
// BUBBER EDIT END
return ..()
/mob/living/silicon/pai/update_icon_state()
@@ -472,7 +477,7 @@
/// Updates the distance we can be from our pai card
/mob/living/silicon/pai/proc/increment_range(increment_amount)
if(!leash) // BUBBER EDIT: PAI Freedom: ORIGINAL: if(emagged)
if(!holo_leash) // BUBBER EDIT: PAI ReLeashed: ORIGINAL: if(emagged)
return
var/new_distance = leash.distance + increment_amount
+31 -18
View File
@@ -78,7 +78,12 @@
if(!holoform)
. = fold_out(force)
return FALSE
visible_message(span_notice("[src] deactivates its holochassis emitter and folds back into a compact card!")) // BUBBER EDIT: PAI Freedom: ORIGINAL: visible_message(span_notice("[src] dematerialises!"))
// BUBBER EDIT START: PAI ReLeashed
if(!holo_leash)
visible_message(span_notice("[src] deactivates its holochassis emitter and folds back into a compact card!")) // BUBBER EDIT: PAI Freedom: ORIGINAL: visible_message(span_notice("[src] dematerialises!"))
else
visible_message(span_notice("[src] dematerialises!"))
// BUBBER EDIT END
stop_pulling()
if(ispickedupmob(loc))
var/obj/item/mob_holder/mob_head = loc
@@ -88,9 +93,10 @@
client.set_eye(card)
if (isturf(loc))
new /obj/effect/temp_visual/guardian/phase/out(loc)
// BUBBER EDIT ADDITION START: PAI Freedom
var/turf/target = drop_location()
card.forceMove(target)
// BUBBER EDIT ADDITION START: PAI ReLeashed
if(!holo_leash)
var/turf/target = drop_location()
card.forceMove(target)
// BUBBER EDIT END
forceMove(card)
add_traits(list(TRAIT_IMMOBILIZED, TRAIT_HANDS_BLOCKED), PAI_FOLDED)
@@ -126,26 +132,33 @@
REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, PAI_FOLDED)
REMOVE_TRAIT(src, TRAIT_HANDS_BLOCKED, PAI_FOLDED)
REMOVE_TRAIT(src, TRAIT_UNDENSE, PAI_FOLDED)
// BUBBER EDIT START: PAI Freedom: ORIGINAL: forceMove(get_turf(card))
if(istype(card.loc, /obj/item/modular_computer))
var/obj/item/modular_computer/pc = card.loc
pc.inserted_pai = null
pc.visible_message(span_notice("[src] ejects itself from [pc]!"))
if(isliving(card.loc))
var/mob/living/living_holder = card.loc
if(!living_holder.temporarilyRemoveItemFromInventory(card))
balloon_alert(src, "unable to expand")
return FALSE
forceMove(get_turf(card))
card.forceMove(src)
// BUBBER EDIT START: PAI ReLeashed: ORIGINAL: forceMove(get_turf(card))
if(!holo_leash)
if(istype(card.loc, /obj/item/modular_computer))
var/obj/item/modular_computer/pc = card.loc
pc.inserted_pai = null
pc.visible_message(span_notice("[src] ejects itself from [pc]!"))
if(isliving(card.loc))
var/mob/living/living_holder = card.loc
if(!living_holder.temporarilyRemoveItemFromInventory(card))
balloon_alert(src, "unable to expand")
return FALSE
forceMove(get_turf(card))
card.forceMove(src)
else
forceMove(get_turf(card))
// BUBBER EDIT END
if(client)
client.perspective = EYE_PERSPECTIVE
client.set_eye(src)
set_light_on(FALSE)
update_appearance(UPDATE_ICON_STATE)
visible_message(span_boldnotice("[src] folds out its holochassis emitter and forms a holoshell around itself!")) // BUBBER EDIT: PAI Freedom: ORIGINAL: visible_message(span_boldnotice("[src] appears in a flash of light!"))
// BUBBER EDIT START: PAI ReLeashed
if(!holo_leash)
visible_message(span_boldnotice("[src] folds out its holochassis emitter and forms a holoshell around itself!")) // BUBBER EDIT: PAI Freedom: ORIGINAL: visible_message(span_boldnotice("[src] appears in a flash of light!"))
else
visible_message(span_boldnotice("[src] appears in a flash of light!"))
// BUBBER EDIT END: PAI ReLeashed
holoform = TRUE
return TRUE
+26
View File
@@ -0,0 +1,26 @@
/atom/movable/screen/pai/leash
name = "Toggle Leash"
icon = 'modular_zubbers/icons/hud/screen_pai.dmi'
icon_state = "pai_leash"
/atom/movable/screen/pai/leash/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
if(!pAI.holoform)
if(pAI.holo_leash)
pAI.balloon_alert(usr, "emitters set to Move")
pAI.holo_leash = FALSE
else
pAI.balloon_alert(usr, "emitters set to Project")
pAI.holo_leash = TRUE
else
pAI.balloon_alert(usr, "your emitters are active!")
/datum/hud/pai/New(mob/living/silicon/pai/owner)
..()
var/atom/movable/screen/using
// Hololeash
using = new /atom/movable/screen/pai/leash(null, src)
using.screen_loc = "SOUTH:6,WEST+14"
static_inventory += using
+10
View File
@@ -0,0 +1,10 @@
// pAI
/mob/living/silicon/pai
/// Whetever this pAI has leashing enabled
var/holo_leash = FALSE
/mob/living/silicon/pai/get_status_tab_items()
. = ..()
if(!holo_leash)
. += "Emitter set to: Move"
else
. += "Emitter set to: Project"
Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

+2
View File
@@ -9535,6 +9535,8 @@
#include "modular_zubbers\code\modules\opposing_force\code\items.dm"
#include "modular_zubbers\code\modules\opposing_force\code\equipment\antagonist_powers.dm"
#include "modular_zubbers\code\modules\pai\ghost_pai.dm"
#include "modular_zubbers\code\modules\pai\hud.dm"
#include "modular_zubbers\code\modules\pai\pai.dm"
#include "modular_zubbers\code\modules\paperwork\fax.dm"
#include "modular_zubbers\code\modules\paperwork\folders_premade.dm"
#include "modular_zubbers\code\modules\paperwork\paper_premade.dm"