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

Fix Flock conversion bugs #190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FlameArrow57
Copy link
Contributor

[BUG]

About the PR

This PR allows podbay doors to be converted to Flock doors and fixes various other conversion bugs.

It allows podbay doors and some 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 Flockdoors being deleted if the tile they were on was not Flock and converted, it fixes windoors being made into Flockdoors, it fixes #17, and it fixes converting various instances of machinery to compute nodes that shouldn't be converted.

Partial reopening of #127, with some more stuff.

Why's this needed?

Some changes allow for bug fixes, other stuff is direct bug fixes.

@keywordlabeler keywordlabeler bot added the bug Something isn't working label Apr 18, 2022
for (var/mob/M in O)
M.set_loc(converted)
break
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.

I still really don't like relying on findtext(name, "blah") - it assumes that mappers have stuck to an unofficial naming scheme, and haven't made a mistake.

I think a better way would be to check whether the turf is dense without the door, and if it is delete it - otherwise convert it.

Copy link
Contributor

Choose a reason for hiding this comment

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

i'd rather just fix this outright on the upstream by making it a new type or subtype or whatever

Copy link
Contributor

Choose a reason for hiding this comment

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

that seems like a much nicer fix


break
if (istype(O, /obj/machinery/computer))
if (istype(O, /obj/machinery/computer/card/portable) || istype(O, /obj/machinery/computer/security/wooden_tv) || istype(O, /obj/machinery/computer/secure_data/detective_computer) || istype(O, /obj/machinery/computer/airbr) || istype(O, /obj/machinery/computer/tour_console) || istype(O, /obj/machinery/computer/arcade) || istype(O, /obj/machinery/computer/tetris))
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're not converting these, you should add them to the flock_conversion_paths with a null, or if you don't want to delete them, maybe have /obj/path = FALSE mean "don't convert or delete this".

Also I get wooden_tv, but why not convert the others?

break
var/dir = O.dir
var/replacementPath = flock_conversion_paths[keyPath]
var/obj/converted = new replacementPath(T)
Copy link
Contributor

Choose a reason for hiding this comment

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

for the don't covert/delete this, you could just do if isnull(replacementPath) delete it else if(!replacementPath) break

Copy link
Contributor

@amylizzle amylizzle left a comment

Choose a reason for hiding this comment

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

I pressed the wrong button lol

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working DO NOT MERG aaaaaaaaaaaaaaaaaaaaaaaa size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Converting pod bay doors deletes them
4 participants