-
-
Notifications
You must be signed in to change notification settings - Fork 4
Fix Flock conversion bugs #190
base: master
Are you sure you want to change the base?
Conversation
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 |
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.
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.
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.
i'd rather just fix this outright on the upstream by making it a new type or subtype or whatever
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.
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)) |
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.
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) |
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.
for the don't covert/delete this, you could just do if isnull(replacementPath) delete it else if(!replacementPath) break
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.
I pressed the wrong button lol
[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.
![image](https://user-images.githubusercontent.com/53062374/163737815-5e8196a9-e30b-4c7d-b585-be0f25e84982.png)
These:
These (only where connected to space and used as a podbay hangar door or mass driver door):
![image](https://user-images.githubusercontent.com/53062374/163737787-3c16cb19-f5d0-42e9-8d89-53ca13b70e13.png)
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.