turn EncodeDNABlock proc into a define (#28186)

* turn EncodeDNABlock proc into a define

* changes spelling of EncodeDNABlock to all caps

This is to reflect it now being a define.
This commit is contained in:
Kenionatus
2025-02-09 09:22:38 +00:00
committed by GitHub
parent e5f91c1993
commit 59377ad52d
3 changed files with 7 additions and 9 deletions
+2
View File
@@ -69,3 +69,5 @@
#define DNA_GENDER_FEMALE 0
#define DNA_GENDER_MALE 1
#define DNA_GENDER_PLURAL 2
#define ENCODE_DNA_BLOCK(value) num2hex(value, 3)
+4 -8
View File
@@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// Get a hex-encoded UI block.
/datum/dna/proc/GetUIBlock(block)
return EncodeDNABlock(GetUIValue(block))
return ENCODE_DNA_BLOCK(GetUIValue(block))
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
@@ -356,7 +356,7 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// Get hex-encoded SE block.
/datum/dna/proc/GetSEBlock(block)
return EncodeDNABlock(GetSEValue(block))
return ENCODE_DNA_BLOCK(GetSEValue(block))
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
@@ -387,15 +387,11 @@ GLOBAL_LIST_EMPTY(bad_blocks)
//testing("SetSESubBlock([block],[subBlock],[newSubBlock],[defer]): [oldBlock] -> [newBlock]")
SetSEBlock(block, newBlock, defer)
/proc/EncodeDNABlock(value)
return num2hex(value, 3)
/datum/dna/proc/UpdateUI()
var/list/ui_text_list = list()
uni_identity = ""
for(var/block in UI)
ui_text_list += EncodeDNABlock(block)
ui_text_list += ENCODE_DNA_BLOCK(block)
uni_identity = ui_text_list.Join("")
//testing("New UI: [uni_identity]")
dirtyUI = 0
@@ -405,7 +401,7 @@ GLOBAL_LIST_EMPTY(bad_blocks)
var/list/se_text_list = list()
struc_enzymes = ""
for(var/block in SE)
se_text_list += EncodeDNABlock(block)
se_text_list += ENCODE_DNA_BLOCK(block)
struc_enzymes = se_text_list.Join("")
//testing("Old SE: [oldse]")
//testing("New SE: [struc_enzymes]")
+1 -1
View File
@@ -358,7 +358,7 @@
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(list/buffer)
var/list/arr = list()
for(var/i = 1, i <= length(buffer), i++)
arr += "[i]:[EncodeDNABlock(buffer[i])]"
arr += "[i]:[ENCODE_DNA_BLOCK(buffer[i])]"
return arr
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(obj/item/dnainjector/I, blk, datum/dna2_record/buffer)