Merge pull request #7739 from Zuhayr/dev

Readds moonwalking.
This commit is contained in:
Chinsky
2015-02-03 18:09:25 +03:00
6 changed files with 84 additions and 7 deletions
+2
View File
@@ -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("<b>\The [src.name]</b> [deathmessage]")
+1 -2
View File
@@ -1039,8 +1039,7 @@
if(halloss > 100)
src << "<span class='notice'>You're in too much pain to keep going...</span>"
for(var/mob/O in oviewers(src, null))
O.show_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.", 1)
src.visible_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
+60 -4
View File
@@ -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)
+2 -1
View File
@@ -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