mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge pull request #3502 from VampyrBytes/cleanSlips
Cleans up slipping code
This commit is contained in:
@@ -22,36 +22,16 @@
|
||||
|
||||
/obj/item/weapon/bananapeel/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP)
|
||||
return
|
||||
if(M.flying)
|
||||
return
|
||||
|
||||
M.stop_pulling()
|
||||
M << "\blue You slipped on the [name]!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(4)
|
||||
M.Weaken(2)
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip("banana peel", 4, 2)
|
||||
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
|
||||
return
|
||||
if(M.flying)
|
||||
return
|
||||
|
||||
M.stop_pulling()
|
||||
M << "\blue You slipped on the [name]!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(4)
|
||||
M.Weaken(2)
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip("soap", 4, 2)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
|
||||
Crossed(AM as mob|obj)
|
||||
var/burned = rand(2,5)
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
if(ishuman(M))
|
||||
if(isobj(M:shoes))
|
||||
if((M:shoes.flags&NOSLIP) || (M:species.bodyflags & FEET_NOSLIP))
|
||||
@@ -73,16 +73,8 @@
|
||||
M.take_overall_damage(0, max(0, (burned - 2)))
|
||||
|
||||
if(!istype(M, /mob/living/carbon/slime) && !isrobot(M))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
spawn(1) step(M, M.dir)
|
||||
spawn(2) step(M, M.dir)
|
||||
spawn(3) step(M, M.dir)
|
||||
spawn(4) step(M, M.dir)
|
||||
M.slip("banana peel!", 0, 7, 4)
|
||||
M.take_organ_damage(2) // Was 5 -- TLE
|
||||
M << "\blue You slipped on \the [name]!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Weaken(7)
|
||||
M.take_overall_damage(0, burned)
|
||||
|
||||
throw_impact(atom/hit_atom)
|
||||
|
||||
Reference in New Issue
Block a user