Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Change how doors are converted #127

Closed

Conversation

FlameArrow57
Copy link
Contributor

@FlameArrow57 FlameArrow57 commented Apr 6, 2022

[BUG]

About the PR

This PR just changes how doors are converted.

It allows podbay doors and door type shutters to be converted to Flockdoors.
These:
image

These (only where connected to space and used as a podbay hangar door or mass driver door):
image

It also removes healing Flockdoors on conversion, which isn't needed since the health will already be full on initial conversion, and the door will be recreated on any future tile conversions.

It also fixes a bug where Flockdoors would be deleted if the tile they were on was not Flock and converted, it fixes windoors being made into Flockdoors, and it fixes #17.

Why's this needed?

The changes allow for some bug fixes.

@keywordlabeler keywordlabeler bot added the bug Something isn't working label Apr 6, 2022
@github-actions github-actions bot added the size/M label Apr 6, 2022
if (istype(O, /obj/machinery/door/window) || istype(O, /obj/machinery/door/airlock/pyro/glass/windoor) || istype(O, /obj/machinery/door/unpowered/wood))
qdel(O)
continue
if (istype(O, /obj/machinery/door/poddoor/pyro) && !(findtext(O.name, "cargo") || findtext(O.name, "pod") || findtext(O.name, "mass") || findtext(O.name, "disposal"))) // shutters
Copy link
Contributor

Choose a reason for hiding this comment

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

This cannot be the best way of doing this. Is there a particular reason we can't just convert them all?

Copy link
Contributor Author

@FlameArrow57 FlameArrow57 Apr 6, 2022

Choose a reason for hiding this comment

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

Windoors are found over tables, and for the last case, some of these doors are found in glass windows, such as for the ai core shield, or over tables, such as for the bridge lockdown shutters, meaning if they were converted there would be tables or glass walls on the same tile as doors.

Didn't seem like sliding windoors and sliding windows were big enough for Flock door creation too in terms of making sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps a check for a blocking object on the turf to be converted? Then either convert or delete the shutter as appropriate.

Copy link
Contributor Author

@FlameArrow57 FlameArrow57 Apr 17, 2022

Choose a reason for hiding this comment

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

Would work I think, but seemed like some shutters should be converted, whereas others shouldn't, like chemistry shutters felt like they shouldn't be converted, where ones directly connected to space should. Idk.

code/datums/flock/flock.dm Show resolved Hide resolved
code/datums/flock/flock.dm Show resolved Hide resolved
Comment on lines 545 to 554
if (istype(O, /obj/machinery/door))
if (istype(O, /obj/machinery/door/firedoor/pyro))
qdel(O)
continue
if (istype(O, /obj/machinery/door/window) || istype(O, /obj/machinery/door/airlock/pyro/glass/windoor) || istype(O, /obj/machinery/door/unpowered/wood))
qdel(O)
continue
if (istype(O, /obj/machinery/door/poddoor/pyro) && !(findtext(O.name, "cargo") || findtext(O.name, "pod") || findtext(O.name, "mass") || findtext(O.name, "disposal"))) // shutters
qdel(O)
continue
Copy link
Owner

@stonepillars stonepillars Apr 8, 2022

Choose a reason for hiding this comment

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

Maybe just allow replacement_path values to be null and have that signify that that type is just deleted when its found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue with using null is that if a Flockdoor is over a tile that isn't a Flock floortile, and you convert that tile, the Flockdoor is deleted, meaning in your conversion list you have to say /obj/machinery/door/feather = /obj/machinery/door/feather, which seemed a bit off, and everything checked for here would also have to be put in the list with a null replacement, which I'm not sure if it's a good idea adding more checks considering its checking everything in the list for every object on a turf. Idk.

code/datums/flock/flock.dm Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/M and removed size/L labels Apr 17, 2022
@FlameArrow57 FlameArrow57 deleted the door-conversion branch April 23, 2022 05:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Converting pod bay doors deletes them
3 participants