mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Update dna_modifier.dm (#36857)
This commit is contained in:
committed by
GitHub
parent
5425b3243f
commit
47cd9cd6b5
@@ -522,11 +522,18 @@
|
|||||||
arr += "[i]:[EncodeDNABlock(buffer[i])]"
|
arr += "[i]:[EncodeDNABlock(buffer[i])]"
|
||||||
return arr
|
return arr
|
||||||
|
|
||||||
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/datum/dna2/record/buffer)
|
//So that we can get the number of the block.
|
||||||
|
/obj/machinery/computer/scan_consolenew/proc/find_block_number(var/blk)
|
||||||
var/pos = findtext(blk,":")
|
var/pos = findtext(blk,":")
|
||||||
if(!pos)
|
if(!pos)
|
||||||
return 0
|
return
|
||||||
var/id = text2num(copytext(blk,1,pos))
|
var/id = text2num(copytext(blk,1,pos))
|
||||||
|
if(!id)
|
||||||
|
return
|
||||||
|
return id
|
||||||
|
|
||||||
|
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/datum/dna2/record/buffer)
|
||||||
|
var/id = find_block_number(blk)
|
||||||
if(!id)
|
if(!id)
|
||||||
return 0
|
return 0
|
||||||
I.block = id
|
I.block = id
|
||||||
@@ -1093,6 +1100,7 @@
|
|||||||
if(arcanetampered)
|
if(arcanetampered)
|
||||||
I.arcanetampered = arcanetampered
|
I.arcanetampered = arcanetampered
|
||||||
var/datum/dna2/record/buf = src.buffers[bufferId]
|
var/datum/dna2/record/buf = src.buffers[bufferId]
|
||||||
|
var/name_to_give = " ([buf.name])" //Will also add the block it has been
|
||||||
if(href_list["createBlockInjector"])
|
if(href_list["createBlockInjector"])
|
||||||
waiting_for_user_input=1
|
waiting_for_user_input=1
|
||||||
var/list/selectedbuf
|
var/list/selectedbuf
|
||||||
@@ -1106,6 +1114,7 @@
|
|||||||
else
|
else
|
||||||
qdel(I)
|
qdel(I)
|
||||||
success = FALSE
|
success = FALSE
|
||||||
|
name_to_give += " (Block [find_block_number(blk)])"
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -1113,7 +1122,7 @@
|
|||||||
waiting_for_user_input=0
|
waiting_for_user_input=0
|
||||||
if(success)
|
if(success)
|
||||||
I.forceMove(src.loc)
|
I.forceMove(src.loc)
|
||||||
I.name += " ([buf.name])"
|
I.name += name_to_give
|
||||||
injector_ready = 0
|
injector_ready = 0
|
||||||
spawn(connected.injector_cooldown)
|
spawn(connected.injector_cooldown)
|
||||||
setInjectorReady()
|
setInjectorReady()
|
||||||
|
|||||||
Reference in New Issue
Block a user