mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-07-19 03:33:00 +01:00
Fix version 2, electrification boogaloo
Fixes the ability to climb railings by removing the forcemove call that teleports players and instead refactoring the do_climb and climb_structure procedures in structure code itself. Uses a similar method to tables of briefly turning collision off for the railing when the object is climbed in order to let players climb it, without moving the player into otherwise occupied space.
This commit is contained in:
@@ -84,6 +84,17 @@
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] starts climbing over [src].</span>", \
|
||||
"<span class='notice'>You start climbing over [src]...</span>")
|
||||
|
||||
var/obj/structure/railing/target = src
|
||||
|
||||
if(target.shock(user, 100))
|
||||
return
|
||||
|
||||
// Ensures player is in the proper place for climbing.
|
||||
if(user.loc != src.loc)
|
||||
if(user.loc == (get_step(src, get_dir(src.loc, user))))
|
||||
step(user, get_dir(user.loc,src.loc))
|
||||
|
||||
var/adjusted_climb_time = climb_time
|
||||
if(user.restrained()) //climbing takes twice as long when restrained.
|
||||
adjusted_climb_time *= 2
|
||||
|
||||
Reference in New Issue
Block a user