-
-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Outdated
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
[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:
These (only where connected to space and used as a podbay hangar door or mass driver door):
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.