Merge branch 'master' into master

This commit is contained in:
Thalpy
2019-06-17 12:18:40 +01:00
committed by GitHub
121 changed files with 3642 additions and 904 deletions
@@ -48,18 +48,27 @@
if(affecting && affecting.dismemberable && affecting.get_damage() >= (affecting.max_damage - P.dismemberment))
affecting.dismember(P.damtype)
/mob/living/carbon/proc/can_catch_item(skip_throw_mode_check)
. = FALSE
if(!skip_throw_mode_check && !in_throw_mode)
return
if(get_active_held_item())
return
if(restrained())
return
return TRUE
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE)
if(!skipcatch) //ugly, but easy
if(in_throw_mode && !get_active_held_item()) //empty active hand and we're in throw mode
if(canmove && !restrained())
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(isturf(I.loc))
I.attack_hand(src)
if(get_active_held_item() == I) //if our attack_hand() picks up the item...
visible_message("<span class='warning'>[src] catches [I]!</span>") //catch that sucker!
throw_mode_off()
return 1
if(can_catch_item())
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(isturf(I.loc))
I.attack_hand(src)
if(get_active_held_item() == I) //if our attack_hand() picks up the item...
visible_message("<span class='warning'>[src] catches [I]!</span>") //catch that sucker!
throw_mode_off()
return 1
..()
@@ -851,7 +851,7 @@
/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(user == target && can_piggyback(target) && 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)
buckle_mob(target,TRUE,TRUE)
. = ..()
@@ -861,9 +861,11 @@
return TRUE
return FALSE
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, bypass_piggybacking = FALSE)
if(!force)//humans are only meant to be ridden through piggybacking and special cases
return
if(bypass_piggybacking)
return ..()
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
@@ -876,7 +878,7 @@
if(can_piggyback(M))
riding_datum.ride_check_ridden_incapacitated = TRUE
visible_message("<span class='notice'>[M] starts to climb onto [src]...</span>")
if(do_after(M, 15, target = src))
if(force || do_after(M, 15, target = src))
if(can_piggyback(M))
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
M.visible_message("<span class='warning'>[M] can't hang onto [src]!</span>")
@@ -502,10 +502,13 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else
standing += mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER)
if(H.socks && H.get_num_legs(FALSE) >= 2 && !(DIGITIGRADE in species_traits))
if(H.socks && H.get_num_legs(FALSE) >= 2)
var/datum/sprite_accessory/socks/socks = GLOB.socks_list[H.socks]
if(socks)
standing += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER)
if(DIGITIGRADE in species_traits)
standing += mutable_appearance(socks.icon, socks.icon_state + "_d", -BODY_LAYER)
else
standing += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER)
if(standing.len)
H.overlays_standing[BODY_LAYER] = standing
+10 -3
View File
@@ -1189,9 +1189,13 @@
clamp_unconscious_to = 0,
clamp_immobility_to = 0,
reset_misc = TRUE,
healing_chems = list("inaprovaline" = 3, "synaptizine" = 10, "omnizine" = 10, "stimulants" = 10),
message = "<span class='boldnotice'>You feel a surge of energy!</span>"
healing_chems = list("inaprovaline" = 3, "synaptizine" = 10, "regen_jelly" = 10, "stimulants" = 10),
message = "<span class='boldnotice'>You feel a surge of energy!</span>",
stamina_buffer_boost = 0, //restores stamina buffer rather than just health
scale_stamina_loss_recovery, //defaults to null. if this is set, restores loss * this stamina. make sure it's a fraction.
stamina_loss_recovery_bypass = 0 //amount of stamina loss to ignore during calculation
)
to_chat(src, message)
if(AmountSleeping() > clamp_unconscious_to)
SetSleeping(clamp_unconscious_to)
if(AmountUnconscious() > clamp_unconscious_to)
@@ -1200,7 +1204,10 @@
SetStun(clamp_immobility_to)
if(AmountKnockdown() > clamp_immobility_to)
SetKnockdown(clamp_immobility_to)
adjustStaminaLoss(max(0, -stamina_boost))
adjustStaminaLoss(min(0, -stamina_boost))
adjustStaminaLossBuffered(min(0, -stamina_buffer_boost))
if(scale_stamina_loss_recovery)
adjustStaminaLoss(min(-((getStaminaLoss() - stamina_loss_recovery_bypass) * scale_stamina_loss_recovery), 0))
if(put_on_feet)
resting = FALSE
lying = FALSE
@@ -348,7 +348,7 @@
if(vore_active)
if(isliving(target))
var/mob/living/L = target
if(L.Adjacent(src) && L.devourable) // aggressive check to ensure vore attacks can be made
if(!client && L.Adjacent(src) && L.devourable) // aggressive check to ensure vore attacks can be made
if(prob(voracious_chance))
vore_attack(src,L,src)
else