CHECK_MOBILITY
This commit is contained in:
@@ -95,7 +95,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
|
||||
//Mob mobility var flags
|
||||
/// any flag
|
||||
#define CHECK_MOBILITY(target, flags) CHECK_BITFIELD(target.mobility_flags, flags)
|
||||
#define CHECK_MOBILITY(target, flags) CHECK_MOBILITY(target, flags)
|
||||
#define CHECK_ALL_MOBILITY(target, flags) CHECK_MULTIPLE_BITFIELDS(target.mobility_flags, flags)
|
||||
|
||||
/// can move
|
||||
|
||||
@@ -433,5 +433,5 @@
|
||||
. = ..()
|
||||
if(active)
|
||||
for(var/mob/living/M in rangers)
|
||||
if(prob(5+(allowed(M)*4)) && CHECK_BITFIELD(M.mobility_flags, MOBILITY_MOVE))
|
||||
if(prob(5+(allowed(M)*4)) && CHECK_MOBILITY(M, MOBILITY_MOVE))
|
||||
dance(M)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
//Allow you to drag-drop disposal pipes and transit tubes into it
|
||||
/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/pipe, mob/living/user)
|
||||
if(!istype(user) || !CHECK_BITFIELD(user.mobility_flags, MOBILITY_USE))
|
||||
if(!istype(user) || !CHECK_MOBILITY(user, MOBILITY_USE))
|
||||
return
|
||||
|
||||
if (!istype(pipe, /obj/structure/disposalconstruct) && !istype(pipe, /obj/structure/c_transit_tube) && !istype(pipe, /obj/structure/c_transit_tube_pod))
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
var/mob/living/L = usr
|
||||
if(istype(L) && !CHECK_BITFIELD(L.mobility_flags, MOBILITY_USE))
|
||||
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling
|
||||
|
||||
/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
|
||||
if(opened || move_delay || !CHECK_BITFIELD(user.mobility_flags, MOBILITY_MOVE) || !isturf(loc) || !has_gravity(loc))
|
||||
if(opened || move_delay || !CHECK_MOBILITY(user, MOBILITY_MOVE) || !isturf(loc) || !has_gravity(loc))
|
||||
return
|
||||
move_delay = TRUE
|
||||
var/oldloc = loc
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
|
||||
|
||||
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
|
||||
if(CHECK_BITFIELD(target.mobility_flags, MOBILITY_STAND))
|
||||
if(CHECK_MOBILITY(target, MOBILITY_STAND))
|
||||
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_TABLE)
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [src]!</span>",
|
||||
"<span class='danger'>You shove [target.name] onto \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
@@ -575,7 +575,7 @@
|
||||
/obj/structure/table/optable/proc/check_patient()
|
||||
var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, loc)
|
||||
if(M)
|
||||
if(!CHECK_BITFIELD(M.mobility_flags, MOBILITY_STAND))
|
||||
if(!CHECK_MOBILITY(M, MOBILITY_STAND))
|
||||
patient = M
|
||||
return 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user