This commit is contained in:
kevinz000
2020-02-27 20:06:52 -07:00
parent f4e49f339b
commit 045d5b2dbf
9 changed files with 25 additions and 24 deletions

View File

@@ -64,16 +64,16 @@
else
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
/obj/item/holybeacon/proc/beacon_armor(mob/living/M)
/obj/item/holybeacon/proc/beacon_armor(mob/living/L)
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
var/list/display_names = list()
for(var/V in holy_armor_list)
var/atom/A = V
display_names += list(initial(A.name) = A)
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
var/choice = input(L,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
var/turf/T = get_turf(src)
if(!T || QDELETED(src) || !choice || !CHECK_BITFIELD(M.mobility_flags, MOBILITY_USE) || !in_range(M, src) || GLOB.holy_armor_type)
if(!T || QDELETED(src) || !choice || !CHECK_MOBILITY(L, MOBILITY_USE) || !in_range(L, src) || GLOB.holy_armor_type)
return
var/index = display_names.Find(choice)
@@ -86,7 +86,7 @@
if(holy_armor_box)
qdel(src)
M.put_in_hands(holy_armor_box)
L.put_in_hands(holy_armor_box)
/obj/item/storage/box/holy
name = "Templar Kit"
@@ -244,7 +244,7 @@
if(user.mind && (user.mind.isholy) && !reskinned)
reskin_holy_weapon(user)
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/M)
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L)
if(GLOB.holy_weapon_type)
return
var/obj/item/holy_weapon
@@ -255,8 +255,8 @@
if (initial(rodtype.chaplain_spawnable))
display_names[initial(rodtype.name)] = rodtype
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(QDELETED(src) || !choice || !in_range(M, src) || !CHECK_MOBILITY(M, MOBILITY_USE) || reskinned)
var/choice = input(L, "What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(QDELETED(src) || !choice || !in_range(L, src) || !CHECK_MOBILITY(L, MOBILITY_USE) || reskinned)
return
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
@@ -269,7 +269,7 @@
if(holy_weapon)
holy_weapon.reskinned = TRUE
qdel(src)
M.put_in_active_hand(holy_weapon)
L.put_in_active_hand(holy_weapon)
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))

View File

@@ -529,7 +529,7 @@
if(B.cell.charge > 0 && B.status == 1)
flick("baton_active", src)
var/stunforce = B.stamforce
user.DefaultCombatKnockdown(stunforce)
user.DefaultCombatKnockdown(stunforce * 2)
user.stuttering = stunforce/20
B.deductcharge(B.hitcost)
user.visible_message("<span class='warning'>[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!</span>", \

View File

@@ -344,7 +344,7 @@
set category = "Object"
set src in oview(1)
var/mob/living/L = usr
if(!CHECK_BITFIELD(L, MOBILITY_PULL))
if(!CHECK_MOBILITY(L, MOBILITY_PULL))
return
if(facing == "l")

View File

@@ -197,13 +197,12 @@
else
to_chat(user, "<span class='warning'>This mind seems resistant to the flash!</span>")
/obj/item/assembly/flash/cyborg
/obj/item/assembly/flash/cyborg/attack(mob/living/M, mob/user)
. = ..()
new /obj/effect/temp_visual/borgflash(get_turf(src))
if(. && !CONFIG_GET(flag/disable_borg_flash_knockdown) && iscarbon(M) && CHECK_BITFIELD(M.mobility_flags, MOBILITY_STAND) && !M.get_eye_protection())
if(. && !CONFIG_GET(flag/disable_borg_flash_knockdown) && iscarbon(M) && CHECK_MOBILITY(M, MOBILITY_STAND) && !M.get_eye_protection())
M.DefaultCombatKnockdown(80)
/obj/item/assembly/flash/cyborg/attack_self(mob/user)

View File

@@ -280,7 +280,7 @@
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/living/carbon/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !istype(target) || !user.IsAdvancedToolUser())
return
if(!CHECK_BITFIELD(target.mobility_flags, MOBILITY_MOVE))
if(!CHECK_MOBILITY(target, MOBILITY_MOVE))
close_machine(target)
else
user.visible_message("<b>[user]</b> starts shoving [target] inside [src].", "<span class='notice'>You start shoving [target] inside [src].</span>")

View File

@@ -88,7 +88,7 @@
var/they_can_move = TRUE
if(isliving(M))
var/mob/living/L = M
they_can_move = L.mobility_flags & MOBILITY_MOVE
they_can_move = CHECK_MOBILITY(L, MOBILITY_MOVE)
//Also spread diseases
for(var/thing in diseases)
var/datum/disease/D = thing
@@ -663,7 +663,7 @@
// This shouldn't give clickdelays sometime (e.g. going out of a mech/unwelded and unlocked locker/disposals bin/etc) but there's so many overrides that I am not going to bother right now.
return TRUE
if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE))
if(CHECK_MOBILITY(src, MOBILITY_MOVE))
if(on_fire)
resist_fire() //stop, drop, and roll
// Give clickdelay
@@ -704,7 +704,7 @@
/mob/living/do_resist_grab(moving_resist, forced, silent = FALSE)
. = ..()
if(pulledby.grab_state)
if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && prob(30/pulledby.grab_state))
if(CHECK_MOBILITY(src, MOBILITY_STAND) && prob(30/pulledby.grab_state))
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
pulledby.stop_pulling()
return TRUE
@@ -1184,4 +1184,4 @@
reagents.add_reagent_list(healing_chems)
/mob/living/canface()
return ..() && CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE)
return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE)

View File

@@ -41,7 +41,7 @@
AIproc = 1
while(AIproc && stat != DEAD && (attacked || hungry || rabid || buckled))
if(!(mobility_flags & MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly
if(!CHECK_MOBILITY(src, MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly
break
if(!Target || client)
@@ -291,7 +291,7 @@
Discipline--
if(!client)
if(!CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE))
if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
return
if(buckled)
@@ -376,13 +376,13 @@
if (Leader)
if(holding_still)
holding_still = max(holding_still - 1, 0)
else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc))
else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc))
step_to(src, Leader)
else if(hungry)
if (holding_still)
holding_still = max(holding_still - hungry, 0)
else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(50))
else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && prob(50))
step(src, pick(GLOB.cardinals))
else
@@ -390,7 +390,7 @@
holding_still = max(holding_still - 1, 0)
else if (docile && pulledby)
holding_still = 10
else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(33))
else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && prob(33))
step(src, pick(GLOB.cardinals))
else if(!AIproc)
INVOKE_ASYNC(src, .proc/AIprocess)

View File

@@ -665,6 +665,8 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
return FALSE
if(anchored)
return FALSE
if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
return FALSE
if(notransform)
return FALSE
if(restrained())

View File

@@ -1,4 +1,4 @@
/mob/living
|/mob/living
var/sprinting = FALSE
var/recoveringstam = FALSE
var/incomingstammult = 1
@@ -25,7 +25,7 @@
/mob/living/movement_delay(ignorewalk = 0)
. = ..()
if(!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND))
if(!CHECK_MOBILITY(src, MOBILITY_STAND))
. += 6
/atom