mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Removes magic numbers and an useless check
- it shouldn’t runtime.
This commit is contained in:
@@ -846,7 +846,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(5, 2, src, 1)
|
||||
M.slip(5, 2, src)
|
||||
|
||||
|
||||
/datum/effect/effect/system/foam_spread
|
||||
|
||||
@@ -961,7 +961,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/clown/Crossed(AM as mob|obj) //Clown PDA is slippery.
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
if(M.slip(8, 5, src))
|
||||
if(M.slip(8, 5, src, NO_SLIP_WHEN_WALKING))
|
||||
if (ishuman(M) && (M.real_name != src.owner))
|
||||
if (istype(src.cartridge, /obj/item/weapon/cartridge/clown))
|
||||
var/obj/item/weapon/cartridge/clown/cart = src.cartridge
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/weapon/bananapeel/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(4, 2, src, 1)
|
||||
M.slip(4, 2, src)
|
||||
|
||||
|
||||
/*
|
||||
@@ -20,7 +20,7 @@
|
||||
/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/living/carbon/M = AM
|
||||
M.slip(3, 2, src, 1)
|
||||
M.slip(3, 2, src)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
@@ -55,12 +55,12 @@
|
||||
|
||||
switch (src.wet)
|
||||
if(1) //wet floor
|
||||
if(!M.slip(8, 5, null, 2))
|
||||
if(!M.slip(8, 5, null, (NO_SLIP_WHEN_WALKING|STEP)))
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
|
||||
if(2) //lube
|
||||
M.slip(0, 10, null, 3)
|
||||
M.slip(0, 10, null, (STEP|SLIDE|GALOSHES_DONT_HELP))
|
||||
|
||||
|
||||
..()
|
||||
@@ -548,24 +548,21 @@
|
||||
return "trails_1"
|
||||
return "trails_2"
|
||||
|
||||
/*
|
||||
* 0)clown pda == no slip when walking, lube=0
|
||||
* 1)banana peels, soap and foam == slip when walking, lube=1
|
||||
* 2)Wet floor == no slip when walking, take a step, lube=2
|
||||
* 3)Lube == always slips, sliding effect, lube=3
|
||||
*/
|
||||
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==0 || lube==2))
|
||||
if (m_intent=="walk" && (lube&NO_SLIP_WHEN_WALKING))
|
||||
return 0
|
||||
if(!lying)
|
||||
stop_pulling()
|
||||
if(lube==2 || lube==3)
|
||||
if(lube&STEP)
|
||||
step(src, src.dir)
|
||||
if(lube==3)
|
||||
if(lube&SLIDE)
|
||||
for(var/i=1, i<5, i++)
|
||||
spawn (i)
|
||||
if(src)
|
||||
step(src, src.dir)
|
||||
step(src, src.dir)
|
||||
take_organ_damage(2)
|
||||
if(O)
|
||||
src << "<span class='notice'>You slipped on the [O.name]!</span>"
|
||||
|
||||
@@ -67,6 +67,6 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/slip(var/s_amount, var/w_amount, var/obj/O, var/lube)
|
||||
if(isobj(src.shoes) && src.shoes.flags&NOSLIP && lube!=3)
|
||||
if(isobj(shoes) && (shoes.flags&NOSLIP) && !(lube&GALOSHES_DONT_HELP))
|
||||
return 0
|
||||
.=..()
|
||||
Reference in New Issue
Block a user