scan_consolenew ![code/game/machinery/computer/dna_console.dm 65](git.png)
Vars | |
can_use_scanner | Used for setting tgui data - Whether the connected DNA Scanner is usable |
---|---|
connected_scanner | Currently connected DNA Scanner |
crispr_charges | Counter for CRISPR charges |
delayed_action | Current delayed action, used for delayed enzyme transfer on scanner door close |
diskette | Currently stored genetic data diskette |
enzyme_copy_timer | Cooldown for the genetic makeup transfer actions. |
genetic_damage_pulse_index | Index of the enzyme being modified during delayed enzyme pulse operations |
genetic_damage_pulse_timer | World time when the enzyme pulse should complete |
genetic_damage_pulse_type | Which dna string to edit with the pulse |
genetic_makeup_buffer | Maximum number of enzymes we can store |
injector_ready | World time when injectors are ready to be printed |
injector_selection | Assoc list of all advanced injectors. Keys are injector names. Values are lists of mutations. |
is_crispr_ready | Used for setting tgui data - Is CRISPR ready? |
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 | 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 |
joker_ready | World time when JOKER algorithm can be used in DNA Consoles |
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 |
pulse_duration | Duration for enzyme genetic damage pulses |
pulse_strength | Strength for enzyme genetic damage pulses |
scanner_occupant | Current DNA Scanner occupant |
scramble_ready | 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 | |
build_chrom_list | |
build_genetic_makeup_list | Builds the genetic makeup list which will be sent to tgui interface. |
build_mutation_list | |
can_modify_occupant | |
check_discovery | |
connect_to_scanner | |
eject_disk | |
genetic_damage_pulse | |
get_mut_by_ref | |
on_scanner_close | |
on_scanner_open | |
randomize_GENETIC_DAMAGE_accuracy | |
scanner_operational | Checks if there is a connected DNA Scanner that is operational |
scramble | |
set_default_state | Sets the default state for the tgui interface. |
Var Details
can_use_scanner ![code/game/machinery/computer/dna_console.dm 119](git.png)
Used for setting tgui data - Whether the connected DNA Scanner is usable
connected_scanner ![code/game/machinery/computer/dna_console.dm 142](git.png)
Currently connected DNA Scanner
crispr_charges ![code/game/machinery/computer/dna_console.dm 164](git.png)
Counter for CRISPR charges
delayed_action ![code/game/machinery/computer/dna_console.dm 107](git.png)
Current delayed action, used for delayed enzyme transfer on scanner door close
diskette ![code/game/machinery/computer/dna_console.dm 104](git.png)
Currently stored genetic data diskette
enzyme_copy_timer ![code/game/machinery/computer/dna_console.dm 116](git.png)
Cooldown for the genetic makeup transfer actions.
genetic_damage_pulse_index ![code/game/machinery/computer/dna_console.dm 110](git.png)
Index of the enzyme being modified during delayed enzyme pulse operations
genetic_damage_pulse_timer ![code/game/machinery/computer/dna_console.dm 112](git.png)
World time when the enzyme pulse should complete
genetic_damage_pulse_type ![code/game/machinery/computer/dna_console.dm 114](git.png)
Which dna string to edit with the pulse
genetic_makeup_buffer ![code/game/machinery/computer/dna_console.dm 82](git.png)
Maximum number of enzymes we can store
injector_ready ![code/game/machinery/computer/dna_console.dm 97](git.png)
World time when injectors are ready to be printed
injector_selection ![code/game/machinery/computer/dna_console.dm 88](git.png)
Assoc list of all advanced injectors. Keys are injector names. Values are lists of mutations.
is_crispr_ready ![code/game/machinery/computer/dna_console.dm 129](git.png)
Used for setting tgui data - Is CRISPR ready?
is_injector_ready ![code/game/machinery/computer/dna_console.dm 127](git.png)
Used for setting tgui data - Whether injectors are ready to be printed
is_joker_ready ![code/game/machinery/computer/dna_console.dm 125](git.png)
Used for setting tgui data - Whether JOKER algorithm is ready
is_pulsing ![code/game/machinery/computer/dna_console.dm 131](git.png)
Used for setting tgui data - Wheher an enzyme pulse operation is ongoing
is_scramble_ready ![code/game/machinery/computer/dna_console.dm 123](git.png)
Used for setting tgui data - Whether Scramble DNA is ready
is_viable_occupant ![code/game/machinery/computer/dna_console.dm 121](git.png)
Used for setting tgui data - Whether the current DNA Scanner occupant is viable for genetic modification
joker_ready ![code/game/machinery/computer/dna_console.dm 99](git.png)
World time when JOKER algorithm can be used in DNA Consoles
max_injector_instability ![code/game/machinery/computer/dna_console.dm 94](git.png)
Maximum total instability of all combined mutations allowed on an advanced injector
max_injector_mutations ![code/game/machinery/computer/dna_console.dm 92](git.png)
Maximum number of mutation that an advanced injector can store
max_injector_selections ![code/game/machinery/computer/dna_console.dm 90](git.png)
Maximum number of advanced injectors that DNA Consoles store
pulse_duration ![code/game/machinery/computer/dna_console.dm 78](git.png)
Duration for enzyme genetic damage pulses
pulse_strength ![code/game/machinery/computer/dna_console.dm 80](git.png)
Strength for enzyme genetic damage pulses
scanner_occupant ![code/game/machinery/computer/dna_console.dm 144](git.png)
Current DNA Scanner occupant
scramble_ready ![code/game/machinery/computer/dna_console.dm 101](git.png)
World time when Scramble can be used in DNA Consoles
stored_chromosomes ![code/game/machinery/computer/dna_console.dm 86](git.png)
List of all chromosomes stored in the DNA Console
stored_mutations ![code/game/machinery/computer/dna_console.dm 84](git.png)
List of all mutations stored on the DNA Console
stored_research ![code/game/machinery/computer/dna_console.dm 76](git.png)
Link to the techweb's stored research. Used to retrieve stored mutations
tgui_advinjector_mutations ![code/game/machinery/computer/dna_console.dm 157](git.png)
Used for setting tgui data - List of occupant mutations
tgui_console_chromosomes ![code/game/machinery/computer/dna_console.dm 153](git.png)
Used for setting tgui data - List of DNA Console chromosomes
tgui_console_mutations ![code/game/machinery/computer/dna_console.dm 149](git.png)
Used for setting tgui data - List of DNA Console stored mutations
tgui_diskette_mutations ![code/game/machinery/computer/dna_console.dm 151](git.png)
Used for setting tgui data - List of diskette stored mutations
tgui_genetic_makeup ![code/game/machinery/computer/dna_console.dm 155](git.png)
Used for setting tgui data - List of occupant mutations
tgui_occupant_mutations ![code/game/machinery/computer/dna_console.dm 147](git.png)
Used for setting tgui data - List of occupant mutations
tgui_view_state ![code/game/machinery/computer/dna_console.dm 161](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 137](git.png)
Used for setting tgui data - Time until injectors are ready
time_to_joker ![code/game/machinery/computer/dna_console.dm 135](git.png)
Used for setting tgui data - Time until joker is ready
time_to_pulse ![code/game/machinery/computer/dna_console.dm 139](git.png)
Used for setting tgui data - Time until the enzyme pulse is complete
time_to_scramble ![code/game/machinery/computer/dna_console.dm 133](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.
eject_disk
-
Ejects the DNA Disk from the console.
-
Will insert into the user's hand if possible, otherwise will drop it at the
-
console's location.
-
Arguments:
-
-
- user - The mob that is attempting to eject the diskette.
genetic_damage_pulse
-
Performs the enzyme genetic damage pulse.
- Donor code from previous DNA Console iteration. Called from process() when
- there is a genetic damage pulse in progress. Ends processing.
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.
randomize_GENETIC_DAMAGE_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
-
- pulse_duration - Duration of intended genetic damage 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 genetic damage pulse, increases the range of possible outcomes
set_default_state
Sets the default state for the tgui interface.