Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/datums/components/slippery.dm
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/datum/component/slippery
var/force_drop_items = FALSE
var/knockdown_time = 0
var/paralyze_time = 0
var/stun_time = 0
var/lube_flags
var/datum/callback/callback

/datum/component/slippery/Initialize(_knockdown, _lube_flags = NONE, datum/callback/_callback, _paralyze, _force_drop = FALSE)
/datum/component/slippery/Initialize(_knockdown, _lube_flags = NONE, datum/callback/_callback, _stun, _force_drop = FALSE)
knockdown_time = max(_knockdown, 0)
paralyze_time = max(_paralyze, 0)
stun_time = max(_stun, 0)
force_drop_items = _force_drop
lube_flags = _lube_flags
callback = _callback
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), .proc/Slip)

/datum/component/slippery/proc/Slip(datum/source, atom/movable/AM)
var/mob/victim = AM
if(istype(victim) && !victim.is_flying() && victim.slip(knockdown_time, parent, lube_flags, paralyze_time, force_drop_items) && callback)
if(istype(victim) && !victim.is_flying() && victim.slip(knockdown_time, parent, lube_flags, stun_time, force_drop_items) && callback)
callback.Invoke(victim)
2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
step(AM, turn(AM.dir, 180))

///Handle the atom being slipped over
/atom/proc/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube, paralyze, force_drop)
/atom/proc/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube, stun, force_drop)
return

///returns the mob's dna info as a list, to be inserted in an object's blood_DNA list
Expand Down
4 changes: 2 additions & 2 deletions code/game/turfs/open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
movable_content.wash(CLEAN_WASH)
return TRUE

/turf/open/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube, paralyze_amount, force_drop)
/turf/open/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube, stun_amount, force_drop)
if(C.movement_type & FLYING)
return 0
if(has_gravity(src))
Expand All @@ -441,7 +441,7 @@
C.moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
if(!(lube & SLIDE_ICE))
C.Knockdown(knockdown_amount)
C.Paralyze(paralyze_amount)
C.Stun(stun_amount)
C.stop_pulling()
else
C.Knockdown(20)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/carbon_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
if(legcuffed)
. += legcuffed.slowdown

/mob/living/carbon/slip(knockdown_amount, obj/O, lube, paralyze, force_drop)
/mob/living/carbon/slip(knockdown_amount, obj/O, lube, stun, force_drop)
if(movement_type & FLYING)
return 0
if(!(lube&SLIDE_ICE))
log_combat(src, (O ? O : get_turf(src)), "slipped on the", null, ((lube & SLIDE) ? "(LUBE)" : null))
return loc.handle_slip(src, knockdown_amount, O, lube, paralyze, force_drop)
return loc.handle_slip(src, knockdown_amount, O, lube, stun, force_drop)

/mob/living/carbon/Process_Spacemove(movement_dir = 0)
if(..())
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
if(dna && dna.species)
. += dna.species.movement_delay(src)

/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube, paralyze, forcedrop)
/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube, stun, forcedrop)
if(HAS_TRAIT(src, TRAIT_NOSLIPALL))
return 0
if (!(lube & GALOSHES_DONT_HELP))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
return FALSE

/// Called when this mob slips over, override as needed
/mob/proc/slip(knockdown_amount, obj/O, lube, paralyze, force_drop)
/mob/proc/slip(knockdown_amount, obj/O, lube, stun, force_drop)
return

/// Update the gravity status of this mob
Expand Down