Skip to content

Commit

Permalink
Множество исправлений возможности писать на частях тела (BlueMoon-Lab…
Browse files Browse the repository at this point in the history
…s#514)

* Исправляем корявое написание ручкой на теле.

* Исправляем корявое отображение надписей на теле.

* Документация

* Убирание надписей с частей тела с помощью мыла + мелочи

* Омывание гениталий.

* A fix
  • Loading branch information
Kush1Push1 authored Oct 27, 2023
1 parent 562b901 commit 411c226
Show file tree
Hide file tree
Showing 12 changed files with 185 additions and 8 deletions.
17 changes: 17 additions & 0 deletions code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,23 @@
if(BODY_ZONE_R_LEG)
return list(LEG_RIGHT, FOOT_RIGHT)

// BLUEMOON ADD START - Применяется, когда нужна специфичная часть тела
/proc/zone2body_parts_covered_complicated(def_zone)
switch(def_zone)
if(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)
return HEAD
if(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)
return CHEST
if(BODY_ZONE_L_ARM)
return ARM_LEFT
if(BODY_ZONE_R_ARM)
return ARM_RIGHT
if(BODY_ZONE_L_LEG)
return LEG_LEFT
if(BODY_ZONE_R_LEG)
return LEG_RIGHT
// BLUEMOON ADD END

//Turns a Body_parts_covered bitfield into a list of organ/limb names.
//(I challenge you to find a use for this) -I found a use for it!!
/proc/body_parts_covered2organ_names(bpc)
Expand Down
73 changes: 73 additions & 0 deletions code/game/objects/items/clown_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
. = ..()
AddComponent(/datum/component/slippery, 80)

// BLUEMOON ADD START - дополнительное описание
/obj/item/soap/examine(user, distance)
. = ..()
. += span_info("Мылом можно в том числе убирать надписи с частей тела, оставленные ручкой.") // рассказываем о механиках через описания
// BLUEMOON ADD END

/obj/item/soap/nanotrasen
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
icon_state = "soapnt"
Expand All @@ -56,6 +62,71 @@
new /obj/effect/particle_effect/foam(loc)
return (TOXLOSS)

// BLUEMOON ADD START - введено мытье отдельных частей тела, чтобы смывать с них надписи
/obj/item/soap/attack(mob/living/target, mob/living/user)
if(ishuman(target))
var/mob/living/carbon/human/H = target // BLUEMOON EDIT

var/target_limb

target_limb = zone2body_parts_covered_complicated(user.zone_selected)

if(!target_limb)
to_chat(user, span_warning("You must choose a bodypart on your doll to write on!"))
return

var/list/items_on_target = list()
items_on_target = H.get_equipped_items()

for(var/A in items_on_target)
var/obj/item/worn_clothes = A
if(worn_clothes.body_parts_covered & target_limb)
to_chat(user, span_warning("The target body part is covered with their clothes."))
return

var/try_to_clean_genitals = FALSE
switch(user.zone_selected)
if(BODY_ZONE_PRECISE_MOUTH)
H.visible_message("<span class='warning'>\the [user] begins to wash out \the [target]'s mouth with [src.name]!</span>", "<span class='danger'>[user] is starting to wash out your mouth with [src.name]! IT'S AWFUL!</span>") //washes mouth out with soap sounds better than 'the soap' here
if(do_after(user, 4 SECONDS, target = H))
H.visible_message("<span class='notice'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='danger'>[user] washes out your mouth with [src.name]! IT WAS AWFUL!</span>") //washes mouth out with soap sounds better than 'the soap' here
H.lip_style = null //removes lipstick
H.update_body()
return
if(BODY_ZONE_PRECISE_EYES)
target_limb = BODY_ZONE_HEAD
if(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_CHEST) // технически, у моба нет органа таза на момент написания
target_limb = BODY_ZONE_CHEST
try_to_clean_genitals = TRUE
else
target_limb = user.zone_selected

var/obj/item/bodypart/affected = H.get_bodypart(target_limb)

if(try_to_clean_genitals)
if(user.zone_selected == BODY_ZONE_PRECISE_GROIN) // механически, моется не таз, а грудь
H.visible_message(span_lewd("[user] begins to wash [target]'s groin with [name], as well as taking in account their genitals there."), span_lewd("[user] is starting to wash your groin with [name]... And your genitals their."))
else
H.visible_message(span_lewd("[user] begins to wash [target]'s [affected] with [name], as well as taking in account their private parts."), span_lewd("[user] is starting to wash your [affected] with [name]... And your private parts."))
else
H.visible_message(span_notice("[user] begins to wash [target]'s [affected] with [name]!"), span_notice("[user] is starting to wash your [affected] with [name]!"))

if(do_after(user, 4 SECONDS, target = H))
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
target.clean_blood()
SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
target.wash_cream()
target.wash_cum()
affected.writtentext = ""
if(try_to_clean_genitals)
for(var/obj/item/organ/genital/G in H.internal_organs)
if(G.writtentext && G.is_exposed() && G.zone == user.zone_selected)
G.writtentext = ""
H.visible_message(span_lewd("[user] washed up [target]'s [affected]!... As well as personal belongings there."), span_lewd("[user] washed up your [affected], as well as your personal belongings there."))
else
H.visible_message(span_notice("[user] washed up [target]'s [affected]!"), span_notice("[user] washed up your [affected]!"))
// BLUEMOON ADD END

/obj/item/soap/afterattack(atom/target, mob/user, proximity)
. = ..()
if(!proximity || !check_allowed_items(target))
Expand All @@ -69,12 +140,14 @@
if(do_after(user, src.cleanspeed, target = target))
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
qdel(target)
/* BLUEMOON REMOVAL START - технически, этот кусок не работает, т.к. прок не работает на хуманов
else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
var/mob/living/carbon/human/H = user
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
H.lip_style = null //removes lipstick
H.update_body()
return
/ BLUEMOON REMOVAL END */
else if(istype(target, /obj/structure/window))
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
if(do_after(user, src.cleanspeed, target = target))
Expand Down
3 changes: 3 additions & 0 deletions code/modules/arousal/organs/breasts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

/obj/item/organ/genital/breasts
name = "Грудь"
ru_name = "грудь" // BLUEMOON ADD
ru_name_v = "груди" // BLUEMOON ADD
ru_name_capital = "Грудь" // BLUEMOON ADD
desc = "Female milk producing organs."
icon_state = "breasts"
icon = 'icons/obj/genitals/breasts.dmi'
Expand Down
3 changes: 3 additions & 0 deletions code/modules/arousal/organs/butt.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/obj/item/organ/genital/butt
name = "Попа"
ru_name = "попа" // BLUEMOON ADD
ru_name_v = "попе" // BLUEMOON ADD
ru_name_capital = "Попа" // BLUEMOON ADD
desc = "You see a pair of asscheeks."
icon_state = "butt"
icon = 'icons/obj/genitals/butt.dmi'
Expand Down
5 changes: 4 additions & 1 deletion code/modules/arousal/organs/penis.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/obj/item/organ/genital/penis
name = "Член"
name = "член"
ru_name = "член" // BLUEMOON ADD
ru_name_v = "члене" // BLUEMOON ADD
ru_name_capital = "Член" // BLUEMOON ADD
desc = "A male reproductive organ."
icon_state = "penis"
icon = 'icons/obj/genitals/penis.dmi'
Expand Down
3 changes: 3 additions & 0 deletions code/modules/arousal/organs/testicles.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/obj/item/organ/genital/testicles
name = "яйца"
ru_name = "яйца" // BLUEMOON ADD
ru_name_v = "яйцах" // BLUEMOON ADD
ru_name_capital = "Яйца" // BLUEMOON ADD
desc = "A male reproductive organ."
icon_state = "testicles"
icon = 'icons/obj/genitals/testicles.dmi'
Expand Down
3 changes: 3 additions & 0 deletions code/modules/arousal/organs/vagina.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/obj/item/organ/genital/vagina
name = "вагина"
ru_name = "вагина" // BLUEMOON ADD
ru_name_v = "вагине" // BLUEMOON ADD
ru_name_capital = "Вагина" // BLUEMOON ADD
desc = "A female reproductive organ."
icon = 'icons/obj/genitals/vagina.dmi'
icon_state = ORGAN_SLOT_VAGINA
Expand Down
46 changes: 40 additions & 6 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,40 @@

var/list/missing = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/list/disabled = list()
var/list/writing = list()
// var/list/writing = list() - BLUEMOON REMOVAL (не используется, заменено на show_written_on_bodypart_text)

// BLUEMOON ADD START - отображение написанного на части тела только в случае, если она видима
var/show_written_on_bodypart_text = ""

var/list/items_on_target = list()
items_on_target = get_equipped_items()
// BLUEMOON ADD END

for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(BP.disabled)
disabled += BP
if(BP.writtentext)
writing += BP

if(BP.writtentext != "") // BLUEMOON EDIT - добавлено != ""
// writing += BP - BLUEMOON REMOVAL START - (не используется, заменено на show_written_on_bodypart_text)

// BLUEMOON ADD START - отображение написанного на части тела только в случае, если она видима
var/covered_area
covered_area = zone2body_parts_covered_complicated(BP.body_zone)

if(!covered_area) // если в будущем введутся новые органы, чтобы этот момент не забыли
to_chat(user, span_danger("DEV: При осмотре обнаружен неизвестный орган, сообщите разработчикам!"))
covered_area = CHEST

var/show_text = TRUE
for(var/obj/item/worn_clothes in items_on_target)
if(worn_clothes.body_parts_covered & covered_area)
show_text = FALSE
break

if(show_text)
show_written_on_bodypart_text += span_warning("На [t_ego] [BP.ru_name_v] написано: \"[html_encode(BP.writtentext)]\".\n")
// BLUEMOON ADD END
missing -= BP.body_zone
for(var/obj/item/I in BP.embedded_objects)
if(I.isEmbedHarmless())
Expand Down Expand Up @@ -408,13 +435,20 @@
else
msg += "[t_on] имеет дикие, космические глаза, которые в свою очередь имеют странный, абсолютно ненормальный вид.\n"

/* BLUEMON REMOVAL START - заменено show_written_on_bodypart_text
for(var/X in writing)
if(!w_uniform)
var/obj/item/bodypart/BP = X
msg += "<span class='warning'>На [t_ego] [BP.name] написано: \"[html_encode(BP.writtentext)]\".</span>\n"
for(var/obj/item/organ/genital/G in internal_organs)
if(length(G.writtentext) && istype(G) && G.is_exposed())
msg += "<span class='warning'>На [t_ego] [G.name] написано: \"[html_encode(G.writtentext)]\".</span>\n"
/ BLUEMOON REMOVAL END */
// BLUEMOON ADD START - отображение надписей на теле, если они видимы и есть
if(show_written_on_bodypart_text != "")
msg += show_written_on_bodypart_text
if(user.client?.prefs.cit_toggles & GENITAL_EXAMINE)
// BLUEMOON ADD END
for(var/obj/item/organ/genital/G in internal_organs)
if(length(G.writtentext) && istype(G) && G.is_exposed())
msg += "<span class='warning'>На [t_ego] [G.ru_name_v] написано: \"[html_encode(G.writtentext)]\".</span>\n"

if(!user)
return
Expand Down
6 changes: 6 additions & 0 deletions code/modules/paperwork/pen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
use_bold = FALSE,
)

// BLUEMOON ADD START - дополнительное описание
/obj/item/pen/examine(user, distance)
. = ..()
. += span_info("Ручкой можно оставлять надписи на частях тела.") // рассказываем о механиках через описания
// BLUEMOON ADD END

/obj/item/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over себя with [src]! It looks like [user.ru_who()] trying to commit sudoku...</span>")
return(BRUTELOSS)
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/organs/organ_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
var/useable = TRUE
var/list/food_reagents = list(/datum/reagent/consumable/nutriment = 5)
var/ru_name = ""
var/ru_name_v = ""
var/ru_name_capital = ""

/obj/item/organ/Initialize(mapload)
Expand Down
2 changes: 2 additions & 0 deletions modular_splurt/code/game/objects/structures/watercloset.dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/obj/machinery/shower/wash_mob(mob/living/L)
. = ..()
L.wash_cum()
/* BLUEMOON REMOVAL START - смывание текста с частей тела теперь производится с помощью мыла
if(ishuman(L))
var/mob/living/carbon/human/H = L
for(var/obj/item/bodypart/BP in H.bodyparts)
BP.writtentext = ""
for(var/obj/item/organ/genital/G in H.internal_organs)
if(istype(G) && G.is_exposed())
G.writtentext = ""
/ BLUEMOON REMOVAL END */

/obj/machinery/shower/wash_obj(obj/O)
. = ..()
Expand Down
31 changes: 30 additions & 1 deletion modular_splurt/code/modules/paperwork/pen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,45 @@
var/mob/living/carbon/human/T = M
if(!iscarbon(T)) //not carbon.
return

// BLUEMOON EDIT START - возможность писать на отдельных частях тела
var/try_to_write_on_genitals = FALSE
var/target_body_part

target_body_part = zone2body_parts_covered_complicated(user.zone_selected)

if(!target_body_part)
to_chat(user, span_warning("You must choose a bodypart on your doll to write on!"))
return

var/list/items_on_target = list()
items_on_target = T.get_equipped_items()

for(var/A in items_on_target)
var/obj/item/worn_clothes = A
if(worn_clothes.body_parts_covered & target_body_part)
to_chat(user, span_warning("The target body part is covered with their clothes."))
return

var/obj/item/G
if(try_to_write_on_genitals && T.exposed_genitals.len)
G = user:pick_receiving_organ(T, NONE, "Pick a genital to write on", "PRESS CANCEL to write on the targeted body part")
// BLUEMOON ADD END

/* BLUEMOON REMOVAL START - сверху более умная реализация по отдельным частям тела
if(!T.is_chest_exposed())
to_chat(user, "<span class='warning'>You cannot write on someone with their clothes on.</span>")
return
/ BLUEMOON REMOVAL END */

var/obj/item/G = user:pick_receiving_organ(T, NONE, "Pick a genital to write on", "Cancel to write on the targeted body part")
var/obj/item/BP = (G ? G : T.get_bodypart(user.zone_selected))

/* BLUEMOON ADD START - перемещаем код выше
var/obj/item/BP = (G ? G : T.get_bodypart(user.zone_selected))
if(!BP)
return
/ BLUEMOON ADD END */

var/writting = input(user, "Add writing, doesn't replace current text", "Writing on [T]") as text|null
if(!writting)
Expand Down

0 comments on commit 411c226

Please sign in to comment.