mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Merge pull request #16506 from SabreML/dragging-tweaks
Fixes 'Face while pulling' oversights
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user