Commit Graph

7 Commits

Author SHA1 Message Date
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
80d124a3c6 [MIRROR] Remove ELEMENT_DETACH on everything that doesn't need it, rename to ELEMENT_DETACH_ON_HOST_DESTROY + a PSA (about 0.2s init time savings) [MDB IGNORE] (#17384)
* Remove ELEMENT_DETACH on everything that doesn't need it, rename to ELEMENT_DETACH_ON_HOST_DESTROY + a PSA (about 0.2s init time savings) (#70972)

ELEMENT_DETACH is **not** a requirement to having `Detach` called.
Detach is always called when the element itself is destroyed.

ELEMENT_DETACH is a flag that when set, makes sure Detach is called when
the atom destroys.

Sometimes you want this, for instance:

```dm
/datum/element/point_of_interest/Detach(datum/target)
	SSpoints_of_interest.on_poi_element_removed(target)
	return ..()
```

This Detach cleans up a reference that would have hung if target was
destroyed without this being called.

However, most uses of Detach are cleaning up signals. Signals are
automatically cleaned up when something is destroyed. You do not need
ELEMENT_DETACH in this case, and it slows down init. This also includes
somewhat more complex stuff, like removing overlays on the source
object. It's getting deleted anyway, you don't care!

I have removed all uses of ELEMENT_DETACH that seemed superfluous. I
have also renamed it to `ELEMENT_DETACH_ON_HOST_DESTROY` to make its
purpose more clear, as me and a lot of other maintainers misunderstood
what it did,

---

An update to this, ELEMENT_DETACH *is* needed for anything that can
register to a turf, as turfs do not clear their signals on destroy.

* Remove ELEMENT_DETACH on everything that doesn't need it, rename to ELEMENT_DETACH_ON_HOST_DESTROY + a PSA (about 0.2s init time savings)

* skyrat elements

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-05 17:48:01 -04:00
SkyratBot
0ded800d74 [MIRROR] Fixes "Burning rust off walls doesn't blind you" [MDB IGNORE] (#15435)
* Fixes "Burning rust off walls doesn't blind you" (#68986)

* Fixes rust element not correctly using tool procs, now welding rust off will properly blind the user.

Co-authored-by: Capybara <Capybara@ CapybaraMailingServices.com>

* Fixes "Burning rust off walls doesn't blind you"

Co-authored-by: CapybaraExtravagante <110635252+CapybaraExtravagante@users.noreply.github.com>
Co-authored-by: Capybara <Capybara@ CapybaraMailingServices.com>
2022-08-06 09:51:17 -07:00
SkyratBot
1e2b0a4ae0 [MIRROR] makes rust visible again [MDB IGNORE] (#10510)
* makes rust visible (#63789)

* makes rust visible again

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-01-07 11:58:55 +00:00
SkyratBot
d79a997673 [MIRROR] Traits given by Elements now have element trait as their source. [MDB IGNORE] (#9110)
* Traits given by Elements now have element trait as their source. (#62134)

Hopefully the code is more organized and consistent this way.

* Traits given by Elements now have element trait as their source.

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2021-10-28 18:23:44 -04:00
SkyratBot
1ff9549d6a Fixes rust cleaning deleting whole element. (#60947) (#7687)
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2021-08-21 22:15:05 +01:00
SkyratBot
e5dc751f74 [MIRROR] Turns rust component into bespoke element (#7278)
* Turns rust component into bespoke element

* a

* Update misc_walls.dm

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-03 20:56:40 +01:00