mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Fixes multitile doors and multitile engines on shuttles. Gives raven it's big engines back (#24781)
* 7 year old fix ™️ * whiteship multi * Apply suggestions from code review Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> * Update shuttle_rotate.dm * Update code/modules/shuttle/shuttle_rotate.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/shuttle/shuttle_rotate.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -508,6 +508,8 @@
|
||||
|
||||
//move mobile to new location
|
||||
for(var/atom/movable/AM in T0)
|
||||
if(AM.loc != T0) //fix for multi-tile objects
|
||||
continue
|
||||
AM.onShuttleMove(T0, T1, rotation, last_caller)
|
||||
|
||||
if(rotation)
|
||||
|
||||
@@ -24,6 +24,19 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
|
||||
pixel_x = oldPY
|
||||
pixel_y = (oldPX*(-1))
|
||||
|
||||
|
||||
/atom/movable/shuttleRotate(rotation, params)
|
||||
. = ..()
|
||||
//rotate the physical bounds and offsets for multitile atoms too. Override base "rotate the pixel offsets" for multitile atoms.
|
||||
//Override non zero bound_x, bound_y, pixel_x, pixel_y to zero.
|
||||
//Dont take in account starting bound_x, bound_y, pixel_x, pixel_y.
|
||||
//So it can unintentionally shift physical bounds of things that starts with non zero bound_x, bound_y.
|
||||
if((bound_height != world.icon_size || bound_width != world.icon_size) && (bound_x == 0) && (bound_y == 0)) //Dont shift things that have non zero bound_x and bound_y, or it move somewhere.
|
||||
pixel_x = dir & (NORTH|EAST) ? (world.icon_size - bound_width) : 0
|
||||
pixel_y = dir & (NORTH|WEST) ? (world.icon_size - bound_width) : 0
|
||||
bound_x = pixel_x
|
||||
bound_y = pixel_y
|
||||
|
||||
/************************************Turf rotate procs************************************/
|
||||
|
||||
/************************************Mob rotate procs************************************/
|
||||
@@ -56,9 +69,6 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
|
||||
d2 = temp
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/shuttle/engine/shuttleRotate(rotation, params)
|
||||
setDir(angle2dir(rotation+dir2angle(dir)))
|
||||
|
||||
//Fixes dpdir on shuttle rotation
|
||||
/obj/structure/disposalpipe/shuttleRotate(rotation, params)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user