mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Merge pull request #4263 from Tastyfish/smooth-shuttles
Fixes shuttle smoothing
This commit is contained in:
@@ -89,12 +89,18 @@
|
||||
health = 160
|
||||
reinf = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
color = null
|
||||
/obj/structure/window/full/shuttle/New()
|
||||
..()
|
||||
color = null
|
||||
|
||||
update_icon() //icon_state has to be set manually
|
||||
return
|
||||
/obj/structure/window/full/shuttle/update_icon() //icon_state has to be set manually
|
||||
return
|
||||
|
||||
/obj/structure/window/full/shuttle/shuttleRotate(rotation)
|
||||
..()
|
||||
var/matrix/M = transform
|
||||
M.Turn(rotation)
|
||||
transform = M
|
||||
|
||||
/obj/structure/window/full/shuttle/dark
|
||||
icon = 'icons/turf/shuttle.dmi'
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
name = "shuttle"
|
||||
icon = 'icons/turf/shuttle.dmi'
|
||||
|
||||
/obj/structure/shuttle/shuttleRotate(rotation)
|
||||
..()
|
||||
var/matrix/M = transform
|
||||
M.Turn(rotation)
|
||||
transform = M
|
||||
|
||||
/obj/structure/shuttle/window
|
||||
name = "shuttle window"
|
||||
icon = 'icons/obj/podwindows.dmi'
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
T.transform = transform
|
||||
|
||||
//why don't shuttle walls habe smoothwall? now i gotta do rotation the dirty way
|
||||
/turf/simulated/shuttle/wall/shuttleRotate(rotation)
|
||||
/turf/simulated/shuttle/shuttleRotate(rotation)
|
||||
..()
|
||||
var/matrix/M = transform
|
||||
M.Turn(rotation)
|
||||
transform = M
|
||||
|
||||
@@ -302,10 +302,6 @@
|
||||
//rotate our direction
|
||||
dir = angle2dir(rotation+dir2angle(dir))
|
||||
|
||||
//resmooth if need be.
|
||||
if(smooth)
|
||||
smooth_icon(src)
|
||||
|
||||
//rotate the pixel offsets too.
|
||||
if (pixel_x || pixel_y)
|
||||
if (rotation < 0)
|
||||
@@ -316,6 +312,9 @@
|
||||
pixel_x = oldPY
|
||||
pixel_y = (oldPX*(-1))
|
||||
|
||||
/atom/proc/postDock()
|
||||
if(smooth)
|
||||
smooth_icon(src)
|
||||
|
||||
|
||||
//this is the main proc. It instantly moves our mobile port to stationary port S1
|
||||
@@ -368,7 +367,7 @@
|
||||
|
||||
var/list/door_unlock_list = list()
|
||||
|
||||
for(var/i=1, i<=L0.len, ++i)
|
||||
for(var/i in 1 to L0.len)
|
||||
var/turf/T0 = L0[i]
|
||||
if(!T0)
|
||||
continue
|
||||
@@ -443,6 +442,12 @@
|
||||
T0.CalculateAdjacentTurfs()
|
||||
air_master.add_to_active(T0,1)
|
||||
|
||||
for(var/A1 in L1)
|
||||
var/turf/T1 = A1
|
||||
T1.postDock()
|
||||
for(var/atom/movable/M in T1)
|
||||
M.postDock()
|
||||
|
||||
loc = S1.loc
|
||||
dir = S1.dir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user