Skip to content

Adds support for machinery to be bigger than 1x1 #26531

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

Merged
merged 22 commits into from
Sep 10, 2024

Conversation

DGamerL
Copy link
Member

@DGamerL DGamerL commented Aug 18, 2024

What Does This PR Do

Adds support for machinery to be bigger than a 1x1
Also removes an unneeded variable on /obj/structure/filler

How does this system work

Add the component to the machinery on Initialize(), and add a list like the one below as the second argument. This list is a representation for a coordinate map around the machinery, and can be any size (3x3, 5x5, 7x7) as long as it has an uneven length and is square.

	list(
			list(0, 0, 0,   0, 0),
			list(0, 0, 0,   0, 0),
			list(0, 0, MACH_CENTER, 0, 0),
			list(0, 0, 0,   0, 0),
			list(0, 0, 0,   0, 0)
		)

If you want to make specific turfs dense, you just have to change the int to 1, which will make a filler turf there.
All these filler turfs are automatically cleared upon Destroy and don't need any special overrides to be cleared out.

Why It's Good For The Game

This allows us to make bigger machinery in various special shapes with a lot of freedom

Testing

No rubber duckies for testing sadly, you're gonna have to trust that I touched these machines
image

I also tested the gravity generator, just didn't take a picture


Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

Changelog

Big thanks to beaglegaming for Component'izing it when I didn't have motivation to do so!
NPFC

@ParadiseSS13-Bot ParadiseSS13-Bot added the -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally label Aug 18, 2024
@MLGTASTICa
Copy link
Contributor

* Moving it to `/obj/machinery`, which _technically_ is fine but it'd give every piece of machinery a nested list with 25 integers, which can clutter VV a decent amount

Why not just initialize the list only when needed? as in all the big machines just having a set filler proc() in their initialize, this way you avoid both unnecesarry subtypes and provide the functionality for all machinery, powered or not , at no RAM cost other than a variable declaration.

@DGamerL
Copy link
Member Author

DGamerL commented Aug 18, 2024

* Moving it to `/obj/machinery`, which _technically_ is fine but it'd give every piece of machinery a nested list with 25 integers, which can clutter VV a decent amount

Why not just initialize the list only when needed? as in all the big machines just having a set filler proc() in their initialize, this way you avoid both unnecesarry subtypes and provide the functionality for all machinery, powered or not , at no RAM cost other than a variable declaration.

Very good point, I'm gonna do this

@DGamerL DGamerL changed the title Adds big machinery Adds support for machinery to be bigger than 1x1 Aug 18, 2024
@DGamerL
Copy link
Member Author

DGamerL commented Aug 18, 2024

@MLGTASTICa it is done

@DGamerL DGamerL requested a review from Contrabang August 18, 2024 23:21
@S34NW S34NW added the Code Improvement This PR will improve the code quality of the codebase label Aug 19, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting review This PR is awaiting review from the review team and removed -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally labels Aug 19, 2024
@DGamerL DGamerL marked this pull request as draft August 19, 2024 12:12
@DGamerL DGamerL marked this pull request as ready for review August 22, 2024 10:26
Copy link
Contributor

@lewcc lewcc left a comment

Choose a reason for hiding this comment

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

This will be pretty nice to have, excited to see it.

Got some comments on loading the map in, just to make sure it's as safe as can be. Working with nested lists in byond feels like it's worth double-checking.

@DGamerL DGamerL requested a review from lewcc September 9, 2024 01:26
@Daylight2
Copy link
Contributor

Does this mean that you don't have to interact with the bottom left corner of grav gen anymore? Technology has come so far.

@DGamerL
Copy link
Member Author

DGamerL commented Sep 9, 2024

Does this mean that you don't have to interact with the bottom left corner of grav gen anymore? Technology has come so far.

Yup! Added the grav gen to this PR!

@ParadiseSS13-Bot ParadiseSS13-Bot added the Map Edit This PR will modify a map label Sep 9, 2024
Copy link
Contributor

@lewcc lewcc left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for adding the sanity checks. Just one little thing.

@Burzah Burzah added this pull request to the merge queue Sep 10, 2024
Merged via the queue into ParadiseSS13:master with commit 35740a2 Sep 10, 2024
11 checks passed
Legendaxe added a commit to ss220club/Paradise-SS220 that referenced this pull request Sep 10, 2024
@Legendaxe
1. Нужно обновить(?) конфиг в связи с
[изменением](ParadiseSS13#26620).
2. Были удалены
[fillers](ParadiseSS13#26531), возможно
движки шаттла станут проходимые, нужно смотреть (если оффы не чинили).
3. Если я что-то проебал с реворком РнД, то могут быть проблемы касаемо
изменений на картах (не думаю что будут).

## Changelog

:cl: ParadiseSS13
add: Добавлены химические огнеметы! Их можно получить в RnD, и они
оставляют после себя длительные пожары!
add: Также добавлены химические канистры, обычный и расширенный вариант
может принимать только сварочное топливо, а пиротехническая версия
принимает некоторые пиротехнические средства! Доп. информацию можно
узнать на странице
[ПРа](ParadiseSS13#25091).
add: Добавлен крашер, устанавливаемый на мехи, наносит более высокий
урон.
add: Добавлен контроллер сети RnD вместо контроллера сервера RnD. Это
требование для функционирования RnD-сетей.
add: Добавлена консоль резервного копирования RnD для создания резервных
копий всего RnD за один раз, а не на нескольких технических дисках.
tweak: Фабрикаторы роботехов теперь подключаются напрямую к сети RnD.
tweak: RnD теперь является централизованной сетью. Прошли те времена,
когда нужно было постоянно синхронизироваться, теперь все происходит в
реальном времени.
tweak: Предупреждающий текст о том, что вы горите в космосе, теперь
более очевиден, если вы вампир.
tweak: Spacevine (лоза) больше не уничтожает шаттл прибытия.
tweak: Исцеление "Глушителя" теперь работает только при наличии "Обета
молчания", а не при наличии работы Мима.
tweak: Переделана руина битвы клоунов и мимов. Теперь она расположена на
осажденном грузовом судне, а не на месте крушения астероида.
fix: Теперь на Лаваленде снова можно жечь костры.
/:cl:

<!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы
можете написать свой ник справа от первого :cl:, если хотите. Иначе
будет использован ваш ник на ГитХабе. -->
<!-- Вы можете использовать несколько записей с одинаковым префиксом
(Они используются только для иконки в игре) и удалить ненужные. Помните,
что чейнджлог должен быть понятен обычным игроком. -->
<!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы
можете исключить всю секцию. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team Code Improvement This PR will improve the code quality of the codebase Map Edit This PR will modify a map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants