TG Flying+Floating Refactor

This commit is contained in:
Fox McCloud
2020-06-26 21:53:38 -04:00
parent 5a6a0a20af
commit 92e3951efa
30 changed files with 62 additions and 53 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
if(!(flags & CALTROP_BYPASS_SHOES) && (H.shoes || feetCover))
return
if((H.flying) || H.buckled)
if(H.flying || H.floating || H.buckled)
return
var/damage = rand(min_damage, max_damage)
+1 -1
View File
@@ -51,6 +51,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) && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
var/atom/movable/owner = parent
owner.after_slip(victim)
+8
View File
@@ -67,6 +67,14 @@
var/obj/item/projectile/P = AM
if(P.original != parent)
return
if(ismob(AM))
var/mob/M = AM
if(M.flying)
return
if(isliving(AM))
var/mob/living/L = M
if(L.floating)
return
var/atom/current_parent = parent
if(isturf(current_parent.loc))
play_squeak()
@@ -35,6 +35,8 @@
return
if(!L.client) //Only sentient people are going along with it!
return
if(L.flying)
return
L.adjustFireLoss(3)
/datum/weather/floor_is_lava/fake