mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
Relocate rotate()
And add var/rotate for some dont rotated ship.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
var/last_burn = 0
|
var/last_burn = 0
|
||||||
var/list/last_movement = list(0,0)
|
var/list/last_movement = list(0,0)
|
||||||
var/fore_dir = NORTH
|
var/fore_dir = NORTH
|
||||||
|
var/rotate = 1 //For proc rotate
|
||||||
|
|
||||||
var/obj/effect/map/current_sector
|
var/obj/effect/map/current_sector
|
||||||
var/obj/machinery/computer/helm/nav_control
|
var/obj/machinery/computer/helm/nav_control
|
||||||
@@ -48,11 +49,6 @@
|
|||||||
res |= NORTH
|
res |= NORTH
|
||||||
else
|
else
|
||||||
res |= SOUTH
|
res |= SOUTH
|
||||||
|
|
||||||
var/matrix/M = matrix()
|
|
||||||
M.Turn(dir2angle(res))
|
|
||||||
src.transform = M //Rotate ship
|
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
/obj/effect/map/ship/proc/adjust_speed(n_x, n_y)
|
/obj/effect/map/ship/proc/adjust_speed(n_x, n_y)
|
||||||
@@ -99,6 +95,12 @@
|
|||||||
if(direction & SOUTH)
|
if(direction & SOUTH)
|
||||||
adjust_speed(0, -get_acceleration())
|
adjust_speed(0, -get_acceleration())
|
||||||
|
|
||||||
|
|
||||||
|
/obj/effect/map/ship/rotate(var/direction)
|
||||||
|
var/matrix/M = matrix()
|
||||||
|
M.Turn(dir2angle(direction))
|
||||||
|
src.transform = M //Rotate ship
|
||||||
|
|
||||||
/obj/effect/map/ship/process()
|
/obj/effect/map/ship/process()
|
||||||
if(!is_still())
|
if(!is_still())
|
||||||
var/list/deltas = list(0,0)
|
var/list/deltas = list(0,0)
|
||||||
@@ -109,3 +111,5 @@
|
|||||||
var/turf/newloc = locate(x + deltas[1], y + deltas[2], z)
|
var/turf/newloc = locate(x + deltas[1], y + deltas[2], z)
|
||||||
if(newloc)
|
if(newloc)
|
||||||
Move(newloc)
|
Move(newloc)
|
||||||
|
if(rotate)
|
||||||
|
rotate(get_heading())
|
||||||
|
|||||||
Reference in New Issue
Block a user