forked from Baystation12/Baystation12
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1927 from Lexanx/head-pats
Head Pats
- Loading branch information
Showing
4 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/datum/species/proc/hug(mob/living/carbon/human/H, mob/living/target) | ||
|
||
var/t_him = "them" | ||
var/obj/item/organ/external/affecting | ||
if(ishuman(target)) | ||
var/mob/living/carbon/human/T = target | ||
affecting = T.get_organ(H.zone_sel.selecting) | ||
switch(target.gender) | ||
if(MALE) | ||
t_him = "him" | ||
if(FEMALE) | ||
t_him = "her" | ||
if(NEUTER) | ||
t_him = "it" | ||
if(H.zone_sel.selecting == "head") | ||
H.visible_message( \ | ||
"<span class='notice'>[H] pats [target] on the head.</span>", \ | ||
"<span class='notice'>You pat [target] on the head.</span>", ) | ||
else if((H.zone_sel.selecting == "r_hand" || H.zone_sel.selecting == "l_hand") && (affecting && !affecting.is_stump())) | ||
H.visible_message( \ | ||
"<span class='notice'>[H] shakes [target]'s hand.</span>", \ | ||
"<span class='notice'>You shake [target]'s hand.</span>", ) | ||
else H.visible_message("<span class='notice'>[H] hugs [target] to make [t_him] feel better!</span>", \ | ||
"<span class='notice'>You hug [target] to make [t_him] feel better!</span>") | ||
|
||
if(H != target) | ||
H.update_personal_goal(/datum/goal/achievement/givehug, TRUE) | ||
target.update_personal_goal(/datum/goal/achievement/gethug, TRUE) |