Replace all secondary flags with bitflags stored in the flags_2 var
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
can_be_unanchored = FALSE
|
||||
canSmoothWith = null
|
||||
buildstacktype = null
|
||||
flags = NODECONSTRUCT
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
var/static/mutable_appearance/nest_overlay = mutable_appearance('icons/mob/alien.dmi', "nestoverlay", LYING_MOB_LAYER)
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/buckled_mob, mob/living/user)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/buildstackamount = 2
|
||||
|
||||
/obj/structure/bed/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(buildstacktype)
|
||||
new buildstacktype(loc,buildstackamount)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm (rejected hunks)
|
||||
@@ -31,7 +31,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
- if(istype(W, /obj/item/wrench) && !(flags&NODECONSTRUCT))
|
||||
+ if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/obj/structure/chair/deconstruct()
|
||||
// If we have materials, and don't have the NOCONSTRUCT flag
|
||||
if(buildstacktype && (!(flags & NODECONSTRUCT)))
|
||||
if(buildstacktype && (!(flags_1 & NODECONSTRUCT_1)))
|
||||
new buildstacktype(loc,buildstackamount)
|
||||
..()
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags & NODECONSTRUCT)
|
||||
if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1)
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
@@ -250,7 +250,7 @@
|
||||
if(istype(A, /obj/structure/chair))
|
||||
to_chat(user, "<span class='danger'>There is already a chair here.</span>")
|
||||
return
|
||||
if(A.density && !(A.flags & ON_BORDER))
|
||||
if(A.density && !(A.flags_1 & ON_BORDER_1))
|
||||
to_chat(user, "<span class='danger'>There is already something here.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm (rejected hunks)
|
||||
@@ -41,7 +41,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W, mob/user, params)
|
||||
- if(istype(W, /obj/item/wrench) && !(flags&NODECONSTRUCT))
|
||||
+ if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
Reference in New Issue
Block a user