mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Merge pull request #2066 from Perakp/slipFix4
No slipping when lying down
This commit is contained in:
@@ -547,3 +547,29 @@
|
||||
else if(prob(50))
|
||||
return "trails_1"
|
||||
return "trails_2"
|
||||
|
||||
var/const/NO_SLIP_WHEN_WALKING = 1
|
||||
var/const/STEP = 2
|
||||
var/const/SLIDE = 4
|
||||
var/const/GALOSHES_DONT_HELP = 8
|
||||
/mob/living/carbon/slip(var/s_amount, var/w_amount, var/obj/O, var/lube)
|
||||
if (m_intent=="walk" && (lube&NO_SLIP_WHEN_WALKING))
|
||||
return 0
|
||||
if(!lying)
|
||||
stop_pulling()
|
||||
if(lube&STEP)
|
||||
step(src, src.dir)
|
||||
if(lube&SLIDE)
|
||||
for(var/i=1, i<5, i++)
|
||||
spawn (i)
|
||||
step(src, src.dir)
|
||||
take_organ_damage(2)
|
||||
if(O)
|
||||
src << "<span class='notice'>You slipped on the [O.name]!</span>"
|
||||
else
|
||||
src << "<span class='notice'>You slipped!</span>"
|
||||
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
Stun(s_amount)
|
||||
Weaken(w_amount)
|
||||
return 1
|
||||
return 0 // no success. Used in clown pda and wet floors
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
if(shoes)
|
||||
tally += shoes.slowdown
|
||||
|
||||
|
||||
if(back)
|
||||
tally += back.slowdown
|
||||
|
||||
@@ -64,3 +64,9 @@
|
||||
|
||||
prob_slip = round(prob_slip)
|
||||
return(prob_slip)
|
||||
|
||||
|
||||
/mob/living/carbon/human/slip(var/s_amount, var/w_amount, var/obj/O, var/lube)
|
||||
if(isobj(shoes) && (shoes.flags&NOSLIP) && !(lube&GALOSHES_DONT_HELP))
|
||||
return 0
|
||||
.=..()
|
||||
@@ -964,6 +964,12 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
/mob/living/carbon/slime/getTrail()
|
||||
return null
|
||||
|
||||
/mob/living/carbon/slime/slip(var/s_amount, var/w_amount, var/obj/O, var/lube)
|
||||
if(lube>=2)
|
||||
return 0
|
||||
.=..()
|
||||
|
||||
|
||||
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
|
||||
|
||||
/*
|
||||
|
||||
@@ -442,4 +442,7 @@
|
||||
M.start_pulling(t)
|
||||
else
|
||||
step(pulling, get_dir(pulling.loc, A))
|
||||
return
|
||||
return
|
||||
|
||||
/mob/proc/slip(var/s_amount, var/w_amount, var/obj/O, var/lube)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user