scan_consolenew
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 |
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_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_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 |
jokerready | 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 |
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 |
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_genetic_makeup | Used for setting tgui data - List of occupant mutations |
tgui_inserted_disk_mutations | Used for setting tgui data - List of inserted_disk stored 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
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
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_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_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
jokerready
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
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
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_genetic_makeup
Used for setting tgui data - List of occupant mutations
tgui_inserted_disk_mutations
Used for setting tgui data - List of inserted_disk stored 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
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
- inserted_disk 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 inserted_disk.
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.