Shiptest 13 - Modules - TypesVar Details - Proc Details

Overmap objects

Everything visible on the overmap: stations, ships, ruins, events, and more.

This base class should be the parent of all objects present on the overmap. For the control counterparts, see /obj/machinery/computer/helm. For the shuttle counterparts (ONLY USED FOR SHIPS), see /obj/docking_port/mobile.

Vars

char_repThe character that represents this overmap datum on the overmap in ASCII mode.
contentsList of all datums docked in this datum.
dock_timeThe time, in deciseconds, needed for this object to call
dock_timer_idThe current docking timer ID.
docked_toThe datum this datum is docked to.
dockingWhether or not the overmap object is currently docking.
nameThe name of this overmap datum, propogated to the token, docking port, and areas.
tokenThe token this datum is represented by.
token_icon_stateThe icon state the token will be set to on init.
token_typeToken type to instantiate.
xThe x position of this datum on the overmap. Use [/datum/overmap/proc/move] to change this.
yThe y position of this datum on the overmap. Use [/datum/overmap/proc/move] to change this.

Procs

DockHERE BE DRAGONS - DOCKING CODE Docks the overmap datum to another overmap datum, putting it in the other's contents and removing it from the overmap. Sets X and Y equal to null. Does not check for distance or nulls.
InitializeThis proc is called directly after New(). It's done after the basic creation and placement of the token and setup has been completed.
RenameProc used to rename an overmap datum and everything related to it.
UndockUndocks from the object this datum is docked to currently, and places it back on the overmap at the position of the object that was previously docked to.
complete_dockCalled after datum/overmap/proc/start_dock, either instantly or after a time depending on the datum/overmap/var/dock_time variable. Return result is ignored.
complete_undockCalled after datum/overmap/proc/Undock, either instantly or after a time depending on the datum/overmap/var/dock_time variable. Return result is ignored.
get_jump_to_turfReturns a turf that can be jumped to by observers, admins, and such.
get_nearby_overmap_objectsReturns all other overmap objects on the tile as a list. Will return an empty list if there are no other objects, or the source object is docked.
overmap_moveCalled whenever you need to move an overmap datum to another position. Can be overridden to add additional movement functionality, as long as it calls the parent proc.
overmap_stepMoves the overmap datum in a specific direction a specific number of spaces (magnitude, default 1).
post_dockedCalled at the very end of a datum/overmap/proc/Dock call, on the TARGET of the docking attempt. Return value is ignored.
post_undockedCalled at the very end of a [datum/overmap/proc/Unock] call (non-blocking/asynchronously), on the TARGET of the undocking attempt. Return result is ignored.
pre_dockCalled at the very start of a datum/overmap/proc/Dock call. If it returns FALSE, the docking will be aborted. Will only be called after datum/overmap/proc/pre_docked has been called and returned TRUE.
pre_dockedCalled at the very start of a datum/overmap/proc/Dock call, on the TARGET of the docking attempt. If it returns FALSE, the docking will be aborted. Called before datum/overmap/proc/pre_dock is called on the dock requester.
start_dockFor defining custom actual docking behaviour. Called after both datum/overmap/proc/pre_dock and datum/overmap/proc/pre_docked have been called and they both returned TRUE.

Var Details

char_rep

The character that represents this overmap datum on the overmap in ASCII mode.

contents

List of all datums docked in this datum.

dock_time

The time, in deciseconds, needed for this object to call

dock_timer_id

The current docking timer ID.

docked_to

The datum this datum is docked to.

docking

Whether or not the overmap object is currently docking.

name

The name of this overmap datum, propogated to the token, docking port, and areas.

token

The token this datum is represented by.

token_icon_state

The icon state the token will be set to on init.

token_type

Token type to instantiate.

x

The x position of this datum on the overmap. Use [/datum/overmap/proc/move] to change this.

y

The y position of this datum on the overmap. Use [/datum/overmap/proc/move] to change this.

Proc Details

Dock

HERE BE DRAGONS - DOCKING CODE Docks the overmap datum to another overmap datum, putting it in the other's contents and removing it from the overmap. Sets X and Y equal to null. Does not check for distance or nulls.

Initialize

This proc is called directly after New(). It's done after the basic creation and placement of the token and setup has been completed.

Rename

Proc used to rename an overmap datum and everything related to it.

Undock

Undocks from the object this datum is docked to currently, and places it back on the overmap at the position of the object that was previously docked to.

complete_dock

Called after datum/overmap/proc/start_dock, either instantly or after a time depending on the datum/overmap/var/dock_time variable. Return result is ignored.

complete_undock

Called after datum/overmap/proc/Undock, either instantly or after a time depending on the datum/overmap/var/dock_time variable. Return result is ignored.

get_jump_to_turf

Returns a turf that can be jumped to by observers, admins, and such.

get_nearby_overmap_objects

Returns all other overmap objects on the tile as a list. Will return an empty list if there are no other objects, or the source object is docked.

overmap_move

Called whenever you need to move an overmap datum to another position. Can be overridden to add additional movement functionality, as long as it calls the parent proc.

overmap_step

Moves the overmap datum in a specific direction a specific number of spaces (magnitude, default 1).

post_docked

Called at the very end of a datum/overmap/proc/Dock call, on the TARGET of the docking attempt. Return value is ignored.

post_undocked

Called at the very end of a [datum/overmap/proc/Unock] call (non-blocking/asynchronously), on the TARGET of the undocking attempt. Return result is ignored.

pre_dock

Called at the very start of a datum/overmap/proc/Dock call. If it returns FALSE, the docking will be aborted. Will only be called after datum/overmap/proc/pre_docked has been called and returned TRUE.

pre_docked

Called at the very start of a datum/overmap/proc/Dock call, on the TARGET of the docking attempt. If it returns FALSE, the docking will be aborted. Called before datum/overmap/proc/pre_dock is called on the dock requester.

Returns - A docking ticket that will be passed to datum/overmap/proc/pre_dock on the dock requester.

start_dock

For defining custom actual docking behaviour. Called after both datum/overmap/proc/pre_dock and datum/overmap/proc/pre_docked have been called and they both returned TRUE.