mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
[MIRROR] Floored trait (#329)
* Floored trait (#52884) Refactors mobility, so we respond to more things as events. One has_legs and has_arms are turned into events we'll be close to be able to eschew update_mobility() * Floored trait Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
owner.update_stat()
|
||||
return ..()
|
||||
|
||||
|
||||
//STUN
|
||||
/datum/status_effect/incapacitating/stun
|
||||
id = "stun"
|
||||
@@ -40,10 +41,21 @@
|
||||
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id))
|
||||
return ..()
|
||||
|
||||
|
||||
//KNOCKDOWN
|
||||
/datum/status_effect/incapacitating/knockdown
|
||||
id = "knockdown"
|
||||
|
||||
/datum/status_effect/incapacitating/knockdown/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id))
|
||||
|
||||
/datum/status_effect/incapacitating/knockdown/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id))
|
||||
return ..()
|
||||
|
||||
|
||||
//IMMOBILIZED
|
||||
/datum/status_effect/incapacitating/immobilized
|
||||
@@ -60,6 +72,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
//PARALYZED
|
||||
/datum/status_effect/incapacitating/paralyzed
|
||||
id = "paralyzed"
|
||||
|
||||
@@ -69,12 +82,15 @@
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_INCAPACITATED, TRAIT_STATUS_EFFECT(id))
|
||||
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id))
|
||||
ADD_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id))
|
||||
|
||||
/datum/status_effect/incapacitating/paralyzed/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_INCAPACITATED, TRAIT_STATUS_EFFECT(id))
|
||||
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id))
|
||||
REMOVE_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id))
|
||||
return ..()
|
||||
|
||||
|
||||
//UNCONSCIOUS
|
||||
/datum/status_effect/incapacitating/unconscious
|
||||
id = "unconscious"
|
||||
@@ -94,6 +110,7 @@
|
||||
if(owner.getStaminaLoss())
|
||||
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
|
||||
|
||||
|
||||
//SLEEPING
|
||||
/datum/status_effect/incapacitating/sleeping
|
||||
id = "sleeping"
|
||||
|
||||
Reference in New Issue
Block a user