Merge pull request #16506 from SabreML/dragging-tweaks

Fixes 'Face while pulling' oversights
This commit is contained in:
variableundefined
2021-09-01 19:47:29 -05:00
committed by GitHub
3 changed files with 12 additions and 5 deletions
@@ -13,6 +13,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 5
active_power_usage = 100
face_while_pulling = TRUE
/// The maximum number of items the fridge can hold. Multiplicated by the matter bin component's rating.
var/max_n_of_items = 1500
/// Associative list (/text => /number) tracking the amounts of a specific item held by the fridge.
+7 -2
View File
@@ -168,8 +168,13 @@
direct = newdir
n = get_step(mob, direct)
. = mob.SelfMove(n, direct, delay)
if(mob.pulling?.face_while_pulling)
var/prev_pulling_loc = null
if(mob.pulling)
prev_pulling_loc = mob.pulling.loc
. = mob.SelfMove(n, direct, delay) // The actual movement
if(prev_pulling_loc && mob.pulling?.face_while_pulling && (mob.pulling.loc != prev_pulling_loc))
mob.setDir(get_dir(mob, mob.pulling)) // Face welding tanks and stuff when pulling
else
mob.setDir(direct)