mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-01-02 21:25:24 +00:00
ports #44155 from /tg/station
This commit is contained in:
@@ -264,3 +264,6 @@
|
|||||||
#define BODYPART_LIFE_UPDATE_HEALTH (1<<0)
|
#define BODYPART_LIFE_UPDATE_HEALTH (1<<0)
|
||||||
|
|
||||||
#define HUMAN_FIRE_STACK_ICON_NUM 3
|
#define HUMAN_FIRE_STACK_ICON_NUM 3
|
||||||
|
|
||||||
|
#define PULL_PRONE_SLOWDOWN 1.5
|
||||||
|
#define HUMAN_CARRY_SLOWDOWN 0.35
|
||||||
@@ -31,3 +31,6 @@
|
|||||||
#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER"
|
#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER"
|
||||||
|
|
||||||
#define MOVESPEED_ID_SANITY "MOOD_SANITY"
|
#define MOVESPEED_ID_SANITY "MOOD_SANITY"
|
||||||
|
|
||||||
|
#define MOVESPEED_ID_PRONE_DRAGGING "PRONE_DRAG"
|
||||||
|
#define MOVESPEED_ID_HUMAN_CARRYING "HUMAN_CARRY"
|
||||||
@@ -1,108 +1,104 @@
|
|||||||
/datum/component/footstep
|
/datum/component/footstep
|
||||||
var/steps = 0
|
var/steps = 0
|
||||||
var/volume
|
var/volume
|
||||||
var/e_range
|
var/e_range
|
||||||
|
|
||||||
/datum/component/footstep/Initialize(volume_ = 0.5, e_range_ = -1)
|
/datum/component/footstep/Initialize(volume_ = 0.5, e_range_ = -1)
|
||||||
if(!isliving(parent))
|
if(!isliving(parent))
|
||||||
return COMPONENT_INCOMPATIBLE
|
return COMPONENT_INCOMPATIBLE
|
||||||
volume = volume_
|
volume = volume_
|
||||||
e_range = e_range_
|
e_range = e_range_
|
||||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/play_footstep)
|
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/play_footstep)
|
||||||
|
|
||||||
/datum/component/footstep/proc/play_footstep()
|
/datum/component/footstep/proc/play_footstep()
|
||||||
var/turf/open/T = get_turf(parent)
|
var/turf/open/T = get_turf(parent)
|
||||||
if(!istype(T))
|
if(!istype(T))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/mob/living/LM = parent
|
var/mob/living/LM = parent
|
||||||
var/v = volume
|
var/v = volume
|
||||||
var/e = e_range
|
var/e = e_range
|
||||||
if(!T.footstep || LM.buckled || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
|
if(!T.footstep || LM.buckled || LM.lying || !CHECK_MULTIPLE_BITFIELDS(LM.mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
|
||||||
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
|
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
|
||||||
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(HAS_TRAIT(LM, TRAIT_SILENT_STEP))
|
if(iscarbon(LM))
|
||||||
return
|
var/mob/living/carbon/C = LM
|
||||||
|
if(!C.get_bodypart(BODY_ZONE_L_LEG) && !C.get_bodypart(BODY_ZONE_R_LEG))
|
||||||
if(iscarbon(LM))
|
return
|
||||||
var/mob/living/carbon/C = LM
|
if(ishuman(C) && C.m_intent == MOVE_INTENT_WALK)
|
||||||
if(!C.get_bodypart(BODY_ZONE_L_LEG) && !C.get_bodypart(BODY_ZONE_R_LEG))
|
v /= 2
|
||||||
return
|
e -= 5
|
||||||
if(ishuman(C) && C.m_intent == MOVE_INTENT_WALK)
|
steps++
|
||||||
v /= 2
|
|
||||||
e -= 5
|
if(steps >= 6)
|
||||||
steps++
|
steps = 0
|
||||||
|
|
||||||
if(steps >= 3)
|
if(steps % 2)
|
||||||
steps = 0
|
return
|
||||||
|
|
||||||
else
|
if(!LM.has_gravity(T) && steps != 0) // don't need to step as often when you hop around
|
||||||
return
|
return
|
||||||
|
|
||||||
if(prob(80) && !LM.has_gravity(T)) // don't need to step as often when you hop around
|
//begin playsound shenanigans//
|
||||||
return
|
|
||||||
|
//for barefooted non-clawed mobs like monkeys
|
||||||
//begin playsound shenanigans//
|
if(isbarefoot(LM))
|
||||||
|
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||||
//for barefooted non-clawed mobs like monkeys
|
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||||
if(isbarefoot(LM))
|
TRUE,
|
||||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
GLOB.barefootstep[T.barefootstep][3] + e)
|
||||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
return
|
||||||
TRUE,
|
|
||||||
GLOB.barefootstep[T.barefootstep][3] + e)
|
//for xenomorphs, dogs, and other clawed mobs
|
||||||
return
|
if(isclawfoot(LM))
|
||||||
|
if(isalienadult(LM)) //xenos are stealthy and get quieter footsteps
|
||||||
//for xenomorphs, dogs, and other clawed mobs
|
v /= 3
|
||||||
if(isclawfoot(LM))
|
e -= 5
|
||||||
if(isalienadult(LM)) //xenos are stealthy and get quieter footsteps
|
|
||||||
v /= 3
|
playsound(T, pick(GLOB.clawfootstep[T.clawfootstep][1]),
|
||||||
e -= 5
|
GLOB.clawfootstep[T.clawfootstep][2] * v,
|
||||||
|
TRUE,
|
||||||
playsound(T, pick(GLOB.clawfootstep[T.clawfootstep][1]),
|
GLOB.clawfootstep[T.clawfootstep][3] + e)
|
||||||
GLOB.clawfootstep[T.clawfootstep][2] * v,
|
return
|
||||||
TRUE,
|
|
||||||
GLOB.clawfootstep[T.clawfootstep][3] + e)
|
//for megafauna and other large and imtimidating mobs such as the bloodminer
|
||||||
return
|
if(isheavyfoot(LM))
|
||||||
|
playsound(T, pick(GLOB.heavyfootstep[T.heavyfootstep][1]),
|
||||||
//for megafauna and other large and imtimidating mobs such as the bloodminer
|
GLOB.heavyfootstep[T.heavyfootstep][2] * v,
|
||||||
if(isheavyfoot(LM))
|
TRUE,
|
||||||
playsound(T, pick(GLOB.heavyfootstep[T.heavyfootstep][1]),
|
GLOB.heavyfootstep[T.heavyfootstep][3] + e)
|
||||||
GLOB.heavyfootstep[T.heavyfootstep][2] * v,
|
return
|
||||||
TRUE,
|
|
||||||
GLOB.heavyfootstep[T.heavyfootstep][3] + e)
|
//for slimes
|
||||||
return
|
if(isslime(LM))
|
||||||
|
playsound(T, 'sound/effects/footstep/slime1.ogg', 15 * v)
|
||||||
//for slimes
|
return
|
||||||
if(isslime(LM))
|
|
||||||
playsound(T, 'sound/effects/footstep/slime1.ogg', 15 * v)
|
//for (simple) humanoid mobs (clowns, russians, pirates, etc.)
|
||||||
return
|
if(isshoefoot(LM))
|
||||||
|
if(!ishuman(LM))
|
||||||
//for (simple) humanoid mobs (clowns, russians, pirates, etc.)
|
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||||
if(isshoefoot(LM))
|
GLOB.footstep[T.footstep][2] * v,
|
||||||
if(!ishuman(LM))
|
TRUE,
|
||||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
GLOB.footstep[T.footstep][3] + e)
|
||||||
GLOB.footstep[T.footstep][2] * v,
|
return
|
||||||
TRUE,
|
if(ishuman(LM)) //for proper humans, they're special
|
||||||
GLOB.footstep[T.footstep][3] + e)
|
var/mob/living/carbon/human/H = LM
|
||||||
return
|
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||||
if(ishuman(LM)) //for proper humans, they're special
|
|
||||||
var/mob/living/carbon/human/H = LM
|
if(H.shoes || feetCover) //are we wearing shoes
|
||||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||||
|
GLOB.footstep[T.footstep][2] * v,
|
||||||
if (H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle") //are we a naga or tentacle taur creature
|
TRUE,
|
||||||
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
GLOB.footstep[T.footstep][3] + e)
|
||||||
return
|
|
||||||
|
if((!H.shoes && !feetCover)) //are we NOT wearing shoes
|
||||||
if(H.shoes || feetCover) //are we wearing shoes
|
if(H.dna.species.special_step_sounds)
|
||||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE)
|
||||||
GLOB.footstep[T.footstep][2] * v,
|
else
|
||||||
TRUE,
|
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||||
GLOB.footstep[T.footstep][3] + e)
|
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||||
|
TRUE,
|
||||||
if((!H.shoes && !feetCover)) //are we NOT wearing shoes
|
GLOB.barefootstep[T.barefootstep][3] + e)
|
||||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
|
||||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
|
||||||
TRUE,
|
|
||||||
GLOB.barefootstep[T.barefootstep][3] + e)
|
|
||||||
@@ -195,21 +195,47 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
RegisterSignal(parent, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
|
RegisterSignal(parent, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
|
||||||
|
|
||||||
|
/datum/component/riding/human/vehicle_mob_unbuckle(datum/source, mob/living/M, force = FALSE)
|
||||||
|
var/mob/living/carbon/human/H = parent
|
||||||
|
H.remove_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING)
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/datum/component/riding/human/vehicle_mob_buckle(datum/source, mob/living/M, force = FALSE)
|
||||||
|
. = ..()
|
||||||
|
var/mob/living/carbon/human/H = parent
|
||||||
|
H.add_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING, multiplicative_slowdown = HUMAN_CARRY_SLOWDOWN)
|
||||||
|
|
||||||
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
|
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
|
||||||
var/mob/living/carbon/human/AM = parent
|
var/mob/living/carbon/human/H = parent
|
||||||
if(AM.a_intent == INTENT_DISARM && (target in AM.buckled_mobs))
|
if(H.a_intent == INTENT_DISARM && (target in H.buckled_mobs))
|
||||||
force_dismount(target)
|
force_dismount(target)
|
||||||
|
|
||||||
/datum/component/riding/human/handle_vehicle_layer()
|
/datum/component/riding/human/handle_vehicle_layer()
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
if(AM.buckled_mobs && AM.buckled_mobs.len)
|
if(AM.buckled_mobs && AM.buckled_mobs.len)
|
||||||
if(AM.dir == SOUTH)
|
for(var/mob/M in AM.buckled_mobs) //ensure proper layering of piggyback and carry, sometimes weird offsets get applied
|
||||||
AM.layer = ABOVE_MOB_LAYER
|
M.layer = MOB_LAYER
|
||||||
|
if(!AM.buckle_lying)
|
||||||
|
if(AM.dir == SOUTH)
|
||||||
|
AM.layer = ABOVE_MOB_LAYER
|
||||||
|
else
|
||||||
|
AM.layer = OBJ_LAYER
|
||||||
else
|
else
|
||||||
AM.layer = OBJ_LAYER
|
if(AM.dir == NORTH)
|
||||||
|
AM.layer = OBJ_LAYER
|
||||||
|
else
|
||||||
|
AM.layer = ABOVE_MOB_LAYER
|
||||||
else
|
else
|
||||||
AM.layer = MOB_LAYER
|
AM.layer = MOB_LAYER
|
||||||
|
|
||||||
|
/datum/component/riding/human/get_offsets(pass_index)
|
||||||
|
var/mob/living/carbon/human/H = parent
|
||||||
|
if(H.buckle_lying)
|
||||||
|
return list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(0, 6), TEXT_WEST = list(0, 6))
|
||||||
|
else
|
||||||
|
return list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(-6, 4), TEXT_WEST = list( 6, 4))
|
||||||
|
|
||||||
|
|
||||||
/datum/component/riding/human/force_dismount(mob/living/user)
|
/datum/component/riding/human/force_dismount(mob/living/user)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
AM.unbuckle_mob(user)
|
AM.unbuckle_mob(user)
|
||||||
@@ -273,12 +299,15 @@
|
|||||||
M.throw_at(target, 14, 5, AM)
|
M.throw_at(target, 14, 5, AM)
|
||||||
M.Knockdown(60)
|
M.Knockdown(60)
|
||||||
|
|
||||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
|
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, riding_target_override = null)
|
||||||
var/atom/movable/AM = parent
|
var/atom/movable/AM = parent
|
||||||
var/amount_equipped = 0
|
var/amount_equipped = 0
|
||||||
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
||||||
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
||||||
inhand.rider = user
|
if(!riding_target_override)
|
||||||
|
inhand.rider = user
|
||||||
|
else
|
||||||
|
inhand.rider = riding_target_override
|
||||||
inhand.parent = AM
|
inhand.parent = AM
|
||||||
if(user.put_in_hands(inhand, TRUE))
|
if(user.put_in_hands(inhand, TRUE))
|
||||||
amount_equipped++
|
amount_equipped++
|
||||||
@@ -318,7 +347,7 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/item/riding_offhand/equipped()
|
/obj/item/riding_offhand/equipped()
|
||||||
if(loc != rider)
|
if(loc != rider && loc != parent)
|
||||||
selfdeleting = TRUE
|
selfdeleting = TRUE
|
||||||
qdel(src)
|
qdel(src)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -115,6 +115,9 @@
|
|||||||
log_combat(user, pushed_mob, "placed")
|
log_combat(user, pushed_mob, "placed")
|
||||||
|
|
||||||
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||||
|
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||||
|
to_chat(user, "<span class='danger'>Throwing [pushed_mob] onto the table might hurt them!</span>")
|
||||||
|
return
|
||||||
var/added_passtable = FALSE
|
var/added_passtable = FALSE
|
||||||
if(!pushed_mob.pass_flags & PASSTABLE)
|
if(!pushed_mob.pass_flags & PASSTABLE)
|
||||||
added_passtable = TRUE
|
added_passtable = TRUE
|
||||||
@@ -125,9 +128,9 @@
|
|||||||
if(pushed_mob.loc != loc) //Something prevented the tabling
|
if(pushed_mob.loc != loc) //Something prevented the tabling
|
||||||
return
|
return
|
||||||
pushed_mob.Knockdown(40)
|
pushed_mob.Knockdown(40)
|
||||||
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
|
pushed_mob.visible_message("<span class='danger'>[user] slams [pushed_mob] onto [src]!</span>", \
|
||||||
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
|
"<span class='userdanger'>[user] slams you onto [src]!</span>")
|
||||||
log_combat(user, pushed_mob, "pushed")
|
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
|
||||||
if(!ishuman(pushed_mob))
|
if(!ishuman(pushed_mob))
|
||||||
return
|
return
|
||||||
var/mob/living/carbon/human/H = pushed_mob
|
var/mob/living/carbon/human/H = pushed_mob
|
||||||
|
|||||||
@@ -854,52 +854,83 @@
|
|||||||
.["Copy outfit"] = "?_src_=vars;[HrefToken()];copyoutfit=[REF(src)]"
|
.["Copy outfit"] = "?_src_=vars;[HrefToken()];copyoutfit=[REF(src)]"
|
||||||
|
|
||||||
/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
|
/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
|
||||||
//If they dragged themselves and we're currently aggressively grabbing them try to piggyback
|
if(pulling == target && grab_state >= GRAB_AGGRESSIVE && stat == CONSCIOUS)
|
||||||
if(user == target && can_piggyback(target) && pulling == target && (HAS_TRAIT(src, TRAIT_PACIFISM) || grab_state >= GRAB_AGGRESSIVE) && stat == CONSCIOUS)
|
//If they dragged themselves and we're currently aggressively grabbing them try to piggyback
|
||||||
buckle_mob(target,TRUE,TRUE)
|
if(user == target && can_piggyback(target))
|
||||||
|
piggyback(target)
|
||||||
|
return
|
||||||
|
//If you dragged them to you and you're aggressively grabbing try to fireman carry them
|
||||||
|
else if(user != target && can_be_firemanned(target))
|
||||||
|
fireman_carry(target)
|
||||||
|
return
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/piggyback_instant(mob/living/M)
|
//src is the user that will be carrying, target is the mob to be carried
|
||||||
return buckle_mob(M, TRUE, TRUE, FALSE, TRUE)
|
/mob/living/carbon/human/proc/can_piggyback(mob/living/carbon/target)
|
||||||
|
return (istype(target) && target.stat == CONSCIOUS)
|
||||||
|
|
||||||
//Can C try to piggyback at all.
|
/mob/living/carbon/human/proc/can_be_firemanned(mob/living/carbon/target)
|
||||||
/mob/living/carbon/human/proc/can_piggyback(mob/living/carbon/C)
|
return (ishuman(target) && !(target.mobility_flags & MOBILITY_STAND))
|
||||||
if(istype(C) && C.stat == CONSCIOUS)
|
|
||||||
return TRUE
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, bypass_piggybacking = FALSE, no_delay = FALSE)
|
/mob/living/carbon/human/proc/fireman_carry(mob/living/carbon/target)
|
||||||
|
if(can_be_firemanned(target))
|
||||||
|
visible_message("<span class='notice'>[src] starts lifting [target] onto their back...</span>",
|
||||||
|
"<span class='notice'>You start lifting [target] onto your back...</span>")
|
||||||
|
if(do_after(src, 50, TRUE, target))
|
||||||
|
//Second check to make sure they're still valid to be carried
|
||||||
|
if(can_be_firemanned(target) && !incapacitated(FALSE, TRUE))
|
||||||
|
buckle_mob(target, TRUE, TRUE, 90, 1, 0)
|
||||||
|
return
|
||||||
|
visible_message("<span class='warning'>[src] fails to fireman carry [target]!")
|
||||||
|
else
|
||||||
|
to_chat(src, "<span class='notice'>You can't fireman carry [target] while they're standing!</span>")
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/piggyback(mob/living/carbon/target)
|
||||||
|
if(can_piggyback(target))
|
||||||
|
visible_message("<span class='notice'>[target] starts to climb onto [src]...</span>")
|
||||||
|
if(do_after(target, 15, target = src))
|
||||||
|
if(can_piggyback(target))
|
||||||
|
if(target.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
|
||||||
|
target.visible_message("<span class='warning'>[target] can't hang onto [src]!</span>")
|
||||||
|
return
|
||||||
|
buckle_mob(target, TRUE, TRUE, FALSE, 0, 2)
|
||||||
|
else
|
||||||
|
visible_message("<span class='warning'>[target] fails to climb onto [src]!</span>")
|
||||||
|
else
|
||||||
|
to_chat(target, "<span class='warning'>You can't piggyback ride [src] right now!</span>")
|
||||||
|
|
||||||
|
/mob/living/carbon/human/buckle_mob(mob/living/target, force = FALSE, check_loc = TRUE, lying_buckle = FALSE, hands_needed = 0, target_hands_needed = 0)
|
||||||
if(!force)//humans are only meant to be ridden through piggybacking and special cases
|
if(!force)//humans are only meant to be ridden through piggybacking and special cases
|
||||||
return
|
return
|
||||||
if(bypass_piggybacking)
|
if(!is_type_in_typecache(target, can_ride_typecache))
|
||||||
return ..()
|
target.visible_message("<span class='warning'>[target] really can't seem to mount [src]...</span>")
|
||||||
if(!is_type_in_typecache(M, can_ride_typecache))
|
|
||||||
M.visible_message("<span class='warning'>[M] really can't seem to mount [src]...</span>")
|
|
||||||
return
|
return
|
||||||
|
buckle_lying = lying_buckle
|
||||||
var/datum/component/riding/human/riding_datum = LoadComponent(/datum/component/riding/human)
|
var/datum/component/riding/human/riding_datum = LoadComponent(/datum/component/riding/human)
|
||||||
riding_datum.ride_check_rider_incapacitated = TRUE
|
if(target_hands_needed)
|
||||||
riding_datum.ride_check_rider_restrained = TRUE
|
riding_datum.ride_check_rider_restrained = TRUE
|
||||||
riding_datum.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(-6, 4), TEXT_WEST = list( 6, 4)))
|
if(buckled_mobs && ((target in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)) || buckled)
|
||||||
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)) || buckled || (M.stat != CONSCIOUS))
|
|
||||||
return
|
return
|
||||||
if(can_piggyback(M))
|
var/equipped_hands_self
|
||||||
riding_datum.ride_check_ridden_incapacitated = TRUE
|
var/equipped_hands_target
|
||||||
visible_message("<span class='notice'>[M] starts to climb onto [src]...</span>")
|
if(hands_needed)
|
||||||
if(no_delay || do_after(M, 15, target = src))
|
equipped_hands_self = riding_datum.equip_buckle_inhands(src, hands_needed, target)
|
||||||
if(can_piggyback(M))
|
if(target_hands_needed)
|
||||||
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
|
equipped_hands_target = riding_datum.equip_buckle_inhands(target, target_hands_needed)
|
||||||
M.visible_message("<span class='warning'>[M] can't hang onto [src]!</span>")
|
|
||||||
return
|
if(hands_needed || target_hands_needed)
|
||||||
if(!riding_datum.equip_buckle_inhands(M, 2)) //MAKE SURE THIS IS LAST!!
|
if(hands_needed && !equipped_hands_self)
|
||||||
M.visible_message("<span class='warning'>[M] can't climb onto [src]!</span>")
|
src.visible_message("<span class='warning'>[src] can't get a grip on [target] because their hands are full!</span>",
|
||||||
return
|
"<span class='warning'>You can't get a grip on [target] because your hands are full!</span>")
|
||||||
. = ..(M, force, check_loc)
|
return
|
||||||
stop_pulling()
|
else if(target_hands_needed && !equipped_hands_target)
|
||||||
else
|
target.visible_message("<span class='warning'>[target] can't get a grip on [src] because their hands are full!</span>",
|
||||||
visible_message("<span class='warning'>[M] fails to climb onto [src]!</span>")
|
"<span class='warning'>You can't get a grip on [src] because your hands are full!</span>")
|
||||||
else
|
return
|
||||||
. = ..(M,force,check_loc)
|
|
||||||
stop_pulling()
|
stop_pulling()
|
||||||
|
riding_datum.handle_vehicle_layer()
|
||||||
|
. = ..(target, force, check_loc)
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/is_shove_knockdown_blocked() //If you want to add more things that block shove knockdown, extend this
|
/mob/living/carbon/human/proc/is_shove_knockdown_blocked() //If you want to add more things that block shove knockdown, extend this
|
||||||
for(var/obj/item/clothing/C in get_equipped_items()) //doesn't include pockets
|
for(var/obj/item/clothing/C in get_equipped_items()) //doesn't include pockets
|
||||||
|
|||||||
@@ -286,6 +286,8 @@
|
|||||||
var/mob/living/carbon/C = L
|
var/mob/living/carbon/C = L
|
||||||
if(HAS_TRAIT(src, TRAIT_STRONG_GRABBER))
|
if(HAS_TRAIT(src, TRAIT_STRONG_GRABBER))
|
||||||
C.grippedby(src)
|
C.grippedby(src)
|
||||||
|
|
||||||
|
update_pull_movespeed()
|
||||||
|
|
||||||
//mob verbs are a lot faster than object verbs
|
//mob verbs are a lot faster than object verbs
|
||||||
//for more info on why this is not atom/pull, see examinate() in mob.dm
|
//for more info on why this is not atom/pull, see examinate() in mob.dm
|
||||||
@@ -300,6 +302,7 @@
|
|||||||
|
|
||||||
/mob/living/stop_pulling()
|
/mob/living/stop_pulling()
|
||||||
..()
|
..()
|
||||||
|
update_pull_movespeed()
|
||||||
update_pull_hud_icon()
|
update_pull_hud_icon()
|
||||||
|
|
||||||
/mob/living/verb/stop_pulling1()
|
/mob/living/verb/stop_pulling1()
|
||||||
@@ -520,6 +523,10 @@
|
|||||||
|
|
||||||
var/old_direction = dir
|
var/old_direction = dir
|
||||||
var/turf/T = loc
|
var/turf/T = loc
|
||||||
|
|
||||||
|
if(pulling)
|
||||||
|
update_pull_movespeed()
|
||||||
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
|
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
if(user.grab_state >= GRAB_AGGRESSIVE && HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||||
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
|
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
@@ -184,11 +184,17 @@
|
|||||||
user.grab_state++
|
user.grab_state++
|
||||||
switch(user.grab_state)
|
switch(user.grab_state)
|
||||||
if(GRAB_AGGRESSIVE)
|
if(GRAB_AGGRESSIVE)
|
||||||
log_combat(user, src, "grabbed", addition="aggressive grab")
|
var/add_log = ""
|
||||||
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
|
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||||
"<span class='userdanger'>[user] has grabbed [src] aggressively!</span>")
|
visible_message("<span class='danger'>[user] has firmly gripped [src]!</span>",
|
||||||
drop_all_held_items()
|
"<span class='danger'>[user] has firmly gripped you!</span>")
|
||||||
|
add_log = " (pacifist)"
|
||||||
|
else
|
||||||
|
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
|
||||||
|
"<span class='userdanger'>[user] has grabbed you aggressively!</span>")
|
||||||
|
drop_all_held_items()
|
||||||
stop_pulling()
|
stop_pulling()
|
||||||
|
log_combat(user, src, "grabbed", addition="aggressive grab[add_log]")
|
||||||
if(GRAB_NECK)
|
if(GRAB_NECK)
|
||||||
log_combat(user, src, "grabbed", addition="neck grab")
|
log_combat(user, src, "grabbed", addition="neck grab")
|
||||||
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
|
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
|
||||||
|
|||||||
@@ -110,3 +110,5 @@
|
|||||||
//List of active diseases
|
//List of active diseases
|
||||||
var/list/diseases = list() // list of all diseases in a mob
|
var/list/diseases = list() // list of all diseases in a mob
|
||||||
var/list/disease_resistances = list()
|
var/list/disease_resistances = list()
|
||||||
|
|
||||||
|
var/drag_slowdown = TRUE //Whether the mob is slowed down when dragging another prone mob
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
/mob/living/Moved()
|
/mob/living/Moved()
|
||||||
. = ..()
|
. = ..()
|
||||||
update_turf_movespeed(loc)
|
update_turf_movespeed(loc)
|
||||||
@@ -25,3 +26,11 @@
|
|||||||
add_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = T.slowdown)
|
add_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = T.slowdown)
|
||||||
else
|
else
|
||||||
remove_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD)
|
remove_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD)
|
||||||
|
|
||||||
|
/mob/living/proc/update_pull_movespeed()
|
||||||
|
if(pulling && isliving(pulling))
|
||||||
|
var/mob/living/L = pulling
|
||||||
|
if(drag_slowdown && !(L.mobility_flags & MOBILITY_STAND) && !L.buckled && grab_state < GRAB_AGGRESSIVE)
|
||||||
|
add_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING, multiplicative_slowdown = PULL_PRONE_SLOWDOWN)
|
||||||
|
return
|
||||||
|
remove_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING)
|
||||||
@@ -1207,14 +1207,15 @@
|
|||||||
return
|
return
|
||||||
if(incapacitated())
|
if(incapacitated())
|
||||||
return
|
return
|
||||||
if(M.incapacitated())
|
|
||||||
return
|
|
||||||
if(module)
|
if(module)
|
||||||
if(!module.allow_riding)
|
if(!module.allow_riding)
|
||||||
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
|
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
|
||||||
return
|
return
|
||||||
if(iscarbon(M) && (!riding_datum.equip_buckle_inhands(M, 1)))
|
if(iscarbon(M) && !M.incapacitated() && !riding_datum.equip_buckle_inhands(M, 1))
|
||||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_their()] hands are full!</span>")
|
if(M.get_num_arms() <= 0)
|
||||||
|
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_they()] don't have any usable arms!</span>")
|
||||||
|
else
|
||||||
|
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_their()] hands are full!</span>")
|
||||||
return
|
return
|
||||||
. = ..(M, force, check_loc)
|
. = ..(M, force, check_loc)
|
||||||
|
|
||||||
|
|||||||
@@ -524,7 +524,12 @@
|
|||||||
return
|
return
|
||||||
if(isAI(M))
|
if(isAI(M))
|
||||||
return
|
return
|
||||||
show_inv(usr)
|
|
||||||
|
/mob/MouseDrop_T(atom/dropping, atom/user)
|
||||||
|
. = ..()
|
||||||
|
if(ismob(dropping) && dropping != user)
|
||||||
|
var/mob/M = dropping
|
||||||
|
M.show_inv(user)
|
||||||
|
|
||||||
/mob/proc/is_muzzled()
|
/mob/proc/is_muzzled()
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user