diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 920e9d0f609..7a561f2d7e4 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -291,11 +291,14 @@ return 1 /obj/machinery/dna_scannernew/ex_act(severity) + //This is by far the oldest code I have ever seen, please appreciate how it's preserved in comments for distant posterity. Have some perspective of where we came from. switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) + //A.loc = src.loc + A.forceMove(src.loc) + //ex_act(severity) + A.ex_act(severity) //Foreach goto(35) //SN src = null qdel(src) @@ -303,8 +306,10 @@ if(2.0) if (prob(50)) for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) + //A.loc = src.loc + A.forceMove(src.loc) + //ex_act(severity) + A.ex_act(severity) //Foreach goto(108) //SN src = null qdel(src) @@ -318,8 +323,8 @@ //SN src = null qdel(src) return - else - return + //else + //return /obj/machinery/dna_scannernew/blob_act() @@ -328,7 +333,7 @@ /obj/machinery/computer/scan_consolenew name = "DNA Modifier Access Console" - desc = "Scand DNA." + desc = "Scans DNA." icon = 'icons/obj/computer.dmi' icon_state = "dna" density = 1 @@ -348,6 +353,7 @@ var/radiation_intensity = 1.0 var/list/datum/dna2/record/buffers[3] var/irradiating = 0 + var/list/datum/block_label/labels[DNA_SE_LENGTH] // Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete. var/injector_ready = 0 @@ -361,6 +367,10 @@ light_color = LIGHT_COLOR_BLUE +/datum/block_label + var/name = "" + var/color = "#1c1c1c" + /obj/machinery/computer/scan_consolenew/attackby(obj/O as obj, mob/user as mob) ..() if (istype(O, /obj/item/weapon/disk/data)) //INSERT SOME diskS @@ -371,29 +381,25 @@ return /obj/machinery/computer/scan_consolenew/ex_act(severity) - switch(severity) if(1.0) - //SN src = null qdel(src) return if(2.0) if (prob(50)) - //SN src = null qdel(src) return - else - return /obj/machinery/computer/scan_consolenew/blob_act() - if(prob(75)) qdel(src) /obj/machinery/computer/scan_consolenew/New() ..() - for(var/i=0;i<3;i++) - buffers[i+1]=new /datum/dna2/record + for(var/i=1;i<=3;i++) + buffers[i] = new /datum/dna2/record + for(var/i=1;i<=DNA_SE_LENGTH;i++) + labels[i] = new /datum/block_label spawn(5) connected = findScanner() spawn(250) @@ -510,6 +516,11 @@ data["selectedSESubBlock"] = selected_se_subblock data["selectedUITarget"] = selected_ui_target data["selectedUITargetHex"] = selected_ui_target_hex + var/list/new_labels = list() + for(var/datum/block_label/lmao2list in src.labels) + new_labels += list(list("name" = lmao2list.name, "color" = lmao2list.color)) //Yes, you are reading this right, "list(list())"[sic]. If you're a sane person you're probably wondering what the fuck this is. + //You know those weird, creepy twins that only speak between themselves in a made-up language that nobody else understands? NanoUI is it's OWN retarded twin. + data["block_labels"] = new_labels var/occupantData[0] if (!src.connected.occupant || !src.connected.occupant.dna) @@ -787,6 +798,31 @@ connected.beaker = null return 1 + if(href_list["changeBlockLabel"]) + var/which = text2num(href_list["changeBlockLabel"]) + var/datum/block_label/label = labels[which] + var/text = copytext(sanitize(input(usr, "New Label:", "Edit Label", label.name) as text|null),1,MAX_NAME_LEN) + if(!Adjacent(usr) || usr.incapacitated() || (stat & (BROKEN | NOPOWER | EMPED))) + return + if(text) //you can color the tab without a label, sure why not + label.name = text + var/newcolor = input("Select Tab Color", "Edit Label", label.color) as color + if(!Adjacent(usr) || usr.incapacitated() || (stat & (BROKEN | NOPOWER | EMPED))) + return + if(newcolor) + label.color = newcolor + return 1 + + if(href_list["copyLabelsFromDisk"]) + if(disk) + labels = disk.labels.Copy() + return 1 + + if(href_list["copyLabelsToDisk"]) + if(disk) + disk.labels = labels.Copy() + return 1 + if(href_list["ejectOccupant"]) connected.eject_occupant() return 1 diff --git a/code/modules/medical/cloning.dm b/code/modules/medical/cloning.dm index 48e3690a322..4178027b36c 100644 --- a/code/modules/medical/cloning.dm +++ b/code/modules/medical/cloning.dm @@ -76,17 +76,23 @@ item_state = "card-id" w_class = W_CLASS_TINY var/datum/dna2/record/buf=null + var/list/datum/block_label/labels[DNA_SE_LENGTH] //This is not related to cloning, these are colored tabs for Genetics machinery. Multipurpose floppies, why not? var/read_only = 0 //Well,it's still a floppy disk +/obj/item/weapon/disk/data/New() + for(var/i=1;i<=DNA_SE_LENGTH;i++) + labels[i] = new /datum/block_label + /obj/item/weapon/disk/data/proc/Initialize() buf = new - buf.dna=new + buf.dna = new /obj/item/weapon/disk/data/demo name = "data disk - 'God Emperor of Mankind'" read_only = 1 /obj/item/weapon/disk/data/demo/New() + ..() Initialize() buf.types=DNA2_BUF_UE|DNA2_BUF_UI //data = "066000033000000000AF00330660FF4DB002690" @@ -102,6 +108,7 @@ read_only = 1 /obj/item/weapon/disk/data/monkey/New() + ..() Initialize() buf.types=DNA2_BUF_SE var/list/new_SE=list(0x098,0x3E8,0x403,0x44C,0x39F,0x4B0,0x59D,0x514,0x5FC,0x578,0x5DC,0x640,0x6A4) diff --git a/html/changelogs/9600bauds_FUCKNANOFUCKNANOFUCKNANO.yml b/html/changelogs/9600bauds_FUCKNANOFUCKNANOFUCKNANO.yml new file mode 100644 index 00000000000..da1b584553e --- /dev/null +++ b/html/changelogs/9600bauds_FUCKNANOFUCKNANOFUCKNANO.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscdel (general deleting of nice things) +# rscadd (general adding of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: 9600bauds_fucknanoUI + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# There needs to be a space after the - and before the prefix. Don't use tabs anywhere in this file. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# If you're using characters such as # ' : - or the like in your changelog, surround the entire change with quotes as shown in the second example. These quotes don't show up on the changelog once it's merged and prevent errors. +# SCREW ANY OF THIS UP AND IT WON'T WORK. +changes: +- rscadd: "You can now click SE numbers at DNA Modifier Consoles to modify the block's color, and give it a little note when moused over. Useful for labeling SE blocks with the power/disability they have." diff --git a/nano/js/nano_base_helpers.js b/nano/js/nano_base_helpers.js index 33b27c25773..63d4446ca21 100644 --- a/nano/js/nano_base_helpers.js +++ b/nano/js/nano_base_helpers.js @@ -17,7 +17,7 @@ NanoBaseHelpers = function () }, combine: function( arr1, arr2 ) { return arr1 && arr2 ? arr1.concat(arr2) : arr1 || arr2; - }, + }, dump: function( arr1 ) { return JSON.stringify(arr1); }, @@ -51,7 +51,7 @@ NanoBaseHelpers = function () return '