mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Removes the bitflag helpers (#49106)
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
|
||||
. = ..()
|
||||
ENABLE_BITFIELD(reagents.flags, NO_REACT)
|
||||
reagents.flags |= NO_REACT
|
||||
|
||||
/obj/item/ammo_casing/shotgun/dart/bioterror
|
||||
desc = "A shotgun dart filled with deadly toxins."
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
/obj/projectile/proc/process_hit(turf/T, atom/target, qdel_self, hit_something = FALSE) //probably needs to be reworked entirely when pixel movement is done.
|
||||
if(QDELETED(src) || !T || !target) //We're done, nothing's left.
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !(movement_type & UNSTOPPABLE)))
|
||||
qdel(src)
|
||||
return hit_something
|
||||
permutated |= target //Make sure we're never hitting it again. If we ever run into weirdness with piercing projectiles needing to hit something multiple times.. well.. that's a to-do.
|
||||
@@ -262,16 +262,16 @@
|
||||
SEND_SIGNAL(target, COMSIG_PROJECTILE_PREHIT, args)
|
||||
var/result = target.bullet_act(src, def_zone)
|
||||
if(result == BULLET_ACT_FORCE_PIERCE)
|
||||
if(!CHECK_BITFIELD(movement_type, UNSTOPPABLE))
|
||||
if(!(movement_type & UNSTOPPABLE))
|
||||
temporary_unstoppable_movement = TRUE
|
||||
ENABLE_BITFIELD(movement_type, UNSTOPPABLE)
|
||||
movement_type |= UNSTOPPABLE
|
||||
return process_hit(T, select_target(T), qdel_self, TRUE) //Hit whatever else we can since we're piercing through but we're still on the same tile.
|
||||
else if(result == BULLET_ACT_TURF) //We hit the turf but instead we're going to also hit something else on it.
|
||||
return process_hit(T, select_target(T), QDEL_SELF, TRUE)
|
||||
else //Whether it hit or blocked, we're done!
|
||||
qdel_self = QDEL_SELF
|
||||
hit_something = TRUE
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !(movement_type & UNSTOPPABLE)))
|
||||
qdel(src)
|
||||
return hit_something
|
||||
|
||||
@@ -547,7 +547,8 @@
|
||||
else
|
||||
var/mob/living/L = target
|
||||
if(!direct_target)
|
||||
if(!CHECK_BITFIELD(L.mobility_flags, MOBILITY_USE | MOBILITY_STAND | MOBILITY_MOVE) || !(L.stat == CONSCIOUS)) //If they're able to 1. stand or 2. use items or 3. move, AND they are not softcrit, they are not stunned enough to dodge projectiles passing over.
|
||||
var/checking = MOBILITY_USE | MOBILITY_STAND | MOBILITY_MOVE
|
||||
if(!((L.mobility_flags & checking) == checking) || !(L.stat == CONSCIOUS)) //If they're able to 1. stand or 2. use items or 3. move, AND they are not softcrit, they are not stunned enough to dodge projectiles passing over.
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -622,7 +623,7 @@
|
||||
if(.)
|
||||
if(temporary_unstoppable_movement)
|
||||
temporary_unstoppable_movement = FALSE
|
||||
DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
|
||||
movement_type &= ~(UNSTOPPABLE)
|
||||
if(fired && can_hit_target(original, permutated, TRUE))
|
||||
Bump(original)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"<span class='userdanger'>You were protected against \the [src]!</span>")
|
||||
|
||||
..(target, blocked)
|
||||
DISABLE_BITFIELD(reagents.flags, NO_REACT)
|
||||
reagents.flags &= ~(NO_REACT)
|
||||
reagents.handle_reactions()
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/projectile/curse_hand/Initialize(mapload)
|
||||
. = ..()
|
||||
ENABLE_BITFIELD(movement_type, UNSTOPPABLE)
|
||||
movement_type |= UNSTOPPABLE
|
||||
handedness = prob(50)
|
||||
icon_state = "cursehand[handedness]"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/obj/projectile/curse_hand/prehit(atom/target)
|
||||
if(target == original)
|
||||
DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
|
||||
movement_type &= ~(UNSTOPPABLE)
|
||||
else if(!isturf(target))
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -40,7 +40,7 @@
|
||||
if(arm)
|
||||
arm.End()
|
||||
arm = null
|
||||
if(CHECK_BITFIELD(movement_type, UNSTOPPABLE))
|
||||
if((movement_type & UNSTOPPABLE))
|
||||
playsound(src, 'sound/effects/curse3.ogg', 25, TRUE, -1)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/temp_visual/dir_setting/curse/hand/leftover = new(T, dir)
|
||||
|
||||
Reference in New Issue
Block a user