mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Minor slip() refactor to use slip_dist argument consistently and avoid sleeping in Entered().
This commit is contained in:
@@ -139,13 +139,7 @@
|
||||
slip_dist = 2
|
||||
|
||||
|
||||
if(M.slip("the [floor_type] floor", slip_stun))
|
||||
for(var/i = 1 to slip_dist)
|
||||
if(isbelly(M.loc)) //VOREEdit, Stop the slip if we're in a belly. Inspired by a chompedit, cleaned it up with isbelly instead of a variable since the var was resetting too fast.
|
||||
return
|
||||
step(M, M.dir)
|
||||
sleep(1)
|
||||
else
|
||||
if(!M.slip("the [floor_type] floor", slip_stun, slip_dist))
|
||||
M.inertia_dir = 0
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
|
||||
@@ -415,11 +415,11 @@
|
||||
/mob/living/carbon/cannot_use_vents()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slip(var/slipped_on, var/stun_duration = 8, var/slip_dist = 1)
|
||||
if(buckled)
|
||||
/mob/living/carbon/slip(slipped_on, stun_duration = 8, slip_dist = 1)
|
||||
if(buckled || isbelly(loc))
|
||||
return FALSE
|
||||
stop_pulling()
|
||||
to_chat(src, "<span class='warning'>You slipped on [slipped_on]!</span>")
|
||||
to_chat(src, SPAN_WARNING("You slipped on [slipped_on]!"))
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
Weaken(FLOOR(stun_duration/2, 1))
|
||||
slide_for(slip_dist)
|
||||
|
||||
@@ -1325,7 +1325,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/slip(var/slipped_on, stun_duration=8)
|
||||
/mob/living/carbon/human/slip(slipped_on, stun_duration = 8, slip_dist = 1)
|
||||
var/list/equipment = list(src.w_uniform,src.wear_suit,src.shoes)
|
||||
var/footcoverage_check = FALSE
|
||||
for(var/obj/item/clothing/C in equipment)
|
||||
@@ -1334,8 +1334,7 @@
|
||||
break
|
||||
if((species.flags & NO_SLIP && !footcoverage_check) || (shoes && (shoes.item_flags & NOSLIP))) //Footwear negates a species' natural traction.
|
||||
return FALSE
|
||||
if(..(slipped_on,stun_duration))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/proc/relocate()
|
||||
set category = "Object"
|
||||
|
||||
@@ -725,7 +725,7 @@
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
|
||||
/mob/living/proc/slip(slipped_on, stun_duration = 8, slip_dist = 1)
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
|
||||
|
||||
Reference in New Issue
Block a user