Files
Paradise/code/modules/surgery/organs/mmi_holder.dm
T
Vi3triceandGitHub 7a3f2ed506 Port TG pointing to inventory thought bubble, and expand valid pointing targets (#19072)
* Well that actually works

* Update atoms_movable.dm

* Now you can point at things inside of things.
2022-09-25 17:29:51 +01:00

38 lines
1.0 KiB
Plaintext

// Used for an MMI or robotic brain being installed into a human.
/obj/item/organ/internal/brain/mmi_holder
name = "Man-Machine Interface"
parent_organ = "chest"
status = ORGAN_ROBOT
destroy_on_removal = TRUE
var/obj/item/mmi/stored_mmi
/obj/item/organ/internal/brain/mmi_holder/Destroy()
QDEL_NULL(stored_mmi)
return ..()
/obj/item/organ/internal/brain/mmi_holder/insert(mob/living/target, special = 0)
..()
// To supersede the over-writing of the MMI's name from `insert`
update_from_mmi()
target.thought_bubble_image = "thought_bubble_machine"
/obj/item/organ/internal/brain/mmi_holder/remove(mob/living/user, special = 0)
if(!special)
if(stored_mmi)
. = stored_mmi
if(owner.mind)
owner.mind.transfer_to(stored_mmi.brainmob)
stored_mmi.forceMove(get_turf(owner))
stored_mmi = null
return ..()
/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi()
if(!stored_mmi)
return
name = initial(stored_mmi.name)
desc = stored_mmi.desc
icon = stored_mmi.icon
icon_state = stored_mmi.icon_state
set_dna(stored_mmi.brainmob.dna)