Overmap ships
Basically, any overmap object that is capable of moving by itself.
Vars | |
acceleration_speed | ONLY USED FOR NON-SIMULATED SHIPS. The amount per burn that this ship accelerates |
---|---|
burn_direction | The direction being accelerated in |
burn_percentage | Percentage of thruster power being used |
max_speed | Max possible speed (1 tile per tick / 600 tiles per minute) |
min_speed | Minimum speed. Any lower is rounded down. (0.01 tiles per minute) |
movement_callback_id | Timer ID of the looping movement timer |
speed_x | The current speed in x direction in grid squares per minute |
speed_y | The current speed in y direction in grid squares per minute |
Procs | |
adjust_speed | Change the speed in any direction. |
burn_engines | Returns the amount of acceleration to apply to the ship based on the percentage of the engines that are burning, and the time since the last burn tick. |
calculate_burn | Calculates the amount of acceleration to apply to the ship given the direction and velocity increase |
get_eta | Returns the estimated time in deciseconds to the next tile at current speed, or approx. time until reaching the destination when on autopilot |
get_heading | Returns the direction the ship is moving in terms of dirs |
get_speed | Returns the total speed in all directions. |
is_still | Returns whether or not the ship is moving in any direction. |
tick_move | Called by /datum/overmap/ship/proc/adjust_speed, this continually moves the ship according to its speed |
update_visuals | Updates the visuals of the ship based on heading and whether or not it's moving. |
Var Details
acceleration_speed
ONLY USED FOR NON-SIMULATED SHIPS. The amount per burn that this ship accelerates
burn_direction
The direction being accelerated in
burn_percentage
Percentage of thruster power being used
max_speed
Max possible speed (1 tile per tick / 600 tiles per minute)
min_speed
Minimum speed. Any lower is rounded down. (0.01 tiles per minute)
movement_callback_id
Timer ID of the looping movement timer
speed_x
The current speed in x direction in grid squares per minute
speed_y
The current speed in y direction in grid squares per minute
Proc Details
adjust_speed
Change the speed in any direction.
- n_x - Speed in the X direction to change
- n_y - Speed in the Y direction to change
burn_engines
Returns the amount of acceleration to apply to the ship based on the percentage of the engines that are burning, and the time since the last burn tick.
- percentage - The percentage of the engines that are burning
- deltatime - The time since the last burn tick
calculate_burn
Calculates the amount of acceleration to apply to the ship given the direction and velocity increase
- direction - The direction to accelerate in
- acceleration - The acceleration to apply
get_eta
Returns the estimated time in deciseconds to the next tile at current speed, or approx. time until reaching the destination when on autopilot
get_heading
Returns the direction the ship is moving in terms of dirs
get_speed
Returns the total speed in all directions.
The equation for acceleration is as follows: 60 SECONDS / (1 / ([ship's speed] / ([ship's mass] * 100)))
is_still
Returns whether or not the ship is moving in any direction.
tick_move
Called by /datum/overmap/ship/proc/adjust_speed, this continually moves the ship according to its speed
update_visuals
Updates the visuals of the ship based on heading and whether or not it's moving.