mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-19 05:09:49 +01:00
b0f0f4685f
* First pass * fixes * more fixes * num2hex length changes * pass 2 * fixed warning * looc log fix * . * update tgui * . * . * . * . * perttier * cleanup * . * . * fix token * no * . * . * . * , * modsay eventsay * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
//Used to create the gene mask. Shamelessly stolen from the plant controller and cut down.
|
|
|
|
/client/proc/show_xenobio_genes()
|
|
set category = "Debug"
|
|
set name = "Show Xenobio Genes"
|
|
set desc = "Prints the round's plant xenobio masks."
|
|
|
|
if(!holder) return
|
|
|
|
if(!xenobio_controller || !xenobio_controller.gene_tag_masks)
|
|
to_chat(usr, "Gene masks not set.")
|
|
return
|
|
|
|
for(var/mask in xenobio_controller.gene_tag_masks)
|
|
to_chat(usr, "[mask]: [xenobio_controller.gene_tag_masks[mask]]")
|
|
|
|
var/global/datum/controller/xenobio/xenobio_controller // Set in New().
|
|
|
|
/datum/controller/xenobio
|
|
|
|
var/list/gene_tag_masks = list() // Gene obfuscation for delicious trial and error goodness.
|
|
|
|
/datum/controller/xenobio/New()
|
|
if(xenobio_controller && xenobio_controller != src)
|
|
log_runtime("Rebuilding xenobio controller.")
|
|
qdel(xenobio_controller)
|
|
xenobio_controller = src
|
|
setup()
|
|
|
|
|
|
/datum/controller/xenobio/proc/setup()
|
|
|
|
var/list/used_masks = list()
|
|
var/list/xenobio_traits = ALL_XENO_GENES
|
|
while(xenobio_traits && xenobio_traits.len)
|
|
var/gene_tag = pick(xenobio_traits)
|
|
var/gene_mask = "[uppertext(num2hex(rand(0,255), 2))]"
|
|
|
|
while(gene_mask in used_masks)
|
|
gene_mask = "[uppertext(num2hex(rand(0,255), 2))]"
|
|
|
|
used_masks += gene_mask
|
|
xenobio_traits -= gene_tag
|
|
gene_tag_masks[gene_tag] = gene_mask
|