/tg/ Station 13 - Modules - Types — Var Details - Proc Details

Techweb

A datum representing a research techweb

Techweb datums are meant to store unlocked research, being able to be stored on research consoles, servers, and disks. They are NOT global.

Vars

available_experimentsThis is a list of all incomplete experiment datums that are accessible for scientists to complete
available_nodesNodes that can immediately be researched, all reqs met. Associative for faster lookup.
boosted_nodesA list of nodes that have been boosted. Associative for faster lookup.
completed_experimentsAn associative list of all experiment typepaths to instances that have been completed
consoles_accessingAll RD consoles connected to this individual techweb.
custom_designsCustom inserted designs like from disks that should survive recalculation.
deconstructed_itemsList of items already deconstructed for research points, preventing infinite research point generation.
discovered_mutationsMutations discovered by genetics, this way they are shared and cant be destroyed by destroying a single console
experiment_editsGets bumped when an admin edits one of our experiments, so the research UIs know to resend descriptions
hidden_nodesHidden nodes. Used for unhiding nodes when requirements are met by removing the entry of the node. Associative for faster lookup.
idThe id/name of the whole Techweb viewable to players.
income_modifierA multiplier applied to all research gain, cut in half if the Master server was sabotaged.
last_bitcoinsCurrent per-second production, used for display only.
last_incomeThe amount of research points generated the techweb generated the latest time it generated.
organizationOrganization name, used for display
published_papersAssoc list of papers already published by the crew. published_papers[experiment_typepath][tier] = paper Filled with nulls on init, populated only on publication.
research_logsGame logs of research nodes, "node_name" "node_cost" "node_researcher" "node_research_location"
research_pointsAvailable research points, type = number
research_queue_nodesAssoc list of nodes queued for automatic research when there are enough points available e.g: /datum/techweb_node/mining --> /mob/living/carbon/human (weakref)
researched_designsA list of unlocked designs. Associative for faster lookup.
researched_nodesA list of researched nodes. Associative for faster lookup.
scientific_cooperationAssoc list of relationships with various partners scientific_cooperation[partner_typepath] = relationship
should_generate_pointsBoolean on whether the techweb should generate research points overtime.
skipped_experiment_typesAssoc list of all experiment datums that have been skipped, to tech point reward for completing them - That is, upon researching a node without completing its associated discounts, their experiments go here. Completing these experiments will have a refund.
techweb_serversAll research servers connected to this individual techweb.
tiersAssoc list, id = number, 1 is available, 2 is all reqs are 1, so on
ui_stage_textsThe type and text of each stage of the experiments the research UIs show, by experiment type, as their live data last saw them
ui_stage_texts_versionGets bumped when ui_stage_texts changes, as the research UIs send stage texts as static data
visible_nodesVisible nodes, doesn't mean it can be researched. Associative for faster lookup.

Procs

absorb_techdiskTakes all of the research from a tech disk
add_designAdds a design to this techweb
add_experimentAdds an experiment to this techweb by its type, ensures that no duplicates are added.
add_experimentsAdds a list of experiments to this techweb by their types, ensures that no duplicates are added.
add_scientific_paperPublish the paper into our techweb. Cancel if we are not allowed to.
adjust_all_pointsAdjust all point types by this amount
adjust_multiple_pointsAdjusts the amount of multiple point types
adjust_pointsAdjusts the amount of a certain point type
boost_techweb_nodeBoosts a techweb node.
can_unlock_nodeChecks if a node can be unlocked on this techweb, having the required points and experiments
complete_experimentNotifies the techweb that an experiment has been completed, updating internal state of the techweb to reflect this.
design_addedA design was added to this techweb
design_removedA design was removed from this techweb
enqueue_nodeAdds a node to this techweb's research queue
get_researched_design_datumsReturns a flat list of all design datums this techweb has researched.
get_ui_dataReturns the live data the research UIs show, with everything referenced by catalogue id.
get_ui_experiment_descriptionReturns an experiment's description for the research UIs, with the type and text of each stage of its progress
get_ui_stage_valuesReturns the values of each stage of an experiment's progress, bumping ui_stage_texts_version if the stage types or texts changed
get_ui_static_dataReturns the descriptions of the experiments the research UIs show, by catalogue id
get_ui_static_keyReturns everything the research UIs' static data depends on - the catalogue build, this techweb, and its experiments
have_experiments_for_nodeChecks if all experiments have been completed for a given node on this techweb
initialize_published_papersFill published_papers with nulls.
is_valid_designCheck if we can add a design to this techweb
node_addedA node was added to this techweb
node_removedA node was removed from this techweb
remove_designRemoves a design from this techweb
research_nodeAdds a node to this techweb
unhide_nodeRemoves a node from the hidden_nodes list, making it viewable and researchable (if no experiments are required).
unresearch_nodeRemoves a node from this techweb

Var Details

available_experiments

This is a list of all incomplete experiment datums that are accessible for scientists to complete

available_nodes

Nodes that can immediately be researched, all reqs met. Associative for faster lookup.

boosted_nodes

A list of nodes that have been boosted. Associative for faster lookup.

completed_experiments

An associative list of all experiment typepaths to instances that have been completed

consoles_accessing

All RD consoles connected to this individual techweb.

custom_designs

Custom inserted designs like from disks that should survive recalculation.

deconstructed_items

List of items already deconstructed for research points, preventing infinite research point generation.

discovered_mutations

Mutations discovered by genetics, this way they are shared and cant be destroyed by destroying a single console

experiment_edits

Gets bumped when an admin edits one of our experiments, so the research UIs know to resend descriptions

hidden_nodes

Hidden nodes. Used for unhiding nodes when requirements are met by removing the entry of the node. Associative for faster lookup.

id

The id/name of the whole Techweb viewable to players.

income_modifier

A multiplier applied to all research gain, cut in half if the Master server was sabotaged.

last_bitcoins

Current per-second production, used for display only.

last_income

The amount of research points generated the techweb generated the latest time it generated.

organization

Organization name, used for display

published_papers

Assoc list of papers already published by the crew. published_papers[experiment_typepath][tier] = paper Filled with nulls on init, populated only on publication.

research_logs

Game logs of research nodes, "node_name" "node_cost" "node_researcher" "node_research_location"

research_points

Available research points, type = number

research_queue_nodes

Assoc list of nodes queued for automatic research when there are enough points available e.g: /datum/techweb_node/mining --> /mob/living/carbon/human (weakref)

researched_designs

A list of unlocked designs. Associative for faster lookup.

researched_nodes

A list of researched nodes. Associative for faster lookup.

scientific_cooperation

Assoc list of relationships with various partners scientific_cooperation[partner_typepath] = relationship

should_generate_points

Boolean on whether the techweb should generate research points overtime.

skipped_experiment_types

Assoc list of all experiment datums that have been skipped, to tech point reward for completing them - That is, upon researching a node without completing its associated discounts, their experiments go here. Completing these experiments will have a refund.

techweb_servers

All research servers connected to this individual techweb.

tiers

Assoc list, id = number, 1 is available, 2 is all reqs are 1, so on

ui_stage_texts

The type and text of each stage of the experiments the research UIs show, by experiment type, as their live data last saw them

ui_stage_texts_version

Gets bumped when ui_stage_texts changes, as the research UIs send stage texts as static data

visible_nodes

Visible nodes, doesn't mean it can be researched. Associative for faster lookup.

Proc Details

absorb_techdisk

Takes all of the research from a tech disk

add_design

Adds a design to this techweb

Arguments:

add_experiment

Adds an experiment to this techweb by its type, ensures that no duplicates are added.

Arguments:

add_experiments

Adds a list of experiments to this techweb by their types, ensures that no duplicates are added.

Arguments:

add_scientific_paper

Publish the paper into our techweb. Cancel if we are not allowed to.

adjust_all_points

Adjust all point types by this amount

adjust_multiple_points

Adjusts the amount of multiple point types

adjust_points

Adjusts the amount of a certain point type

boost_techweb_node

Boosts a techweb node.

can_unlock_node

Checks if a node can be unlocked on this techweb, having the required points and experiments

Arguments:

complete_experiment

Notifies the techweb that an experiment has been completed, updating internal state of the techweb to reflect this.

Arguments:

design_added

A design was added to this techweb

design_removed

A design was removed from this techweb

enqueue_node

Adds a node to this techweb's research queue

get_researched_design_datums

Returns a flat list of all design datums this techweb has researched.

get_ui_data

Returns the live data the research UIs show, with everything referenced by catalogue id.

Nodes are id, tier and TECHWEB_UI_* flag triples, the queue is id and queuer pairs, and experiments are id, stage values and completed triples. Only experiments a node lists get an id, since those are the only ones the UIs show anyway. Stage types and texts are in the static data.

Arguments:

get_ui_experiment_description

Returns an experiment's description for the research UIs, with the type and text of each stage of its progress

get_ui_stage_values

Returns the values of each stage of an experiment's progress, bumping ui_stage_texts_version if the stage types or texts changed

get_ui_static_data

Returns the descriptions of the experiments the research UIs show, by catalogue id

get_ui_static_key

Returns everything the research UIs' static data depends on - the catalogue build, this techweb, and its experiments

have_experiments_for_node

Checks if all experiments have been completed for a given node on this techweb

Arguments:

initialize_published_papers

Fill published_papers with nulls.

is_valid_design

Check if we can add a design to this techweb

node_added

A node was added to this techweb

node_removed

A node was removed from this techweb

remove_design

Removes a design from this techweb

Arguments:

research_node

Adds a node to this techweb

Arguments:

unhide_node

Removes a node from the hidden_nodes list, making it viewable and researchable (if no experiments are required).

unresearch_node

Removes a node from this techweb

Arguments: