Merge pull request #12720 from timothyteakettle/eye-contact

port examines and eye contact
This commit is contained in:
silicons
2020-07-11 00:14:47 -07:00
committed by GitHub
10 changed files with 172 additions and 13 deletions
+2
View File
@@ -124,6 +124,8 @@
transfer_martial_arts(new_character)
if(active || force_key_move)
new_character.key = key //now transfer the key to link the client to our new body
if(new_character.client)
LAZYCLEARLIST(new_character.client.recent_examines)
current.update_atom_languages()
//CIT CHANGE - makes arousal update when transfering bodies
+46
View File
@@ -314,6 +314,13 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
medical_record_text = "Patient is usually anxious in social encounters and prefers to avoid them."
var/dumb_thing = TRUE
/datum/quirk/social_anxiety/add()
RegisterSignal(quirk_holder, COMSIG_MOB_EYECONTACT, .proc/eye_contact)
RegisterSignal(quirk_holder, COMSIG_MOB_EXAMINATE, .proc/looks_at_floor)
/datum/quirk/social_anxiety/remove()
UnregisterSignal(quirk_holder, list(COMSIG_MOB_EYECONTACT, COMSIG_MOB_EXAMINATE))
/datum/quirk/social_anxiety/on_process()
var/nearby_people = 0
for(var/mob/living/carbon/human/H in oview(3, quirk_holder))
@@ -330,6 +337,45 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
dumb_thing = FALSE //only once per life
if(prob(1))
new/obj/item/reagent_containers/food/snacks/pastatomato(get_turf(H)) //now that's what I call spaghetti code
// small chance to make eye contact with inanimate objects/mindless mobs because of nerves
/datum/quirk/social_anxiety/proc/looks_at_floor(datum/source, atom/A)
var/mob/living/mind_check = A
if(prob(85) || (istype(mind_check) && mind_check.mind))
return
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, quirk_holder, "<span class='smallnotice'>You make eye contact with [A].</span>"), 3)
/datum/quirk/social_anxiety/proc/eye_contact(datum/source, mob/living/other_mob, triggering_examiner)
if(prob(75))
return
var/msg
if(triggering_examiner)
msg = "You make eye contact with [other_mob], "
else
msg = "[other_mob] makes eye contact with you, "
switch(rand(1,3))
if(1)
quirk_holder.Jitter(10)
msg += "causing you to start fidgeting!"
if(2)
quirk_holder.stuttering = max(3, quirk_holder.stuttering)
msg += "causing you to start stuttering!"
if(3)
quirk_holder.Stun(2 SECONDS)
msg += "causing you to freeze up!"
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "anxiety_eyecontact", /datum/mood_event/anxiety_eyecontact)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, quirk_holder, "<span class='userdanger'>[msg]</span>"), 3) // so the examine signal has time to fire and this will print after
return COMSIG_BLOCK_EYECONTACT
/datum/mood_event/anxiety_eyecontact
description = "<span class='warning'>Sometimes eye contact makes me so nervous...</span>\n"
mood_change = -5
timeout = 3 MINUTES
/datum/quirk/phobia
name = "Phobia"