mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Tweaks and Fixes to Slip Shoes (#20686)
* tweaks slip shoes * yeah this is how bitflags work * oops hehe * blows up your mind Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes
|
||||
name = "clown shoes"
|
||||
desc = "The prankster's standard-issue clowning shoes. Damn they're huge! Ctrl-click to toggle the waddle dampeners!"
|
||||
desc = "The prankster's standard-issue clowning shoes. Damn they're huge! <span class='notice'>Ctrl-click to toggle the waddle dampeners!</span>"
|
||||
icon_state = "clown"
|
||||
item_state = "clown_shoes"
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
@@ -116,6 +116,8 @@
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/slippers
|
||||
actions_types = list(/datum/action/item_action/slipping)
|
||||
enabled_waddle = FALSE
|
||||
slowdown = 0
|
||||
var/slide_distance = 6
|
||||
var/recharging_rate = 8 SECONDS
|
||||
var/recharging_time = 0
|
||||
@@ -124,30 +126,32 @@
|
||||
if(slot == slot_shoes)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/slippers/ui_action_click(mob/living/user, action)
|
||||
if(recharging_time > world.time)
|
||||
to_chat(user, "<span class='warning'>The boot's internal propulsion needs to recharge still!</span>")
|
||||
return
|
||||
var/prev_dir = user.dir
|
||||
var/prev_pass_flags = user.pass_flags
|
||||
user.pass_flags |= PASSMOB
|
||||
user.Weaken(4 SECONDS)
|
||||
/obj/item/clothing/shoes/clown_shoes/slippers/proc/slide_one(mob/living/user, progress, prev_dir , prev_flags)
|
||||
user.dir = prev_dir
|
||||
playsound(src, 'sound/effects/stealthoff.ogg', 50, TRUE, 1)
|
||||
recharging_time = world.time + recharging_rate
|
||||
user.visible_message("<span class='warning'>[user] slips forward!</span>")
|
||||
for(var/i in 1 to slide_distance)
|
||||
step(user, user.dir)
|
||||
sleep(1)
|
||||
user.SetWeakened(0)
|
||||
user.pass_flags = prev_pass_flags
|
||||
step(user, user.dir)
|
||||
if(progress == slide_distance)
|
||||
user.stand_up()
|
||||
user.pass_flags = prev_flags
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/slippers/ui_action_click(mob/living/user, action)
|
||||
if(recharging_time > world.time)
|
||||
to_chat(user, "<span class='warning'>The boot's internal propulsion needs to recharge still!</span>")
|
||||
return
|
||||
var/prev_dir = user.dir
|
||||
var/old_pass = user.pass_flags
|
||||
user.pass_flags |= (PASSMOB | PASSTABLE)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE, 1)
|
||||
recharging_time = world.time + recharging_rate
|
||||
user.lay_down()
|
||||
for(var/crossed in 1 to slide_distance)
|
||||
addtimer(CALLBACK(src, PROC_REF(slide_one), user, crossed, prev_dir, old_pass), crossed)
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/slippers/toggle_waddle(mob/living/user)
|
||||
if(!enabled_waddle)
|
||||
to_chat(user, "<span class='notice'>You switch off the waddle dampeners!</span>")
|
||||
enabled_waddle = TRUE
|
||||
slowdown = initial(slowdown)
|
||||
slowdown = SHOES_SLOWDOWN + 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch on the waddle dampeners, [src] no longer slow you down!</span>")
|
||||
enabled_waddle = FALSE
|
||||
|
||||
Reference in New Issue
Block a user