This commit is contained in:
kevinz000
2020-01-11 10:49:44 -08:00
parent b6e14c6b86
commit 9fd9f60855
13 changed files with 30 additions and 25 deletions

View File

@@ -93,6 +93,10 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define RAD_NO_CONTAMINATE (1<<1)
//Mob mobility var flags
/// any flag
#define CHECK_MOBILITY(target, flags) CHECK_BITFIELD(target.mobility_flags, flags)
#define CHECK_ALL_MOBILITY(target, flags) CHECK_MULTIPLE_BITFIELDS(target.mobility_flags, flags)
/// can move
#define MOBILITY_MOVE (1<<0)
/// can, and is, standing up.

View File

@@ -273,7 +273,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
if(L.canmove)
if(CHECK_MOBILITY(L, MOBILITY_MOVE))
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
@@ -601,7 +601,7 @@ so as to remain in compliance with the most up-to-date laws."
if(!istype(L) || !L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
if((L.canmove) && (L.last_special <= world.time))
if(CHECK_MOBILITY(L, MOBILITY_MOVE) && (L.last_special <= world.time))
return L.resist_restraints()
/obj/screen/alert/restrained/buckled/Click()

View File

@@ -64,7 +64,8 @@
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 0
ADD_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
M.update_mobility()
affecting.Add(AM)
while(AM && !stopthrow)
@@ -101,7 +102,8 @@
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 1
REMOVE_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
M.update_mobility()
/* Stops things thrown by a thrower, doesn't do anything */

View File

@@ -58,7 +58,7 @@
// Did I get knocked down?
if(owner && owner.incapacitated(ignore_restraints=TRUE, ignore_grab=TRUE))// owner.incapacitated())
// We're gonna cancel. But am I on the ground? Spin me!
if(user.resting)
if(!CHECK_MOBILTIY(user, MOBILITY_STAND))
var/send_dir = get_dir(owner, T)
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
owner.spin(10)
@@ -71,7 +71,7 @@
if (rand(0, 5) < level_current)
playsound(get_turf(newtarget), "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
newtarget.DefaultCombatKnockdown(10 + level_current * 5)
if(newtarget.IsStun())
if(_REFACTORING_newtarget.IsStun())
newtarget.spin(10,1)
if (rand(0,4))
newtarget.drop_all_held_items()
@@ -81,4 +81,4 @@
/datum/action/bloodsucker/targeted/haste/DeactivatePower(mob/living/user = owner, mob/living/target)
..() // activate = FALSE
user.update_canmove()
user.update_mobility()

View File

@@ -74,10 +74,10 @@
target.adjustStaminaLoss(40 + 10 * level_current)
// Cancel Walk (we were close enough to contact them)
walk(owner, 0)
target.Stun(10,1) //Without this the victim can just walk away
target._REFACTORING_Stun(10,1) //Without this the victim can just walk away
target.grabbedby(owner) // Taken from mutations.dm under changelings
target.grippedby(owner, instant = TRUE) //instant aggro grab
/datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target)
..() // activate = FALSE
user.update_canmove()
user.update_mobility()

View File

@@ -333,10 +333,6 @@ Pipelines + Other Objects -> Pipe network
user.forceMove(loc)
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.canmove = FALSE
addtimer(VARSET_CALLBACK(user, canmove, TRUE), 1)
/obj/machinery/atmospherics/AltClick(mob/living/L)
if(is_type_in_typecache(src, GLOB.ventcrawl_machinery))
return L.handle_ventcrawl(src)

View File

@@ -127,8 +127,9 @@
set name = "Eject Contents"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
return
var/mob/living/L = usr
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
return ..()
empty()
add_fingerprint(usr)

View File

@@ -27,7 +27,7 @@
if(stat == UNCONSCIOUS)
stat = CONSCIOUS
if(!recoveringstam)
resting = 0
set_resting(FALSE, TRUE)
adjust_blindness(-1)
update_mobility()
update_damage_hud()

View File

@@ -118,7 +118,7 @@
return 1
//CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks without a short delay
if(resting && !L.resting)
if(!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(L, MOBILITY_STAND))
var/origtargetloc = L.loc
if(!pulledby)
if(attemptingcrawl)
@@ -416,7 +416,7 @@
set name = "Sleep"
set category = "IC"
if(IsSleeping())
if(_REFACTORING_IsSleeping())
to_chat(src, "<span class='notice'>You are already sleeping.</span>")
return
else
@@ -675,7 +675,7 @@
if(on_fire)
resist_fire() //stop, drop, and roll
return
if(_MOBILTIYFLAGTEMPORARY_resting) //cit change - allows resisting out of resting
if(_REFACTORING_resting) //cit change - allows resisting out of resting
resist_a_rest() // ditto
return
if(resist_embedded()) //Citadel Change for embedded removal memes

View File

@@ -2,7 +2,7 @@
if(stat == DEAD)
return
stat = DEAD
canmove = 0
update_mobility()
update_sight()
clear_fullscreens()

View File

@@ -1,7 +1,7 @@
/mob/living/silicon/robot/update_mobility()
var/newflags = NONE
if(!stat)
if(!resting)
if(!_REFACTORING_resting)
newflags |= MOBILITY_STAND
if(!locked_down)
newflags |= MOBILITY_MOVE

View File

@@ -377,9 +377,9 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
if("oxyloss")
target.adjustOxyLoss(amount)
if("stun")
target._REFACTOR_AdjustStun(amount)
target._REFACTORING_AdjustStun(amount)
if("knockdown")
target._REFACTOR_AdjustKnockdown(amount)
target._REFACTORING_AdjustKnockdown(amount)
if("unconscious")
target.AdjustUnconscious(amount)
else

View File

@@ -40,7 +40,8 @@
return
mobloc = get_turf(target.loc)
jaunt_steam(mobloc)
target.canmove = 0
ADD_TRAIT(target, TRAIT_MOBILITY_NOMOVE)
target.update_mobility()
holder.reappearing = 1
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
sleep(25 - jaunt_in_time)
@@ -55,7 +56,8 @@
if(T)
if(target.Move(T))
break
target.canmove = 1
REMOVE_TRAIT(target, TRAIT_MOBILITY_NOMOVE)
target.update_mobility()
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(mobloc)
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()