mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Mobility refactor and code cleanup - lacking appendages edition (#509)
* mobility refactor (#52929) * Mobility refactor and code cleanup - lacking appendages edition Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -343,8 +343,8 @@
|
||||
O.forceMove(T)
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc) || !isliving(user))
|
||||
/obj/structure/closet/relaymove(mob/living/user, direction)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
if(locked)
|
||||
if(message_cooldown <= world.time)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/egged = 0
|
||||
|
||||
/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
|
||||
if(!istype(user) || opened || move_delay || user.incapacitated() || !isturf(loc) || !has_gravity(loc))
|
||||
if(opened || move_delay || user.incapacitated() || !isturf(loc) || !has_gravity(loc))
|
||||
return
|
||||
move_delay = TRUE
|
||||
var/oldloc = loc
|
||||
|
||||
@@ -48,7 +48,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
/obj/structure/bodycontainer/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bodycontainer/relaymove(mob/user)
|
||||
/obj/structure/bodycontainer/relaymove(mob/living/user, direction)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
if(locked)
|
||||
|
||||
@@ -632,7 +632,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!(user.mobility_flags & MOBILITY_STAND) || user.get_num_legs() < 2)
|
||||
if(!(user.mobility_flags & MOBILITY_STAND) || user.usable_legs < 2)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
|
||||
@@ -178,28 +178,33 @@
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
|
||||
if(istype(mob) && mob.client)
|
||||
if(!moving)
|
||||
for(var/obj/structure/transit_tube/station/station in loc)
|
||||
if(!station.pod_moving)
|
||||
if(direction == turn(station.boarding_dir,180))
|
||||
if(station.open_status == STATION_TUBE_OPEN)
|
||||
mob.forceMove(loc)
|
||||
update_icon()
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
else if(direction in station.tube_dirs)
|
||||
setDir(direction)
|
||||
station.launch_pod()
|
||||
return
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/living/user, direction)
|
||||
if(!user.client || moving)
|
||||
return
|
||||
|
||||
for(var/obj/structure/transit_tube/station/station in loc)
|
||||
if(station.pod_moving)
|
||||
return
|
||||
if(direction == turn(station.boarding_dir,180))
|
||||
if(station.open_status == STATION_TUBE_OPEN)
|
||||
user.forceMove(loc)
|
||||
update_icon()
|
||||
else
|
||||
station.open_animation()
|
||||
else if(direction in station.tube_dirs)
|
||||
setDir(direction)
|
||||
station.launch_pod()
|
||||
return
|
||||
|
||||
for(var/obj/structure/transit_tube/transit_tube in loc)
|
||||
if(!(dir in transit_tube.tube_dirs))
|
||||
continue
|
||||
if(!transit_tube.has_exit(direction))
|
||||
continue
|
||||
setDir(direction)
|
||||
return
|
||||
|
||||
for(var/obj/structure/transit_tube/TT in loc)
|
||||
if(dir in TT.tube_dirs)
|
||||
if(TT.has_exit(direction))
|
||||
setDir(direction)
|
||||
return
|
||||
|
||||
/obj/structure/transit_tube_pod/return_temperature()
|
||||
return air_contents.temperature
|
||||
|
||||
Reference in New Issue
Block a user