Files
Yogstation/code/modules/mob/emote.dm
oranges c8ad5a6314 Clean up a bunch of undefined arg runtimes (#34105)
* Clean up a bunch of undefined arg runtimes

Ensure subtypes have the appropriate arguments, do a bit of code cleanup
and remove some uneeded emote procs that also caused runtimes

* Fix up all calls to canUseTopic, add the dexterity flag

* Runtime with missing force argument in borg unbuckle mob
2018-01-07 21:52:56 -05:00

49 lines
1.3 KiB
Plaintext

//The code execution of the emote datum is located at code/datums/emotes.dm
/mob/proc/emote(act, m_type = null, message = null)
act = lowertext(act)
var/param = message
var/custom_param = findchar(act, " ")
if(custom_param)
param = copytext(act, custom_param + 1, length(act) + 1)
act = copytext(act, 1, custom_param)
var/datum/emote/E
E = E.emote_list[act]
if(!E)
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
return
E.run_emote(src, param, m_type)
/datum/emote/flip
key = "flip"
key_third_person = "flips"
restraint_check = TRUE
mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer)
mob_type_ignore_stat_typecache = list(/mob/dead/observer)
/datum/emote/flip/run_emote(mob/user, params)
. = ..()
if(.)
user.SpinAnimation(7,1)
/datum/emote/spin
key = "spin"
key_third_person = "spins"
restraint_check = TRUE
mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer)
mob_type_ignore_stat_typecache = list(/mob/dead/observer)
/datum/emote/spin/run_emote(mob/user)
. = ..()
if(.)
user.spin(20, 1)
if(iscyborg(user) && user.has_buckled_mobs())
var/mob/living/silicon/robot/R = user
GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R)
if(riding_datum)
for(var/mob/M in R.buckled_mobs)
riding_datum.force_dismount(M)
else
R.unbuckle_all_mobs()