-
Notifications
You must be signed in to change notification settings - Fork 441
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
add: shuttle now gibs objects and mobs #4840
Conversation
for(var/obj/things in T1) | ||
if(is_type_in_list(things, GLOB.ungibbable_items_types) || istype(things, /obj/docking_port) || istype(things, /obj/effect)) | ||
continue | ||
else | ||
things.visible_message(span_warning("\The [things] gets crushed to dust!")) | ||
qdel(things) | ||
|
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.
/obj/docking_port/mobile/proc/roadkill(list/mobile_turfs, list/stationary_turfs, mobile_dir)
var/list/viewers_by_turf = list()
var/list/things_by_turf = list()
for(var/i in 1 to length(mobile_turfs))
var/turf/mobile_turf = mobile_turfs[i]
var/turf/stationary_turf = stationary_turfs[i]
if(!mobile_turf || !stationary_turf)
continue
for(var/atom/movable/movable in stationary_turf.contents)
movable.pulledby?.stop_pulling()
if(isliving(movable))
var/mob/living/victim = movable
victim.buckled?.unbuckle_mob(victim, force = TRUE)
to_chat(victim, span_userdanger("You feel an immense crushing pressure as the space around you ripples."))
if(!length(viewers_by_turf[stationary_turf]))
viewers_by_turf[stationary_turf] = get_mobs_in_view(7, stationary_turf) - victim
else
viewers_by_turf[stationary_turf] -= victim
if(!things_by_turf[stationary_turf])
things_by_turf[stationary_turf] = list()
things_by_turf[stationary_turf] += "[victim.name]"
victim.drop_ungibbable_items(stationary_turf)
victim.gib()
continue
if(!QDELETED(movable) && !is_type_in_list(movable, GLOB.ungibbable_items_types) && !istype(movable, /obj/docking_port) && !iseffect(movable))
if(!length(viewers_by_turf[stationary_turf]))
viewers_by_turf[stationary_turf] = get_mobs_in_view(7, stationary_turf)
if(!things_by_turf[stationary_turf])
things_by_turf[stationary_turf] = list()
things_by_turf[stationary_turf] += "[movable.name]"
qdel(movable)
continue
// Move unanchored atoms
if(!movable.anchored)
step(movable, mobile_dir)
else if(!QDELETED(movable) && movable.simulated) // Don't qdel lighting overlays, they are static
qdel(movable)
CHECK_TICK
for(var/turf/turf as anything in viewers_by_turf)
if(!viewers_by_turf[turf] || !things_by_turf[turf])
continue
var/destroyed = capitalize(english_list(things_by_turf[turf]))
// we cant use `as anything` since dumb radios is in the list
for(var/mob/viewer in viewers_by_turf[turf])
viewer.show_message(span_warning("[destroyed] gets crushed by a hyperspace ripple!"), EMOTE_VISIBLE)
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.
это сильно оптимизирует работу с вызовами view() и спамом красными сообщениями в чат игры.
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.
это сильно оптимизирует работу с вызовами view() и спамом красными сообщениями в чат игры.
в таком виде возникает та же проблема что и раньше была - шкаф или мех полностью спасают от гиба шатлом, порядок проверки случаем роли не играет?
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.
не против если я перехвачу PR?
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.
а нам нужно гарантированно убивать мобов внутри любого содержимого?
если этого не будет происходить, то будет довольно странно, что сидя в шкафу можно пережить приземление на тебя шаттла
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.
Описание
Теперь шаттлы гибают всех гуманоидов в зоне своего прилёта, также закрывает дыру, из-за которой сидя в шкафу или мехе можно было выжить под прилетающим шаттлом (мех ломался, человек выпадал живым и здоровым)
Ссылка на предложение/Причина создания ПР
https://discord.com/channels/617003227182792704/755125334097133628/1187384861493829733 и здравый смысл
Демонстрация изменений
2024-04-09.18-51-13.mp4