Scopes NODECONSTRUCT_1 from flags_1 to obj_flags (#80104)

This flag only worked on the `/obj/structure` and `/obj/machinery`
level, so let's rescope it from `flags_1` and put it where it belongs -
`obj_flags`.
Bitflag operators should be scoped to their subtype specific bitfield,
not really useful to have this take up a spot on the `/atom` level if
absolutely nothing other than `/obj`s use it.
This commit is contained in:
san7890
2023-12-08 08:49:14 +00:00
committed by GitHub
parent bf94b4433b
commit 5ce9d5806d
116 changed files with 206 additions and 209 deletions
+2 -2
View File
@@ -294,12 +294,12 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
holo_object.resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
if(isstructure(holo_object))
holo_object.flags_1 |= NODECONSTRUCT_1
holo_object.obj_flags |= NO_DECONSTRUCTION
return
if(ismachinery(holo_object))
var/obj/machinery/holo_machine = holo_object
holo_machine.flags_1 |= NODECONSTRUCT_1
holo_machine.obj_flags |= NO_DECONSTRUCTION
holo_machine.power_change()
if(istype(holo_machine, /obj/machinery/button))
+2 -1
View File
@@ -49,7 +49,8 @@
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
var/newtype = pick(subtypesof(/obj/item/book/manual) - banned_books)
var/obj/item/book/manual/to_spawn = new newtype(loc)
to_spawn.flags_1 |= (HOLOGRAM_1 | NODECONSTRUCT_1)
to_spawn.flags_1 |= HOLOGRAM_1
to_spawn.obj_flags |= NO_DECONSTRUCTION
return to_spawn
/obj/effect/holodeck_effect/mobspawner
+1 -1
View File
@@ -135,7 +135,7 @@
eventstarted = TRUE
for(var/obj/structure/window/W in currentarea)
if(W.flags_1&NODECONSTRUCT_1) // Just in case: only holo-windows
if(W.obj_flags & NO_DECONSTRUCTION) // Just in case: only holo-windows
qdel(W)
for(var/mob/M in currentarea)