diff --git a/code/modules/pai/pai.dm b/code/modules/pai/pai.dm index f77d327d114..c3914a88064 100644 --- a/code/modules/pai/pai.dm +++ b/code/modules/pai/pai.dm @@ -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 diff --git a/code/modules/pai/shell.dm b/code/modules/pai/shell.dm index 43938258496..9b9882f0766 100644 --- a/code/modules/pai/shell.dm +++ b/code/modules/pai/shell.dm @@ -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 diff --git a/modular_zubbers/code/modules/pai/hud.dm b/modular_zubbers/code/modules/pai/hud.dm new file mode 100644 index 00000000000..22ff5c4fb0d --- /dev/null +++ b/modular_zubbers/code/modules/pai/hud.dm @@ -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 diff --git a/modular_zubbers/code/modules/pai/pai.dm b/modular_zubbers/code/modules/pai/pai.dm new file mode 100644 index 00000000000..00dea295c99 --- /dev/null +++ b/modular_zubbers/code/modules/pai/pai.dm @@ -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" diff --git a/modular_zubbers/icons/hud/screen_pai.dmi b/modular_zubbers/icons/hud/screen_pai.dmi new file mode 100644 index 00000000000..80aa735ec39 Binary files /dev/null and b/modular_zubbers/icons/hud/screen_pai.dmi differ diff --git a/tgstation.dme b/tgstation.dme index a3b4475657e..e1ccb6bce44 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"