polarization_controller
A component for windows to allow them to be dynamically rendered opaque / transparent based on a button press.
Vars | |
id | The ID of the polarizer we're listening to. |
---|---|
non_polarized_color | The color the window was before it was polarized. |
polarization_process_duration | The time it takes for the polarization process to happen. |
polarized_color | The color of the window when polarized. |
used_capacitor | The capacitor that was used on the window, if any. Can be null if the window was spawned already polarized. |
Procs | |
on_window_examine | Handles adding the examine strings to windows that have a polarization controller installed. |
on_window_multitool_act | Signal handler to handle the removal of this component when someone uses a multitool (or something that acts like one) on the parent window. |
remove_polarization_controller | Proc that handles removing the polarization controller. Had to be made into a separate proc so that it wouldn't be waited for by the signal handler for the multitool tool act. |
toggle | Handles toggling the window between opaque and transparent. |
window_item_interact | Called when the parent window is being hit by an item |
Var Details
id
The ID of the polarizer we're listening to.
non_polarized_color
The color the window was before it was polarized.
polarization_process_duration
The time it takes for the polarization process to happen.
polarized_color
The color of the window when polarized.
used_capacitor
The capacitor that was used on the window, if any. Can be null if the window was spawned already polarized.
Proc Details
on_window_examine
Handles adding the examine strings to windows that have a polarization controller installed.
on_window_multitool_act
Signal handler to handle the removal of this component when someone uses a multitool (or something that acts like one) on the parent window.
remove_polarization_controller
Proc that handles removing the polarization controller. Had to be made into a separate proc so that it wouldn't be waited for by the signal handler for the multitool tool act.
toggle
Handles toggling the window between opaque and transparent.
Arguments:
- should_be_opaque - Boolean on whether or not the window should now be opaque.
window_item_interact
Called when the parent window is being hit by an item
Arguments:
- obj/item/attacking_item - The item hitting this atom
- mob/user - The wielder of this item
- params - click params such as alt/shift etc