-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Синди мыло стирает фибры и отпечатки с объекта #13711
base: master
Are you sure you want to change the base?
Changes from 4 commits
4265ca3
59f3ef5
a3838c1
f1ee209
80ae3b6
1d6188e
98270f2
c0ae3e8
efffba9
5151846
a8f3120
ea43475
c28d750
d49da34
3de8ba3
4c44a5f
3a638fc
072be17
7451840
736e622
51e9532
8fedeae
012e423
8ad704e
39d85cf
60d5093
43695fd
999d0fd
e0b1f7f
b6776dc
ca538fa
56c205f
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 |
---|---|---|
|
@@ -92,6 +92,21 @@ | |
target.clean_blood() | ||
return | ||
|
||
/obj/item/weapon/reagent_containers/food/snacks/soap/syndie/afterattack(atom/target, mob/user, proximity, params) | ||
if(!proximity || ishuman(target)) return | ||
if(user.client && (target in user.client.screen)) | ||
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>") | ||
else if(istype(target,/obj/effect/decal/cleanable)) | ||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>") | ||
qdel(target) | ||
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(target.fingerprints) | ||
target.fingerprints = null | ||
if(target.suit_fibers) | ||
target.suit_fibers = null | ||
target.clean_blood() | ||
to_chat(user, "<span class='notice'>You FULLY clean \the [target.name].</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. Сейчас тут нет задержки в действии, и два сообщения просто сразу появятся друг за другом. Если хочется добавить задержку - посмотри в коде билда примеры использования do_after() |
||
return | ||
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-else, и воспользоваться ранним возвратом, так код будет читаймее. Что-то вроде
|
||
|
||
/obj/item/weapon/reagent_containers/food/snacks/soap/attack(mob/target, mob/user, def_zone) | ||
if(user.a_intent == INTENT_HARM) | ||
..() | ||
|
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.
Проверять на клиентский screen не очень корректно - итем на нем может оказаться даже если сам предмет не в инвентаре.
Тут несколько вариантов, самое простое наверно проверять, что итем находится на тайле, а не где-то еще