mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Adds crawling. (#17899)
* crawling? * knockdown. CONTAINS CHANGES THAT NEED REVERTING * plotting can_moves death * CANMOVE IS DEAD * mappers are insane * removes todos as the are todone * decreases crawling speed * silly-con fixes * surgery fixes * fixes death * pAI fixes * removes var/lying * runtime fix * decreases default crawling speed * correct crawling dir * some more fixes * stunbaton tweak, revert later * rejuv fix * restraint and incapacitated refactor * crawling dir in line with TG * fixes vehicle movement and grabs * alien rest fixes * antistun fixes * fixed fall sounds * forgor to stage this * first review * canmove zombie dispersal * fix * lots of fixes * defines * fixes the trait helper * if you got no legs you can still crawl * sillyconfix * no reverty keepy * jaunt fix * hopefully fixes perma sleepy zzz * admin rejuv temp fix * rest canceling * antistun chems now remove knockdown * buckle offset fix * fixes some stuff * crawling delay = 4 * descuffs bed * sleeping hotfix * fixes simple mob resting * V is the macro for resting * projectiles no dodgy * refines the projectile check * god I hate strings * MORE FIXES * I hate buckling * fixes capulettium plus * winding down * farie review * bugs did stop showing up * SEAN * todo * sean review * ed209 * i HATE cyborgs * steel review * laaaaaast things * reverts stun baton changes * and done
This commit is contained in:
@@ -81,8 +81,10 @@
|
||||
if(L.IsStunned() || L.IsWeakened())
|
||||
return FALSE
|
||||
if(check_flags & AB_CHECK_LYING)
|
||||
if(owner.lying)
|
||||
return FALSE
|
||||
if(isliving(owner))
|
||||
var/mob/living/L = owner
|
||||
if(IS_HORIZONTAL(L))
|
||||
return FALSE
|
||||
if(check_flags & AB_CHECK_CONSCIOUS)
|
||||
if(owner.stat)
|
||||
return FALSE
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
return
|
||||
|
||||
var/mob/living/LM = parent
|
||||
if(!T.footstep || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics))
|
||||
if(!T.footstep || IS_HORIZONTAL(LM) || !(LM.mobility_flags & MOBILITY_MOVE) || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics))
|
||||
return
|
||||
|
||||
if(ishuman(LM))
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
/datum/component/slippery
|
||||
/// Text that gets displayed in the slip proc, i.e. "user slips on [description]"
|
||||
var/description
|
||||
/// The amount of weaken to apply after slip.
|
||||
var/weaken
|
||||
/// The amount of knockdown to apply after slip.
|
||||
var/knockdown
|
||||
/// The chance that walking over the parent will slip you.
|
||||
var/slip_chance
|
||||
/// The amount of tiles someone will be moved after slip.
|
||||
@@ -23,12 +23,12 @@
|
||||
/// The verb that players will see when someone slips on the parent. In the form of "You [slip_verb]ped on".
|
||||
var/slip_verb
|
||||
|
||||
/datum/component/slippery/Initialize(_description, _weaken = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
|
||||
/datum/component/slippery/Initialize(_description, _knockdown = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
description = _description
|
||||
weaken = max(0, _weaken)
|
||||
knockdown = max(0, _knockdown)
|
||||
slip_chance = max(0, _slip_chance)
|
||||
slip_tiles = max(0, _slip_tiles)
|
||||
walking_is_safe = _walking_is_safe
|
||||
@@ -48,6 +48,6 @@
|
||||
Additionally calls the parent's `after_slip()` proc on the `victim`.
|
||||
*/
|
||||
/datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim)
|
||||
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
|
||||
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, knockdown, slip_tiles, walking_is_safe, slip_always, slip_verb))
|
||||
var/atom/movable/owner = parent
|
||||
owner.after_slip(victim)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
cure()
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(40)) //changed FROM prob(10) until sleeping is fixed
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
@@ -43,7 +43,7 @@
|
||||
cure()
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(25)) //changed FROM prob(5) until sleeping is fixed
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(2)
|
||||
if(affected_mob.lying && prob(20))
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(20))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
stage--
|
||||
return
|
||||
@@ -33,7 +33,7 @@
|
||||
affected_mob.adjustToxLoss(1)
|
||||
|
||||
if(3)
|
||||
if(affected_mob.lying && prob(15))
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(15))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
stage--
|
||||
return
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(restcure)
|
||||
if(affected_mob.lying && prob(30))
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(30))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
@@ -42,7 +42,7 @@
|
||||
to_chat(affected_mob, "<span class='danger'>You feel angry.</span>")
|
||||
if(2)
|
||||
if(restcure)
|
||||
if(affected_mob.lying && prob(20))
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(20))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
@@ -57,7 +57,7 @@
|
||||
to_chat(affected_mob, "<span class='danger'>Your stomach churns.</span>")
|
||||
if(3)
|
||||
if(restcure)
|
||||
if(affected_mob.lying && prob(20))
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(20))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
if(4)
|
||||
if(restcure)
|
||||
if(affected_mob.lying && prob(5))
|
||||
if(IS_HORIZONTAL(affected_mob) && prob(5))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
return
|
||||
if(transformation_text)
|
||||
to_chat(affected_mob, transformation_text)
|
||||
affected_mob.notransform = 1
|
||||
affected_mob.canmove = 0
|
||||
affected_mob.notransform = TRUE
|
||||
affected_mob.icon = null
|
||||
affected_mob.overlays.Cut()
|
||||
affected_mob.invisibility = 101
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/datum/element/waddling/proc/LivingWaddle(mob/living/target)
|
||||
if(target.incapacitated() || target.lying)
|
||||
if(target.incapacitated() || IS_HORIZONTAL(target))
|
||||
return
|
||||
Waddle(target)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
item_state = "banana_touch"
|
||||
|
||||
/obj/item/melee/touch_attack/banana/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || user.lying || user.handcuffed)
|
||||
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
mobloc = get_turf(target.loc)
|
||||
if(jaunt_water_effect)
|
||||
jaunt_steam(mobloc)
|
||||
target.canmove = 0
|
||||
ADD_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
|
||||
holder.reappearing = 1
|
||||
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
|
||||
sleep(jaunt_in_time * 4)
|
||||
@@ -66,10 +66,12 @@
|
||||
continue
|
||||
if(target.Move(T))
|
||||
target.remove_CC()
|
||||
REMOVE_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
|
||||
return
|
||||
for(var/turf/space/S in orange(7))
|
||||
if(target.Move(S))
|
||||
break
|
||||
REMOVE_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt")
|
||||
target.remove_CC()
|
||||
|
||||
/obj/effect/proc_holder/spell/ethereal_jaunt/proc/jaunt_steam(mobloc)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
item_state = "fleshtostone"
|
||||
|
||||
/obj/item/melee/touch_attack/mime_malaise/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || user.lying || user.handcuffed)
|
||||
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
owner.client?.pixel_y = py_diff
|
||||
|
||||
/datum/status_effect/transient/dizziness/calc_decay()
|
||||
return (-0.2 + (owner.resting ? -0.8 : 0)) SECONDS
|
||||
return (-0.2 + (IS_HORIZONTAL(owner) ? -0.8 : 0)) SECONDS
|
||||
|
||||
/**
|
||||
* # Drowsiness
|
||||
@@ -235,7 +235,7 @@
|
||||
owner.Paralyse(10 SECONDS)
|
||||
|
||||
/datum/status_effect/transient/drowsiness/calc_decay()
|
||||
return (-0.2 + (owner.resting ? -0.8 : 0)) SECONDS
|
||||
return (-0.2 + (IS_HORIZONTAL(owner) ? -0.8 : 0)) SECONDS
|
||||
|
||||
/**
|
||||
* # Drukenness
|
||||
@@ -371,32 +371,91 @@
|
||||
. = ..()
|
||||
if(. && (needs_update_stat || issilicon(owner)))
|
||||
owner.update_stat()
|
||||
owner.update_canmove()
|
||||
|
||||
|
||||
/datum/status_effect/incapacitating/on_remove()
|
||||
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
|
||||
if(needs_update_stat || issilicon(owner)) //silicons need stat updates
|
||||
owner.update_stat()
|
||||
owner.update_canmove()
|
||||
return ..()
|
||||
|
||||
//FLOORED - forces the victim prone.
|
||||
/datum/status_effect/incapacitating/floored
|
||||
id = "floored"
|
||||
|
||||
/datum/status_effect/incapacitating/floored/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_FLOORED, "[id]")
|
||||
|
||||
/datum/status_effect/incapacitating/floored/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_FLOORED, "[id]")
|
||||
return ..()
|
||||
|
||||
|
||||
//STUN - prevents movement and actions, victim stays standing
|
||||
/datum/status_effect/incapacitating/stun
|
||||
id = "stun"
|
||||
|
||||
/datum/status_effect/incapacitating/stun/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
ADD_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
|
||||
|
||||
/datum/status_effect/incapacitating/stun/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
REMOVE_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
|
||||
return ..()
|
||||
|
||||
//IMMOBILIZED - prevents movement, victim can still stand and act
|
||||
/datum/status_effect/incapacitating/immobilized
|
||||
id = "immobilized"
|
||||
|
||||
/datum/status_effect/incapacitating/immobilized/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
|
||||
/datum/status_effect/incapacitating/immobilized/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
return ..()
|
||||
|
||||
//WEAKENED - prevents movement and action, victim falls over
|
||||
/datum/status_effect/incapacitating/weakened
|
||||
id = "weakened"
|
||||
|
||||
/datum/status_effect/incapacitating/weakened/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
ADD_TRAIT(owner, TRAIT_FLOORED, "[id]")
|
||||
ADD_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
|
||||
|
||||
/datum/status_effect/incapacitating/weakened/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
REMOVE_TRAIT(owner, TRAIT_FLOORED, "[id]")
|
||||
REMOVE_TRAIT(owner, TRAIT_HANDS_BLOCKED, "[id]")
|
||||
return ..()
|
||||
|
||||
//PARALYZED - prevents movement and action, victim falls over, victim cannot hear or see.
|
||||
/datum/status_effect/incapacitating/paralyzed
|
||||
id = "paralyzed"
|
||||
needs_update_stat = TRUE
|
||||
|
||||
/datum/status_effect/incapacitating/paralyzed/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_KNOCKEDOUT, "[id]")
|
||||
|
||||
/datum/status_effect/incapacitating/paralyzed/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, "[id]")
|
||||
return ..()
|
||||
|
||||
//SLEEPING - victim falls over, cannot act, cannot see or hear, heals under certain conditions.
|
||||
/datum/status_effect/incapacitating/sleeping
|
||||
id = "sleeping"
|
||||
@@ -410,6 +469,16 @@
|
||||
..()
|
||||
src.voluntary = voluntary
|
||||
|
||||
/datum/status_effect/incapacitating/sleeping/on_apply()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, "[id]")
|
||||
|
||||
/datum/status_effect/incapacitating/sleeping/on_remove()
|
||||
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, "[id]")
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/incapacitating/sleeping/tick()
|
||||
if(!iscarbon(owner))
|
||||
return
|
||||
@@ -477,7 +546,7 @@
|
||||
owner.do_jitter_animation(strength / 20, 1)
|
||||
|
||||
/datum/status_effect/transient/jittery/calc_decay()
|
||||
return (-0.2 + (owner.resting ? -0.8 : 0)) SECONDS
|
||||
return (-0.2 + (IS_HORIZONTAL(owner) ? -0.8 : 0)) SECONDS
|
||||
|
||||
/datum/status_effect/transient/stammering
|
||||
id = "stammer"
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
|
||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||
owner.add_overlay(cube)
|
||||
owner.update_canmove()
|
||||
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/freon/tick()
|
||||
owner.update_canmove()
|
||||
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
|
||||
qdel(src)
|
||||
|
||||
@@ -30,15 +29,14 @@
|
||||
if(do_mob(owner, owner, 40))
|
||||
if(!QDELETED(src))
|
||||
to_chat(owner, "You break out of the ice cube!")
|
||||
owner.remove_status_effect(/datum/status_effect/freon)
|
||||
owner.update_canmove()
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/freon/on_remove()
|
||||
if(!owner.stat)
|
||||
to_chat(owner, "The cube melts!")
|
||||
owner.cut_overlay(cube)
|
||||
owner.adjust_bodytemperature(100)
|
||||
owner.update_canmove()
|
||||
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]")
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
|
||||
/datum/status_effect/freon/watcher
|
||||
|
||||
Reference in New Issue
Block a user