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 ''; }, // Since jsrender breaks the ^ operator - xor: function(number,bit) { + xor: function(number,bit) { return number ^ bit; }, precisionRound: function (value, places) { @@ -172,7 +172,7 @@ NanoBaseHelpers = function () var body = $('body'); // We store data in the body tag, it's as good a place as any _urlParameters = body.data('urlParameters'); var queryString = '?'; - + for (var key in _urlParameters) { if (_urlParameters.hasOwnProperty(key)) @@ -199,7 +199,7 @@ NanoBaseHelpers = function () return queryString; }, // Display DNA Blocks (for the DNA Modifier UI) - displayDNABlocks: function(dnaString, selectedBlock, selectedSubblock, blockSize, paramKey) { + displayDNABlocks: function(dnaString, selectedBlock, selectedSubblock, blockSize, paramKey, blockLabels) { if (!dnaString) { return '
Please place a valid subject into the DNA modifier.
'; @@ -207,9 +207,17 @@ NanoBaseHelpers = function () var characters = dnaString.split(''); - var html = '
'; - var block = 1; + var block = 1; var subblock = 1; + var html; + if (paramKey.toUpperCase() == 'SE') + { + html = '
'; + } + else + { + html = '
'; + } for (index in characters) { if (!characters.hasOwnProperty(index) || typeof characters[index] === 'object') @@ -240,7 +248,14 @@ NanoBaseHelpers = function () { block++; subblock = 1; - html += '
'; + if (paramKey.toUpperCase() == 'SE') + { + html += '
'; + } + else + { + html += '
'; + } } else { @@ -253,7 +268,7 @@ NanoBaseHelpers = function () return html; } }; - + return { addHelpers: function () { @@ -267,14 +282,7 @@ NanoBaseHelpers = function () { NanoTemplate.removeHelper(helperKey); } - } + } } }; } (); - - - - - - - diff --git a/nano/templates/dna_modifier.tmpl b/nano/templates/dna_modifier.tmpl index 9a2804ba987..21f7f984d4c 100644 --- a/nano/templates/dna_modifier.tmpl +++ b/nano/templates/dna_modifier.tmpl @@ -1,6 +1,6 @@ -

Status

@@ -18,7 +18,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm DEAD {{/if}}
- + {{if !data.occupant.isViableSubject || !data.occupant.uniqueIdentity || !data.occupant.structuralEnzymes}}
The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure. @@ -33,27 +33,27 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{/if}}
{{:helper.round(data.occupant.health)}}
- +
Radiation:
{{:helper.displayBar(data.occupant.radiationLevel, 0, 100, 'average')}}
{{:helper.round(data.occupant.radiationLevel)}}
- +
Unique Enzymes:
{{:data.occupant.uniqueEnzymes ? data.occupant.uniqueEnzymes : 'Unknown'}}
- + +
--> {{/if}} {{/if}}
@@ -71,15 +71,15 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{if !data.selectedMenuKey || data.selectedMenuKey == 'ui'}}

Modify Unique Identifier

- {{:helper.displayDNABlocks(data.occupant.uniqueIdentity, data.selectedUIBlock, data.selectedUISubBlock, data.dnaBlockSize, 'UI')}} + {{:helper.displayDNABlocks(data.occupant.uniqueIdentity, data.selectedUIBlock, data.selectedUISubBlock, data.dnaBlockSize, 'UI', data.block_labels)}}
Target:
- {{:helper.link('-', null, {'changeUITarget' : 0}, (data.selectedUITarget > 0) ? null : 'disabled')}} -
 {{:data.selectedUITargetHex}} 
+ {{:helper.link('-', null, {'changeUITarget' : 0}, (data.selectedUITarget > 0) ? null : 'disabled')}} +
 {{:data.selectedUITargetHex}} 
{{:helper.link('+', null, {'changeUITarget' : 1}, (data.selectedUITarget < 15) ? null : 'disabled')}}
@@ -87,22 +87,22 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm
{{:helper.link('Irradiate Block', 'radiation', {'pulseUIRadiation' : 1}, !data.occupant.isViableSubject ? 'disabled' : null)}}
-
+ {{else data.selectedMenuKey == 'se'}}

Modify Structural Enzymes

- {{:helper.displayDNABlocks(data.occupant.structuralEnzymes, data.selectedSEBlock, data.selectedSESubBlock, data.dnaBlockSize, 'SE')}} + {{:helper.displayDNABlocks(data.occupant.structuralEnzymes, data.selectedSEBlock, data.selectedSESubBlock, data.dnaBlockSize, 'SE', data.block_labels)}}
{{:helper.link('Irradiate Block', 'radiation', {'pulseSERadiation' : 1}, !data.occupant.isViableSubject ? 'disabled' : null)}}
-
+ {{else data.selectedMenuKey == 'buffer'}}

Transfer Buffers

{{for data.buffers}}

Buffer {{:(index + 1)}}

-
+
Load Data:
@@ -114,7 +114,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm
{{if value.data}} -
+
Label:
@@ -122,7 +122,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{:helper.link(value.label, 'document-b', {'bufferOption' : 'changeLabel', 'bufferId' : (index + 1)})}}
-
+
Subject:
@@ -130,7 +130,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{:value.owner ? value.owner : 'Unknown'}}
-
+
Stored Data:
@@ -140,13 +140,13 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm
{{else}} -
+
This buffer is empty.
{{/if}} -
+
Options:
@@ -160,12 +160,12 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm
{{/for}} - -

Data Disk

+ +

Data Disk

{{if data.hasDisk}} {{if data.disk.data}} -
+
Label:
@@ -173,7 +173,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{:data.disk.label ? data.disk.label : 'No Label'}}
-
+
Subject:
@@ -181,7 +181,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{:data.disk.owner ? data.disk.owner : 'Unknown'}}
-
+
Stored Data:
@@ -191,20 +191,27 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm
{{else}} -
+
- Disk is blank. + No DNA stored in disk.
{{/if}} +
+ Copy SE labels: +
+
+ {{:helper.link('Copy to Disk', 'arrowthickstop-1-s', {'copyLabelsToDisk' : 1}, null)}} + {{:helper.link('Copy from Disk', 'arrowthickstop-1-n', {'copyLabelsFromDisk' : 1}, null)}} +
{{else}} -
+
No disk inserted.
{{/if}} -
+
Options:
@@ -234,7 +241,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Beaker:
- {{if data.isBeakerLoaded}} + {{if data.isBeakerLoaded}} {{:data.beakerLabel ? data.beakerLabel : 'No label'}}
{{if data.beakerVolume}} {{:data.beakerVolume}} units remaining
@@ -260,8 +267,8 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Intensity:
- {{:helper.link('-', null, {'radiationIntensity' : 0}, (data.radiationIntensity > 1) ? null : 'disabled')}} -
 {{:data.radiationIntensity}} 
+ {{:helper.link('-', null, {'radiationIntensity' : 0}, (data.radiationIntensity > 1) ? null : 'disabled')}} +
 {{:data.radiationIntensity}} 
{{:helper.link('+', null, {'radiationIntensity' : 1}, (data.radiationIntensity < 10) ? null : 'disabled')}}
@@ -270,7 +277,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Duration:
- {{:helper.link('-', null, {'radiationDuration' : 0}, (data.radiationDuration > 2) ? null : 'disabled')}} + {{:helper.link('-', null, {'radiationDuration' : 0}, (data.radiationDuration > 2) ? null : 'disabled')}}
 {{:data.radiationDuration}} 
{{:helper.link('+', null, {'radiationDuration' : 1}, (data.radiationDuration < 20) ? null : 'disabled')}}
@@ -315,4 +322,3 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm
{{/if}} -