M707 \"Vulture\" scope
Vars | |
adjust_delay | How much time it takes to adjust the position of the scope. Adjusting the offset will take half of this time |
---|---|
breath_cooldown_time | How long the cooldown for holding your breath is, only starts after breath_time finishes |
breath_time | How long you can hold your breath for |
darkness_view | How much to increase darkness view by |
hold_breath_cd | Cooldown for after holding your breath |
holding_breath | If the user is currently holding their breath |
max_scope_range | The maximum distance the scope can be from the player |
min_scope_range | The bare minimum distance the scope can be from the player |
perpendicular_scope_range | How far in the perpendicular axis the scope can move in either direction |
scope_drift | If the gun should experience scope drift |
scope_drift_max | How far in any given direction the scope can drift |
scope_element | Ref to the scope screen element |
scope_interact_cd | Cooldown for interacting with the scope's adjustment or position |
scope_offset_x | The current X position of the scope within the sniper's view box. 0 is center |
scope_offset_y | The current Y position of the scope within the sniper's view box. 0 is center |
scope_user | Weakref to the user of the scope |
scope_user_initial_dir | The initial dir of the scope user when scoping in |
scope_viewsize | How far in each direction the scope should see. Default human view size is 7 |
scope_x | The current X coord position of the scope camera |
scope_y | The current Y coord position of the scope camera |
scoping | If the scope is currently in use |
slow_use | If the scope should use do_afters for adjusting and moving the sight |
spotted_drift_chance | % chance for the scope to drift on process with a spotter using their scope |
spotter_spotting | If there is currently a spotter using the linked spotting scope |
start_scope_range | How far out the player should see by default |
unspotted_drift_chance | % chance for the scope to drift on process without a spotter using their scope |
Procs | |
adjust_offset | Adjusts the position of the reticle by a tile in a given direction |
adjust_position | Adjusts the position of the scope by a tile in a given direction |
axis_math | Figures out which direction the scope should move based on user direction and their input |
get_adjust_dirs | Gets a list of valid directions to be able to adjust the reticle in |
get_breath_recharge | Returns a % of how much time until the user can still their breath again |
get_scope_drift_chance | Returns a number between 0 and 100 for the chance of the scope drifting on process() |
get_time_to_fire | Returns how many deciseconds until the gun is able to fire again |
get_viewed_turf | Returns the turf that the sniper scope + reticle is currently focused on |
hold_breath | Lets the user start holding their breath, stopping gun sway for a short time |
on_mob_move_look | Handler for if the mob moves or changes look direction |
on_scope | Handler for when the user begins scoping |
on_unscope | Handler for when the scope is deleted, dropped, etc. |
recalculate_scope_offset | Recalculates where the reticle should be inside the scope |
recalculate_scope_pos | Recalculates where the scope should be in relation to the user |
scope_drift | Causes the scope to drift in a random direction by 1 tile |
stop_holding_breath | Stops the user from holding their breath, starting the cooldown |
tick_down_breath_scope | Slowly empties out the crosshair as the user's breath runs out |
Var Details
adjust_delay
How much time it takes to adjust the position of the scope. Adjusting the offset will take half of this time
breath_cooldown_time
How long the cooldown for holding your breath is, only starts after breath_time finishes
breath_time
How long you can hold your breath for
darkness_view
How much to increase darkness view by
hold_breath_cd
Cooldown for after holding your breath
holding_breath
If the user is currently holding their breath
max_scope_range
The maximum distance the scope can be from the player
min_scope_range
The bare minimum distance the scope can be from the player
perpendicular_scope_range
How far in the perpendicular axis the scope can move in either direction
scope_drift
If the gun should experience scope drift
scope_drift_max
How far in any given direction the scope can drift
scope_element
Ref to the scope screen element
scope_interact_cd
Cooldown for interacting with the scope's adjustment or position
scope_offset_x
The current X position of the scope within the sniper's view box. 0 is center
scope_offset_y
The current Y position of the scope within the sniper's view box. 0 is center
scope_user
Weakref to the user of the scope
scope_user_initial_dir
The initial dir of the scope user when scoping in
scope_viewsize
How far in each direction the scope should see. Default human view size is 7
scope_x
The current X coord position of the scope camera
scope_y
The current Y coord position of the scope camera
scoping
If the scope is currently in use
slow_use
If the scope should use do_afters for adjusting and moving the sight
spotted_drift_chance
% chance for the scope to drift on process with a spotter using their scope
spotter_spotting
If there is currently a spotter using the linked spotting scope
start_scope_range
How far out the player should see by default
unspotted_drift_chance
% chance for the scope to drift on process without a spotter using their scope
Proc Details
adjust_offset
Adjusts the position of the reticle by a tile in a given direction
adjust_position
Adjusts the position of the scope by a tile in a given direction
axis_math
Figures out which direction the scope should move based on user direction and their input
get_adjust_dirs
Gets a list of valid directions to be able to adjust the reticle in
get_breath_recharge
Returns a % of how much time until the user can still their breath again
get_scope_drift_chance
Returns a number between 0 and 100 for the chance of the scope drifting on process()
get_time_to_fire
Returns how many deciseconds until the gun is able to fire again
get_viewed_turf
Returns the turf that the sniper scope + reticle is currently focused on
hold_breath
Lets the user start holding their breath, stopping gun sway for a short time
on_mob_move_look
Handler for if the mob moves or changes look direction
on_scope
Handler for when the user begins scoping
on_unscope
Handler for when the scope is deleted, dropped, etc.
recalculate_scope_offset
Recalculates where the reticle should be inside the scope
recalculate_scope_pos
Recalculates where the scope should be in relation to the user
scope_drift
Causes the scope to drift in a random direction by 1 tile
stop_holding_breath
Stops the user from holding their breath, starting the cooldown
tick_down_breath_scope
Slowly empties out the crosshair as the user's breath runs out