Skip to content

Commit

Permalink
Merge pull request #1927 from Lexanx/head-pats
Browse files Browse the repository at this point in the history
Head Pats
  • Loading branch information
YegorKandziuba authored Mar 7, 2024
2 parents b85d6f1 + 23b4c7a commit fd37bce
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
6 changes: 3 additions & 3 deletions code/modules/species/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ The slots that you can use are found in items_clothing.dm and are the inventory
else if(!LAZYLEN(available_cultural_info[token]))
var/list/map_systems = GLOB.using_map.available_cultural_info[token]
available_cultural_info[token] = map_systems.Copy()

// [SIERRA-ADD] - EXPANDED_CULTURE_DESCRIPTOR - Вносит культуры из мода в список культур после всех возможных альтераций, чтобы предотвратить конфликты при добавлении оффами новых культур
if(extended_cultural_info[token])
available_cultural_info[token] |= extended_cultural_info[token]
Expand Down Expand Up @@ -431,7 +431,7 @@ The slots that you can use are found in items_clothing.dm and are the inventory
post_organ_rejuvenate(O, H)

H.sync_organ_dna()

/* ------------------------> code\modules\emotes\definitions\_species.dm
/datum/species/proc/hug(mob/living/carbon/human/H,mob/living/target)
var/t_him = "them"
Expand All @@ -447,7 +447,7 @@ The slots that you can use are found in items_clothing.dm and are the inventory
if(H != target)
H.update_personal_goal(/datum/goal/achievement/givehug, TRUE)
target.update_personal_goal(/datum/goal/achievement/gethug, TRUE)

*/
/datum/species/proc/add_base_auras(mob/living/carbon/human/H)
if(base_auras)
for(var/type in base_auras)
Expand Down
5 changes: 3 additions & 2 deletions mods/emote_panel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- https://github.com/SierraBay/SierraBay12/pull/1087
- https://github.com/SierraBay/SierraBay12/pull/1815
- https://github.com/SierraBay/SierraBay12/pull/1927
<!--
Ссылки на PRы, связанные с модом:
- Создание
Expand All @@ -28,7 +29,7 @@ ID мода: EMOTE_PANEL

### Изменения *кор кода*

- Отсутствуют
- `code\modules\species\species.dm` : `/datum/species/proc/hug(mob/living/carbon/human/H,mob/living/target)`
<!--
Если вы редактировали какие-либо процедуры или переменные в кор коде,
они должны быть указаны здесь.
Expand Down Expand Up @@ -70,7 +71,7 @@ ID мода: EMOTE_PANEL

### Авторы:

SuhEugene, LordNest
SuhEugene, LordNest, Lexanx
<!--
Здесь находится твой никнейм
Если работал совместно - никнеймы тех, кто помогал.
Expand Down
1 change: 1 addition & 0 deletions mods/emote_panel/_emote_panel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "code/overrides.dm"
// #include "code/pain.dm" // SIERRA TODO: Use it
#include "code/silicon.dm"
#include "code\species.dm"
#include "code/unathi.dm"

#endif
28 changes: 28 additions & 0 deletions mods/emote_panel/code/species.dm
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)

0 comments on commit fd37bce

Please sign in to comment.