Merge pull request #10073 from Ghommie/Ghommie-cit435
Ports timestop and sepia extracts improvements/tweaks.
This commit is contained in:
@@ -90,8 +90,10 @@
|
||||
if(now_pushing)
|
||||
return TRUE
|
||||
|
||||
var/they_can_move = TRUE
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
they_can_move = L.canmove //L.mobility_flags & MOBILITY_MOVE
|
||||
//Also spread diseases
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
@@ -144,13 +146,17 @@
|
||||
return 1
|
||||
|
||||
if(!M.buckled && !M.has_buckled_mobs())
|
||||
var/mob_swap
|
||||
//the puller can always swap with its victim if on grab intent
|
||||
if(M.pulledby == src && a_intent == INTENT_GRAB)
|
||||
mob_swap = 1
|
||||
//restrained people act if they were on 'help' intent to prevent a person being pulled from being separated from their puller
|
||||
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
|
||||
mob_swap = 1
|
||||
var/mob_swap = FALSE
|
||||
var/too_strong = (M.move_resist > move_force) //can't swap with immovable objects unless they help us
|
||||
if(!they_can_move) //we have to physically move them
|
||||
if(!too_strong)
|
||||
mob_swap = TRUE
|
||||
else
|
||||
if(M.pulledby == src && a_intent == INTENT_GRAB)
|
||||
mob_swap = TRUE
|
||||
//restrained people act if they were on 'help' intent to prevent a person being pulled from being separated from their puller
|
||||
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
|
||||
mob_swap = TRUE
|
||||
if(mob_swap)
|
||||
//switch our position with M
|
||||
if(loc && !loc.Adjacent(M.loc))
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
var/datum/personal_crafting/handcrafting
|
||||
|
||||
var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players)
|
||||
var/can_have_ai = TRUE //once we have become sentient, we can never go back
|
||||
|
||||
var/shouldwakeup = FALSE //convenience var for forcibly waking up an idling AI on next check.
|
||||
|
||||
@@ -425,6 +426,9 @@
|
||||
canmove = FALSE
|
||||
else
|
||||
canmove = value_otherwise
|
||||
if(!canmove) // !(mobility_flags & MOBILITY_MOVE)
|
||||
walk(src, 0) //stop mid walk
|
||||
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
@@ -443,6 +447,7 @@
|
||||
|
||||
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
|
||||
toggle_ai(AI_OFF) // To prevent any weirdness.
|
||||
can_have_ai = FALSE
|
||||
|
||||
/mob/living/simple_animal/update_sight()
|
||||
if(!client)
|
||||
@@ -557,6 +562,8 @@
|
||||
LoadComponent(/datum/component/riding)
|
||||
|
||||
/mob/living/simple_animal/proc/toggle_ai(togglestatus)
|
||||
if(!can_have_ai && (togglestatus != AI_OFF))
|
||||
return
|
||||
if (AIStatus != togglestatus)
|
||||
if (togglestatus > 0 && togglestatus < 5)
|
||||
if (togglestatus == AI_Z_OFF || AIStatus == AI_Z_OFF)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
AIproc = 1
|
||||
|
||||
while(AIproc && stat != DEAD && (attacked || hungry || rabid || buckled))
|
||||
if(buckled) // can't eat AND have this little process at the same time
|
||||
if(!canmove) // !(mobility_flags & 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)
|
||||
|
||||
Reference in New Issue
Block a user