-
Notifications
You must be signed in to change notification settings - Fork 58
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
Adds hookas #1124
base: master
Are you sure you want to change the base?
Adds hookas #1124
Conversation
This comment was marked as spam.
This comment was marked as spam.
#define COUGH_STAMINA_LOSS 5 | ||
|
||
/obj/machinery/hookah | ||
name = "кальян" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
все названия в ru_names.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
принято
тесты все упали |
знаю, это из-за харддела. но починить смогу только после пар |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Везде, где ты в тексте использует "кальян" и "мундштук", используй атом, а именно декленти атом. Это нужно, если появятся новые виды кальянов и мундштуков, а также если админы поменяли название.
/datum/modpack/bar_hookahs/pre_initialize() | ||
. = ..() | ||
|
||
/datum/modpack/bar_hookahs/initialize() | ||
. = ..() | ||
|
||
/datum/modpack/bar_hookahs/post_initialize() | ||
. = ..() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/datum/modpack/bar_hookahs/pre_initialize() | |
. = ..() | |
/datum/modpack/bar_hookahs/initialize() | |
. = ..() | |
/datum/modpack/bar_hookahs/post_initialize() | |
. = ..() |
Лишнее
/datum/modpack/bar_hookahs | ||
/// A string name for the modpack. Used for looking up other modpacks in init. | ||
name = "bar_hookahs" | ||
/// A string desc for the modpack. Can be used for modpack verb list as description. | ||
desc = "Добавляет кальяны и угли к ним." | ||
/// A string with authors of this modpack. | ||
author = "mcbalaam" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/datum/modpack/bar_hookahs | |
/// A string name for the modpack. Used for looking up other modpacks in init. | |
name = "bar_hookahs" | |
/// A string desc for the modpack. Can be used for modpack verb list as description. | |
desc = "Добавляет кальяны и угли к ним." | |
/// A string with authors of this modpack. | |
author = "mcbalaam" | |
/datum/modpack/bar_hookahs | |
name = "Bar Hookah" | |
desc = "Добавляет кальяны и угли к ним." | |
author = "mcbalaam" |
|
||
var/static/allowed_ingridients = typecacheof(list( | ||
/obj/item/food/grown, | ||
/obj/item/food/cheese |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/obj/item/food/cheese | |
/obj/item/food/cheese, |
|
||
/obj/machinery/hookah/examine() | ||
. = ..() | ||
. += "<span class='info'>ALT+ЛКМ погасит кальян, ALT+ПКМ очистит ёмкость.</span>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. += "<span class='info'>ALT+ЛКМ погасит кальян, ALT+ПКМ очистит ёмкость.</span>" | |
. += span_info("Alt+ЛКМ погасит кальян, Alt+ПКМ очистит ёмкость.") |
var/food_string = "" | ||
var/count = 1 | ||
for(var/obj/item/food/this_food in food_items) | ||
food_string += this_food.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
food_string += this_food.name | |
food_string += this_food.declent_ru(NOMINATIVE) |
Выбери правильный падеж сам
|
||
/obj/item/hookah_coals/examine() | ||
. = ..() | ||
. += "<span class='info'>В кучке три кубика.</span>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
спан макрос
if(attachment) | ||
var/atom/attached_to = attachment.attached_to | ||
if(!(get_dist(src, attached_to) <= 1 && isturf(attached_to.loc))) | ||
if(ismob(attached_to)) | ||
var/mob/user = attached_to | ||
user.dropItemToGround(this_mouthpiece) | ||
to_chat(user, span_warning("Вы отпускаете мундштук.")) | ||
QDEL_NULL(attachment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(attachment) | |
var/atom/attached_to = attachment.attached_to | |
if(!(get_dist(src, attached_to) <= 1 && isturf(attached_to.loc))) | |
if(ismob(attached_to)) | |
var/mob/user = attached_to | |
user.dropItemToGround(this_mouthpiece) | |
to_chat(user, span_warning("Вы отпускаете мундштук.")) | |
QDEL_NULL(attachment) | |
if(!attachment) | |
return | |
var/atom/attached_to = attachment.attached_to | |
if(!(get_dist(src, attached_to) <= 1 && isturf(attached_to.loc))) | |
if(ismob(attached_to)) | |
var/mob/user = attached_to | |
user.dropItemToGround(this_mouthpiece) | |
to_chat(user, span_warning("Вы отпускаете мундштук.")) | |
QDEL_NULL(attachment) |
немного лесенку уменьшим
if(!do_after(user, 2 SECONDS, src)) | ||
return CLICK_ACTION_BLOCKING | ||
reagent_container.reagents.clear_reagents() | ||
to_chat(user, span_notice("Вы очистили внутреннее хранилище реагентов кальяна.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to_chat(user, span_notice("Вы очистили внутреннее хранилище реагентов кальяна.")) | |
to_chat(user, span_notice("Вы очищаете внутреннее хранилище реагентов кальяна.")) |
Мы все действия пишем в настоящем времени для консистенси
return ..() | ||
|
||
/obj/item/hookah_mouthpiece/proc/start_inhale(mob/living/carbon/human/user) | ||
user.visible_message(span_notice("[user] затягивается из кальяна."), span_notice("Вы затягиваетесь...")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
деклент
if(transferred) | ||
to_chat(user, span_notice("Вы вдыхаете дым из кальяна.")) | ||
user.add_mood_event("smoked", /datum/mood_event/smoked) | ||
if(world.time < (last_inhale + INHALE_COOLDOWN)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Надо использовать COOLDOWN_DECLARE для таких
Крайне важный вопрос. Шланг надеюсь слой наложения? Ибо когда берешь мундштук он должен пропадать, заменяясь эффектом протянутого шланга (как у капельницы) |
#define INHALE_COOLDOWN 5 SECONDS | ||
#define COUGH_STAMINA_LOSS 5 | ||
|
||
/obj/machinery/hookah |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кальян не должен быть машинерией
This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself |
Что этот PR делает
Добавляет кальян!
В кальян можно залить любые реагенты или еду, которые и будут... куриться. Для работы кальяна требуются специальные угли, которые могут быть заказаны в карго вместе с кальяном в виде комплекта или куплены в премиум разделе автомата с сигаретами.
Однако, будьте аккуратны с тем, что курите...
Почему это хорошо для игры
Кальянчик - это шикарно. Кальянчик в тёмном углу бара как ничто сближает людей. А возможность попыхивать за беседой - это нереально атмосферно.
Изображения изменений
Скриншоты
Тестирование
Тестирование проведено на локалке
To-do list
Аттрибуция
Спрайт кальяна - dj34 (отредактирован мной)
Спрайт кубиков - ell_good
Changelog
🆑
add: Кальяны! Учёные врут, курите сейчас!
/:cl:
Summary by Sourcery
New Features: