diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 3d96e3d9c0..a97d616dee 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -52,6 +52,8 @@ if(stat == DEAD) return 0 + facing_dir = null + if(!gibbed && deathmessage != "no message") // This is gross, but reliable. Only brains use it. src.visible_message("\The [src.name] [deathmessage]") diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 72c281a1f2..51bd823747 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1039,8 +1039,7 @@ if(halloss > 100) src << "You're in too much pain to keep going..." - for(var/mob/O in oviewers(src, null)) - O.show_message("[src] slumps to the ground, too weak to continue fighting.", 1) + src.visible_message("[src] slumps to the ground, too weak to continue fighting.") Paralyse(10) setHalLoss(99) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 82a5384001..d12af10dd0 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -839,9 +839,7 @@ note dizziness decrements automatically in the mob's Life() proc. // facing verbs /mob/proc/canface() if(!canmove) return 0 - if(client.moving) return 0 - if(world.time < client.move_delay) return 0 - if(stat==2) return 0 + if(stat) return 0 if(anchored) return 0 if(monkeyizing) return 0 return 1 @@ -903,7 +901,8 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/facedir(var/ndir) - if(!canface()) return 0 + if(!canface() || client.moving || world.time < client.move_delay) + return 0 set_dir(ndir) if(buckled && buckled.movable) buckled.set_dir(ndir) @@ -937,6 +936,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/Stun(amount) if(status_flags & CANSTUN) + facing_dir = null stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun return @@ -952,6 +952,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/Weaken(amount) if(status_flags & CANWEAKEN) + facing_dir = null weakened = max(max(weakened,amount),0) update_canmove() //updates lying, canmove and icons return @@ -970,6 +971,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/Paralyse(amount) if(status_flags & CANPARALYSE) + facing_dir = null paralysis = max(max(paralysis,amount),0) return @@ -984,6 +986,7 @@ note dizziness decrements automatically in the mob's Life() proc. return /mob/proc/Sleeping(amount) + facing_dir = null sleeping = max(max(sleeping,amount),0) return @@ -996,6 +999,7 @@ note dizziness decrements automatically in the mob's Life() proc. return /mob/proc/Resting(amount) + facing_dir = null resting = max(max(resting,amount),0) return @@ -1159,3 +1163,55 @@ mob/proc/yank_out_object() /mob/proc/updateicon() return + +/mob/verb/face_direction() + + set name = "Face Direction" + set category = "IC" + set src = usr + + set_face_dir() + + if(!facing_dir) + usr << "You are now not facing anything." + else + usr << "You are now facing [dir2text(facing_dir)]." + +/mob/proc/set_face_dir(var/newdir) + if(newdir) + set_dir(newdir) + facing_dir = newdir + else if(facing_dir) + facing_dir = null + else + set_dir(dir) + facing_dir = dir + +/mob/set_dir() + if(facing_dir) + if(!canface() || lying || buckled || restrained()) + facing_dir = null + else if(dir != facing_dir) + return ..(facing_dir) + else + return ..() + +/mob/verb/northfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(NORTH) + +/mob/verb/southfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(SOUTH) + +/mob/verb/eastfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(EAST) + +/mob/verb/westfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(WEST) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 296d58d078..1b9f1c1b76 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -90,6 +90,7 @@ var/list/languages = list() // For speaking/listening. var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null. var/emote_type = 1 // Define emote default type, 1 for seen emotes, 2 for heard emotes + var/facing_dir = null // Used for the ancient art of moonwalking. var/name_archive //For admin things like possession @@ -214,7 +215,7 @@ var/universal_understand = 0 // Set to 1 to enable the mob to understand everyone, not necessarily speak var/stance_damage = 0 //Whether this mob's ability to stand has been affected - + //SSD var, changed it up some so people can have special things happen for different mobs when SSD. var/player_logged = 0 diff --git a/html/changelog.html b/html/changelog.html index b534169136..ceb9870229 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -61,6 +61,9 @@ should be listed in the changelog upon commit though. Thanks. -->