scope  
A component that allows players to use the item to zoom out. Mainly intended for firearms, but now works with other items too.
| Vars | |
| flags | Flags for scoping. Check code\__DEFINES\flags.dm | 
|---|---|
| item_action_type | if not null, an item action will be added. Redundant if the mode is ZOOM_METHOD_RIGHT_CLICK or ZOOM_METHOD_WIELD. | 
| range_modifier | How far the view can be moved from the player. At 1, it can be moved by the player's view distance; other values scale linearly. | 
| time_to_scope | Time to scope up, if you want the scope to take time to boot up. Used by the LWAP | 
| tracker | Fullscreen object we use for tracking. | 
| tracker_owner_ckey | The owner of the tracker's ckey. For comparing with the current owner mob, in case the client has left it (e.g. ghosted). | 
| zoom_method | The method which we zoom in and out | 
| Procs | |
| get_target | We find and return the best target to hit on a given turf. | 
| stop_zooming | We stop zooming, canceling processing, resetting stuff back to normal and deleting our tracker. | 
| zoom | We start zooming by adding our tracker overlay and starting our processing. | 
Var Details
flags  
Flags for scoping. Check code\__DEFINES\flags.dm
item_action_type  
if not null, an item action will be added. Redundant if the mode is ZOOM_METHOD_RIGHT_CLICK or ZOOM_METHOD_WIELD.
range_modifier  
How far the view can be moved from the player. At 1, it can be moved by the player's view distance; other values scale linearly.
time_to_scope  
Time to scope up, if you want the scope to take time to boot up. Used by the LWAP
tracker  
Fullscreen object we use for tracking.
tracker_owner_ckey  
The owner of the tracker's ckey. For comparing with the current owner mob, in case the client has left it (e.g. ghosted).
zoom_method  
The method which we zoom in and out
Proc Details
get_target
We find and return the best target to hit on a given turf.
Arguments:
- target_turf: The turf we are looking for targets on.
stop_zooming
We stop zooming, canceling processing, resetting stuff back to normal and deleting our tracker.
Arguments:
- user: The mob we are canceling zooming on.
zoom
We start zooming by adding our tracker overlay and starting our processing.
Arguments:
- user: The mob we are starting zooming on.