Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Чиним надписи на теле (6 часов) #1450

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/modules/surgery/bodyparts/parts.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/item/bodypart/chest
name = BODY_ZONE_CHEST
ru_name = "грудь"
ru_name_v = "груди"
ru_name_y = "грудь"
ru_name_capital = "Грудь"
ru_name = "туловище"
ru_name_v = "туловище"
ru_name_y = "туловище"
ru_name_capital = "Туловище"
desc = "It's impolite to stare at a person's chest."
icon_state = "default_human_chest"
max_damage = 200
Expand Down
48 changes: 26 additions & 22 deletions modular_splurt/code/modules/paperwork/pen.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/obj/item/pen/attack(mob/living/M, mob/user, stealth)
/obj/item/pen/attack(mob/living/M, mob/living/user, stealth)
if(!istype(M))
return

Expand All @@ -13,13 +13,9 @@
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)

var/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!"))
to_chat(user, span_warning("Вы должны выбрать часть тела!"))
return

var/list/items_on_target = list()
Expand All @@ -28,12 +24,10 @@
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."))
to_chat(user, span_warning("Вам мешает одежда."))
return

var/obj/item/G
if(try_to_write_on_genitals && T.exposed_genitals.len)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ты случаем не вырезал механ написания сам видишь на чём?

G = user:pick_receiving_organ(T, NONE, "Pick a genital to write on", "PRESS CANCEL to write on the targeted body part")
var/obj/item/G = user.pick_receiving_organ(T, NONE, "Выбирите где оставить надпись", "Выберите CANCEL что-бы написать на выбранной конечности")
// BLUEMOON ADD END

/* BLUEMOON REMOVAL START - сверху более умная реализация по отдельным частям тела
Expand All @@ -42,34 +36,44 @@
return
/ BLUEMOON REMOVAL END */

var/obj/item/BP = (G ? G : T.get_bodypart(user.zone_selected))

var/obj/item/bodypart/BP = G ? G : T.get_bodypart(user.zone_selected) // Выборка части тела
if(user.zone_selected == BODY_ZONE_PRECISE_GROIN) // проверка на гроин
BP = T.get_bodypart(BODY_ZONE_CHEST)
if(isnull(BP)) // Если выбраны глаза или рот
return
/* 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(target_body_part == 2) // проверка на туловище
target_body_part = CHEST



var/writting = input(user, "Оставить надпись, не заменяет уже имеющийся", "Надпись на [T]") as text|null
if(!writting)
return

if(!(user==T))
src.visible_message("<span class='notice'>[user] begins to write on [T]'s [BP:name].</span>")
if(user != T)
src.visible_message("<span class='notice'>[user] начинает выводить надпись на [T]'s [BP.name].</span>")
else
to_chat(user, "<span class='notice'>You begin to write on your [BP:name].</span>")
to_chat(user, "<span class='notice'>Вы начали выводить надпись на [BP.name].</span>")

if(do_mob(user, T, 4 SECONDS))
if((length(BP:writtentext))+(length(writting)) < 130) //130 character limit to stop spamming.
BP:writtentext += html_encode(writting) //you can add to text, not remove it.
if((length(BP.writtentext))+(length(writting)) < 130) //130 лимит символов.
BP.writtentext += html_encode(writting) //you can add to text, not remove it.
else
to_chat(user, "<span class='notice'>There isnt enough space to write that on [T]'s [BP:name].</span>")
to_chat(user, "<span class='notice'>Недостаточно места для надписи на [T]'s [BP.name].</span>")
return

if(!(user==T))
to_chat(user, "<span class='notice'>You write on [T]'s [BP:name].</span>")
to_chat(user, "<span class='notice'>Вы оставили надпись на [T]'s [BP.name].</span>")
else
to_chat(user, "<span class='notice'>You write on your [BP:name].</span>")
to_chat(user, "<span class='notice'>Вы оставили надпись на [BP.name].</span>")
else
. = ..()