I came up with this:
L304 tongue.dm
Code: Select all
/obj/item/organ/tongue/robot/omni
name = "omnitongue"
var/datum/action/item_action/chameleon/change/tongue/chameleon_action
/obj/item/organ/tongue/robot/omni/Initialize()
. = ..()
chameleon_action = new(src)
chameleon_action.chameleon_type = /obj/item/organ/tongue
chameleon_action.chameleon_name = "Tongue"
chameleon_action.initialize_disguises()
/datum/action/item_action/chameleon/change/tongue/update_item(obj/item/picked_item)
var/obj/item/organ/tongue/picked_tongue = picked_item
var/obj/item/organ/tongue/T = target
T.name = initial(picked_tongue.name)
T.desc = initial(picked_tongue.desc)
T.icon = initial(picked_tongue.icon)
T.icon_state = initial(picked_tongue.icon_state)
T.say_mod = initial(picked_tongue.say_mod)
T.modifies_speech = initial(picked_tongue.modifies_speech)
var/mob/living/carbon/M = owner
if(T.say_mod && M.dna && M.dna.species)
M.dna.species.say_mod = T.say_mod
if(T.modifies_speech)
picked_tongue.RegisterSignal(M, COMSIG_MOB_SAY, /obj/item/organ/tongue/.proc/handle_speech)
M.UnregisterSignal(M, COMSIG_MOB_SAY)
I've been trying to get this working for ages. If someone can point me in the right direction, I'd greatly appreciate it.