Ports timestop and sepia extracts improvements/tweaks.

This commit is contained in:
Ghommie
2019-12-06 19:01:42 +01:00
parent 0598c35d70
commit 91e628c73d
16 changed files with 334 additions and 85 deletions
+13 -7
View File
@@ -84,8 +84,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
@@ -138,13 +140,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))
@@ -83,6 +83,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.
@@ -424,6 +425,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
@@ -442,6 +446,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)
@@ -556,6 +561,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)