-
Notifications
You must be signed in to change notification settings - Fork 217
Tweak: Add clown taperecorder with laugh #13103
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
base: dev
Are you sure you want to change the base?
Conversation
|
||
/obj/item/device/clowntaperecorder/attack_self(mob/user as mob) | ||
if(spam_flag) | ||
to_chat(user, "<span class='warning'>The tape recorder needs a moment to rewind.</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.
Спаны
var/spam_flag = 0 | ||
var/active = FALSE | ||
|
||
/obj/item/device/clowntaperecorder/attack_self(mob/user as mob) |
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.
as вроде тоже выпиливаем
|
||
update_icon() | ||
|
||
spawn(30) |
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.
Вместо spawn
у нас принято использовать add_think_ctx
.
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(spam_flag) | ||
to_chat(user, "<span class='warning'>The tape recorder needs a moment to rewind.</span>") | ||
return | ||
spam_flag = 1 |
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.
Проанализировав код пришел к выводу, что spam_flag
- обычная булева переменная, замени 1
и 0
, на TRUE
и FALSE
.
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.
Макс, погоди, я-то переделаю, а почему код выше моего, в недавно добавленной Типсом штуке, тоже 1 и 0 использует, и об этом ничего не говорили? Как и спавн(50) там же имеется, блин блять.
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.
Макс, погоди, я-то переделаю, а почему код выше моего, в недавно добавленной Типсом штуке, тоже 1 и 0 использует, и об этом ничего не говорили? Как и спавн(50) там же имеется, блин блять.
Отвечу немного за Макса, надеюсь не обидится
По поводу 1 и 0, переменная древняя как говно мамонта, а у типса в пуле просто не доглядели что он тоже юзает 1 и 0, так что это не лично к тебе претензия, а просто просьба привести файлик к код стайлу
По поводу спавна, аналогично
Если я не прав Макс поправит 😄
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/device/clowntaperecorder/attack_self(mob/user as mob) | ||
if(spam_flag) | ||
to_chat(user, "<span class='warning'>The tape recorder needs a moment to rewind.</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
.
if(M.stat || M.incapacitated()) | ||
return | ||
|
||
if(honk_sound == 'sound/items/sitcom_laugh.ogg') |
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.
Это какой-то стыд, во-первых. Во-вторых, переделай так, чтобы код ниже использовал макрос GET_SFX
.
|
||
var/mob/M = usr | ||
|
||
if(M.stat || M.incapacitated()) |
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.
Ого нихуя у нас и такое оказывается есть, когда я спросил у разработочки пару месяцев назад - ответа не получил.
spawn(30) | ||
if(active) | ||
active = FALSE | ||
icon_state = "stereo" |
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.
Обновляй иконку явно в проке on_update_icon
в зависимости от состояния объекта.
Плюс выше Типс оставил комменты, там тоже чистая правда и надо править. |
Добавлен небольшой айтем клоуну, в виде старого, компактного магнитофона. При нажатии воспроизводит звук смеха из ситкомов. Имеет альтернативный режим, с воспроизведением звука "Да-бум-тсс". Добавляю исключительно ради повышения комичности данной профы. Хотели когда-нибудь запустить звук смеха, когда кто-то напротив рассказывает Вам трагичную историю - пожалуйста.
Чейнджлог