Files
Bubberstation/code/modules/holodeck
SkyratBot 81cafafbf6 [MIRROR] Improves duplication [MDB IGNORE] (#18704)
* Improves duplication (#72572)

## About The Pull Request

- Improves duplication code significantly
- Removes 'perfectcopy', 'newloc', 'nerf' and 'holoitem' args. These
were made for holodeck items, but holodeck items do not use this proc so
it's since been unused.
- Adds many things to duplicate forbidden vars, such as external organs
(and fixes internal organs), overlays, and signals. The signal part is
what broke basic things for duplicated mobs, such as dying, huds, and
lying down.
- Duplicated mobs now properly carry over the identity of the old mob
without losing anything in the process, and now actually work as a mob,
with visible HUDs and everything. They also carry implants over now.
- Duplicated mobs also now no longer cut all their contents and rebuild
the entire mob, they don't carry overlays at all (so we don't have the
problems that come along with it, like clothing sprites from clothes
that don't exist).
- As a minor detail, makes DuplicateObject use snake_case instead, and
makes duplicate_forbidden_vars protected.

- Removes copy_contents_to because it's unused. It was originally meant
for Holodeck, but holodecks now use map templates so it's no longer used
in-game.

![image](https://user-images.githubusercontent.com/53777086/211224777-6b417c6c-17d3-486b-85a4-41de30c6cfd2.png)

![image](https://user-images.githubusercontent.com/53777086/211223163-0cbb4581-c194-4251-9c7b-58d8c4bbaeb2.png)

## Why It's Good For The Game

Closes https://github.com/tgstation/tgstation/issues/42212

Duplicating mobs no longer gives a broken mob, which was a common
problem with cloning pods (the admin pods, that you drop down onto
people).
Updates very old code to modern code standards.
This PR was made to help out
https://github.com/tgstation/tgstation/pull/71141 too, the author of
that PR is aware of this one.

## Changelog

🆑
refactor: Duplicating mobs now should now give properly functioning
mobs, as duplications in general have been reworked. Admins can feel
free to use the pod feature on people.
/🆑

* Improves duplication

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-01-13 21:44:44 -08:00
..