scan_consolenew
![code/game/machinery/computer/dna_console.dm 37](git.png)
Vars | |
can_use_scanner | Used for setting tgui data - Whether the connected DNA Scanner is usable |
---|---|
connected_scanner | Currently connected DNA Scanner |
delayed_action | Current delayed action, used for delayed enzyme transfer on scanner door close |
diskette | Currently stored genetic data diskette |
genetic_makeup_buffer | Maximum number of enzymes we can store |
injector_selection | Assoc list of all advanced injectors. Keys are injector names. Values are lists of mutations. |
injectorready | World time when injectors are ready to be printed |
is_injector_ready | Used for setting tgui data - Whether injectors are ready to be printed |
is_joker_ready | Used for setting tgui data - Whether JOKER algorithm is ready |
is_pulsing_rads | Used for setting tgui data - Wheher an enzyme pulse operation is ongoing |
is_scramble_ready | Used for setting tgui data - Whether Scramble DNA is ready |
is_viable_occupant | Used for setting tgui data - Whether the current DNA Scanner occupant is viable for genetic modification |
jokerready | World time when JOKER algorithm can be used in DNA Consoles |
max_chromosomes | Maximum number of chromosomes that DNA Consoles are able to store. |
max_injector_instability | Maximum total instability of all combined mutations allowed on an advanced injector |
max_injector_mutations | Maximum number of mutation that an advanced injector can store |
max_injector_selections | Maximum number of advanced injectors that DNA Consoles store |
max_storage | Maximum number of mutations that DNA Consoles are able to store |
rad_pulse_index | Index of the enzyme being modified during delayed enzyme pulse operations |
rad_pulse_timer | World time when the enzyme pulse should complete |
radduration | Duration for enzyme radiation pulses |
radstrength | Strength for enzyme radiation pulses |
scanner_occupant | Current DNA Scanner occupant |
scrambleready | World time when Scramble can be used in DNA Consoles |
stored_chromosomes | List of all chromosomes stored in the DNA Console |
stored_mutations | List of all mutations stored on the DNA Console |
stored_research | Link to the techweb's stored research. Used to retrieve stored mutations |
tgui_advinjector_mutations | Used for setting tgui data - List of occupant mutations |
tgui_console_chromosomes | Used for setting tgui data - List of DNA Console chromosomes |
tgui_console_mutations | Used for setting tgui data - List of DNA Console stored mutations |
tgui_diskette_mutations | Used for setting tgui data - List of diskette stored mutations |
tgui_genetic_makeup | Used for setting tgui data - List of occupant mutations |
tgui_occupant_mutations | Used for setting tgui data - List of occupant mutations |
tgui_view_state | State of tgui view, i.e. which tab is currently active, or which genome we're currently looking at. |
time_to_injector | Used for setting tgui data - Time until injectors are ready |
time_to_joker | Used for setting tgui data - Time until joker is ready |
time_to_pulse | Used for setting tgui data - Time until the enzyme pulse is complete |
time_to_scramble | Used for setting tgui data - Time until scramble is ready |
Procs | |
apply_genetic_makeup | Applies the enzyme buffer to the current scanner occupant |
build_chrom_list | Takes any given chromosome and calculates chromosome compatibility |
build_genetic_makeup_list | Builds the genetic makeup list which will be sent to tgui interface. |
build_mutation_list | Builds the genetic makeup list which will be sent to tgui interface. |
can_modify_occupant | Checks if there is a valid DNA Scanner occupant for genetic modification |
check_discovery | Checks whether a mutation alias has been discovered |
connect_to_scanner | Checks for adjacent DNA scanners and connects when it finds a viable one |
get_mut_by_ref | Find a mutation from various storage locations via ATOM ref |
on_scanner_close | Called by connected DNA Scanners when their doors close. |
on_scanner_open | Called by connected DNA Scanners when their doors open. |
rad_pulse | Performs the enzyme radiation pulse. |
randomize_radiation_accuracy | Creates a randomised accuracy value for the enzyme pulse functionality. |
scanner_operational | Checks if there is a connected DNA Scanner that is operational |
scramble | Scrambles an enzyme element value for the enzyme pulse functionality. |
set_default_state | Sets the default state for the tgui interface. |
Var Details
can_use_scanner
![code/game/machinery/computer/dna_console.dm 94](git.png)
Used for setting tgui data - Whether the connected DNA Scanner is usable
connected_scanner
![code/game/machinery/computer/dna_console.dm 115](git.png)
Currently connected DNA Scanner
delayed_action
![code/game/machinery/computer/dna_console.dm 86](git.png)
Current delayed action, used for delayed enzyme transfer on scanner door close
diskette
![code/game/machinery/computer/dna_console.dm 83](git.png)
Currently stored genetic data diskette
genetic_makeup_buffer
![code/game/machinery/computer/dna_console.dm 61](git.png)
Maximum number of enzymes we can store
injector_selection
![code/game/machinery/computer/dna_console.dm 67](git.png)
Assoc list of all advanced injectors. Keys are injector names. Values are lists of mutations.
injectorready
![code/game/machinery/computer/dna_console.dm 76](git.png)
World time when injectors are ready to be printed
is_injector_ready
![code/game/machinery/computer/dna_console.dm 102](git.png)
Used for setting tgui data - Whether injectors are ready to be printed
is_joker_ready
![code/game/machinery/computer/dna_console.dm 100](git.png)
Used for setting tgui data - Whether JOKER algorithm is ready
is_pulsing_rads
![code/game/machinery/computer/dna_console.dm 104](git.png)
Used for setting tgui data - Wheher an enzyme pulse operation is ongoing
is_scramble_ready
![code/game/machinery/computer/dna_console.dm 98](git.png)
Used for setting tgui data - Whether Scramble DNA is ready
is_viable_occupant
![code/game/machinery/computer/dna_console.dm 96](git.png)
Used for setting tgui data - Whether the current DNA Scanner occupant is viable for genetic modification
jokerready
![code/game/machinery/computer/dna_console.dm 78](git.png)
World time when JOKER algorithm can be used in DNA Consoles
max_chromosomes
![code/game/machinery/computer/dna_console.dm 59](git.png)
Maximum number of chromosomes that DNA Consoles are able to store.
max_injector_instability
![code/game/machinery/computer/dna_console.dm 73](git.png)
Maximum total instability of all combined mutations allowed on an advanced injector
max_injector_mutations
![code/game/machinery/computer/dna_console.dm 71](git.png)
Maximum number of mutation that an advanced injector can store
max_injector_selections
![code/game/machinery/computer/dna_console.dm 69](git.png)
Maximum number of advanced injectors that DNA Consoles store
max_storage
![code/game/machinery/computer/dna_console.dm 53](git.png)
Maximum number of mutations that DNA Consoles are able to store
rad_pulse_index
![code/game/machinery/computer/dna_console.dm 89](git.png)
Index of the enzyme being modified during delayed enzyme pulse operations
rad_pulse_timer
![code/game/machinery/computer/dna_console.dm 91](git.png)
World time when the enzyme pulse should complete
radduration
![code/game/machinery/computer/dna_console.dm 55](git.png)
Duration for enzyme radiation pulses
radstrength
![code/game/machinery/computer/dna_console.dm 57](git.png)
Strength for enzyme radiation pulses
scanner_occupant
![code/game/machinery/computer/dna_console.dm 117](git.png)
Current DNA Scanner occupant
scrambleready
![code/game/machinery/computer/dna_console.dm 80](git.png)
World time when Scramble can be used in DNA Consoles
stored_chromosomes
![code/game/machinery/computer/dna_console.dm 65](git.png)
List of all chromosomes stored in the DNA Console
stored_mutations
![code/game/machinery/computer/dna_console.dm 63](git.png)
List of all mutations stored on the DNA Console
stored_research
![code/game/machinery/computer/dna_console.dm 51](git.png)
Link to the techweb's stored research. Used to retrieve stored mutations
tgui_advinjector_mutations
![code/game/machinery/computer/dna_console.dm 130](git.png)
Used for setting tgui data - List of occupant mutations
tgui_console_chromosomes
![code/game/machinery/computer/dna_console.dm 126](git.png)
Used for setting tgui data - List of DNA Console chromosomes
tgui_console_mutations
![code/game/machinery/computer/dna_console.dm 122](git.png)
Used for setting tgui data - List of DNA Console stored mutations
tgui_diskette_mutations
![code/game/machinery/computer/dna_console.dm 124](git.png)
Used for setting tgui data - List of diskette stored mutations
tgui_genetic_makeup
![code/game/machinery/computer/dna_console.dm 128](git.png)
Used for setting tgui data - List of occupant mutations
tgui_occupant_mutations
![code/game/machinery/computer/dna_console.dm 120](git.png)
Used for setting tgui data - List of occupant mutations
tgui_view_state
![code/game/machinery/computer/dna_console.dm 134](git.png)
State of tgui view, i.e. which tab is currently active, or which genome we're currently looking at.
time_to_injector
![code/game/machinery/computer/dna_console.dm 110](git.png)
Used for setting tgui data - Time until injectors are ready
time_to_joker
![code/game/machinery/computer/dna_console.dm 108](git.png)
Used for setting tgui data - Time until joker is ready
time_to_pulse
![code/game/machinery/computer/dna_console.dm 112](git.png)
Used for setting tgui data - Time until the enzyme pulse is complete
time_to_scramble
![code/game/machinery/computer/dna_console.dm 106](git.png)
Used for setting tgui data - Time until scramble is ready
Proc Details
apply_genetic_makeup
Applies the enzyme buffer to the current scanner occupant
Applies the type of a specific genetic makeup buffer to the current scanner occupant
Arguments:
- type - "ui"/"ue"/"mixed" - Which part of the enzyme buffer to apply
- buffer_slot - Index of the enzyme buffer to apply
build_chrom_list
Takes any given chromosome and calculates chromosome compatibility
Will iterate over the stored chromosomes in the DNA Console and will check whether it can be applied to the supplied mutation. Then returns a list of names of chromosomes that were compatible.
Arguments:
- mutation - The mutation to check chromosome compatibility with
build_genetic_makeup_list
Builds the genetic makeup list which will be sent to tgui interface.
build_mutation_list
Builds the genetic makeup list which will be sent to tgui interface.
Will iterate over the connected scanner occupant, DNA Console, inserted diskette and chromosomes and any advanced injectors, building the main data structures which get passed to the tgui interface.
can_modify_occupant
Checks if there is a valid DNA Scanner occupant for genetic modification
Checks if there is a valid subject in the DNA Scanner that can be genetically modified. Will set the scanner occupant var as part of this check. Requires that the scanner can be operated and will return early if it can't
check_discovery
Checks whether a mutation alias has been discovered
Checks whether a given mutation's genetic sequence has been completed and discovers it if appropriate
Arguments:
- alias - Alias of the mutation to check (ie "Mutation 51" or "Mutation 12")
connect_to_scanner
Checks for adjacent DNA scanners and connects when it finds a viable one
Seearches cardinal directions in order. Stops when it finds a viable DNA Scanner. Will connect to a broken scanner if no functional scanner is available. Links itself to the DNA Scanner to receive door open and close events.
get_mut_by_ref
Find a mutation from various storage locations via ATOM ref
Takes an ATOM Ref and searches the appropriate mutation buffers and storage vars to try and find the associated mutation.
Arguments:
- ref - ATOM ref of the mutation to locate
- target_flags - Flags for storage mediums to search, see #defines
on_scanner_close
Called by connected DNA Scanners when their doors close.
Sets the new scanner occupant and completes delayed enzyme transfer if one is queued.
on_scanner_open
Called by connected DNA Scanners when their doors open.
Clears enzyme pulse operations, stops processing and nulls the current scanner occupant var.
rad_pulse
Performs the enzyme radiation pulse.
Donor code from previous DNA Console iteration. Called from process() when there is a radiation pulse in progress. Ends processing.
randomize_radiation_accuracy
Creates a randomised accuracy value for the enzyme pulse functionality.
Donor code from previous DNA Console iteration.
Arguments:
- position - Index of the intended enzyme element to pulse
- radduration - Duration of intended radiation pulse
- number_of_blocks - Number of individual data blocks in the pulsed enzyme
scanner_operational
Checks if there is a connected DNA Scanner that is operational
scramble
Scrambles an enzyme element value for the enzyme pulse functionality.
Donor code from previous DNA Console iteration.
Arguments:
- input - Enzyme identity element to scramble, expected hex value
- rs - Strength of radiation pulse, increases the range of possible outcomes
set_default_state
Sets the default state for the tgui interface.