This commit is contained in:
kevinz000
2020-01-16 00:14:03 -07:00
parent 1acac87da3
commit 26525b8fa7
7 changed files with 21 additions and 24 deletions
+11 -8
View File
@@ -8,6 +8,7 @@
var/desc = null
var/obj/target = null
var/check_flags = 0
var/required_mobility_flags = MOBILITY_USE
var/processing = FALSE
var/obj/screen/movable/action_button/button = null
var/buttontooltipstyle = ""
@@ -95,20 +96,22 @@
/datum/action/proc/IsAvailable()
if(!owner)
return 0
return FALSE
if(!CHECK_ALL_MOBILITY(owner, required_mobility_flags))
return FALSE
if(check_flags & AB_CHECK_RESTRAINED)
if(owner.restrained())
return 0
return FALSE
if(check_flags & AB_CHECK_STUN)
if(owner.IsKnockdown() || owner.IsStun())
return 0
if(!CHECK_MOBILITY(owner, MOBILITY_USE))
return FALSE
if(check_flags & AB_CHECK_LYING)
if(owner.lying)
return 0
if(!CHECK_MOBILITY(owner, MOBILITY_STAND))
return FALSE
if(check_flags & AB_CHECK_CONSCIOUS)
if(owner.stat)
return 0
return 1
return FALSE
return TRUE
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
if(button)
+1 -1
View File
@@ -227,7 +227,7 @@
H.visible_message("<span class='warning'>[H] collapses!</span>", \
"<span class='userdanger'>Your legs give out!</span>")
H.DefaultCombatKnockdown(80)
if(H.staminaloss && !H.IsSleeping())
if(H.staminaloss && !_REFACTORING_H.IsSleeping())
var/total_health = (H.health - H.staminaloss)
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!</span>", \