-
Notifications
You must be signed in to change notification settings - Fork 215
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* Clown Items | ||
* Contains: | ||
* Bike Horns | ||
* Bike Horns and C-Taperecorder | ||
*/ | ||
|
||
/* | ||
|
@@ -73,3 +73,59 @@ | |
spawn(50) | ||
spam_flag = 0 | ||
return | ||
|
||
//Ha-ha-ha | ||
/obj/item/device/clowntaperecorder | ||
var/honk_sound = 'sound/items/sitcom_laugh.ogg' | ||
name = "clown taperecorder" | ||
desc = "A funny-looking tiny taperecorder. It smells like bananas." | ||
icon = 'icons/obj/device.dmi' | ||
icon_state = "stereo" | ||
item_state = "stereo" | ||
throwforce = 5 | ||
w_class = ITEM_SIZE_SMALL | ||
mod_weight = 0.5 | ||
mod_reach = 0.5 | ||
mod_handy = 0.5 | ||
throw_range = 15 | ||
attack_verb = list("HONKED") | ||
var/spam_flag = 0 | ||
var/active = FALSE | ||
|
||
/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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Используй макрос |
||
return | ||
spam_flag = 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
Отвечу немного за Макса, надеюсь не обидится По поводу 1 и 0, переменная древняя как говно мамонта, а у типса в пуле просто не доглядели что он тоже юзает 1 и 0, так что это не лично к тебе претензия, а просто просьба привести файлик к код стайлу По поводу спавна, аналогично Если я не прав Макс поправит 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ме. |
||
playsound(src.loc, honk_sound, 100, 0) | ||
src.add_fingerprint(user) | ||
|
||
active = !active | ||
if(active) | ||
icon_state = "stereo_playing" | ||
else | ||
icon_state = "stereo" | ||
|
||
update_icon() | ||
|
||
spawn(30) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Вместо |
||
if(active) | ||
active = FALSE | ||
icon_state = "stereo" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Обновляй иконку явно в проке |
||
desc = initial(desc) | ||
spam_flag = 0 | ||
|
||
/obj/item/device/clowntaperecorder/verb/change_sound() | ||
set name = "Change sound" | ||
set category = "IC" | ||
set src in usr | ||
|
||
var/mob/M = usr | ||
|
||
if(M.stat || M.incapacitated()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Ого нихуя у нас и такое оказывается есть, когда я спросил у разработочки пару месяцев назад - ответа не получил. |
||
return | ||
|
||
if(honk_sound == 'sound/items/sitcom_laugh.ogg') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Это какой-то стыд, во-первых. Во-вторых, переделай так, чтобы код ниже использовал макрос |
||
honk_sound = 'sound/items/ba_dum_tss.ogg' | ||
else | ||
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.
as вроде тоже выпиливаем