Skip to content
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

A bomb! Взрывы которые (вероятно) не будут смержены #11090

Closed
wants to merge 11 commits into from

Conversation

Deahaka
Copy link
Contributor

@Deahaka Deahaka commented Mar 20, 2023

Описание изменений

Только для теста на сендбоксе

Почему и что этот ПР улучшит

взрывы мгновенные. Но только не с нюкой.

Авторство

TG, tgstation/tgstation#50594

Чеинжлог

🆑

  • add: Маленькие взрывы стали мгновенными
  • add: Большие взрывы стали залагивать сервер.

@TauKitty
Copy link
Contributor

TauKitty commented Mar 20, 2023

Changelog status: ✔️

@Deahaka Deahaka added the DO NOT MERGE DNM label Mar 20, 2023
всё таки не лишний видимо
code/__DEFINES/math.dm Outdated Show resolved Hide resolved
@Deahaka Deahaka changed the title [DMM] A bomb! A bomb! Взрывы которые (вероятно) не будут смержены Mar 23, 2023
@Deahaka
Copy link
Contributor Author

Deahaka commented Mar 23, 2023

В маленьком радиусе классно и прикольно. В большом плохо и всё умирает. Рекурсивный взрыв намного оптимизированнее смотрится чем подсистемный.

@volas
Copy link
Member

volas commented Mar 27, 2023

tgstation/tgstation#50594 не очень атомарен и там много вещей и небольших оптимизаций.

По совпадению, часть с тиками я как раз взял сюда #11139

Из самого важного остаётся крайне затратный ребилд труб, про которые ты сам указал в ишью, но их можно портировать отдельно.

Я ок с тем, что бы этот PR был только про сабсистему, единая сортируемая очередь со своим приоритетом уже прогресс. Но можешь еще портировать небольшие оптимизации вроде https://github.com/tgstation/tgstation/pull/50594/files#diff-ffa07d053aa8e243f3c188ffc6632ab0a6c0cab71357cfa3619af7549c2ca515R492-R500 - где вместо рекурсивного вызова ex_act "прям щас", вещи добавляются в очередь и взрываются по расписанию контроллера.

@Deahaka
Copy link
Contributor Author

Deahaka commented Apr 4, 2023

всё что нашёл в поисковике по поводу .ex_act() перевёл на сабсистему.


return outlist

/proc/propagate_blastwave(atom/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

перенеси в контроллер и поправь пожалуйста порядок проков, дифтул с ума сходит если пытаться сверять с тг.

Еще сразу стоит перенести /explode в контроллер, где он там сейчас лежит.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ну и комментарии тоже не стоит оставлять за бортом, раз их кто-то уже написал и ты всё равно переносишь

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделал порядок проков как на ТГ, перенёс всё как там в подсистему. Комментарии разместил рядом, хотя я не вижу в них чего-то полезного.

#define EX_ACT(target, args...)\
target.ex_act(##args);

SUBSYSTEM_DEF(explosions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

на тг еще удобный /stat_entry со стоимостью взрывов и состоянием сабсистемы, была ли причина не переносить?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я просто не знаю что это такое. Добавил

@volas volas mentioned this pull request Apr 9, 2023
@volas
Copy link
Member

volas commented Apr 9, 2023

Спасибо за старт задачи, закрою в пользу #11256

@volas volas closed this Apr 9, 2023
@Deahaka Deahaka deleted the bombing branch April 9, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants