From a2e9e774444c274c69785a0c1b9b7de6e35c0815 Mon Sep 17 00:00:00 2001 From: iod6239 <60639431+iod6239@users.noreply.github.com> Date: Sat, 7 Mar 2020 03:21:17 -0500 Subject: [PATCH 1/6] Update secondary_system.dm --- .../transport/pods/secondary_system.dm | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/code/modules/transport/pods/secondary_system.dm b/code/modules/transport/pods/secondary_system.dm index b5f37ae4..45a8166e 100644 --- a/code/modules/transport/pods/secondary_system.dm +++ b/code/modules/transport/pods/secondary_system.dm @@ -673,21 +673,26 @@ usr << output("ERR!&0", "ship_lock.browser:updateReadout") var/code_attempt = uppertext(ckey(href_list["enter"])) if (length(code_attempt) == 4) - var/oldcode = code var/i = 0 + var/j = 0 var/incode = 0 var/rightplace = 0 + var/offset = 0 while (++i < 5) - if (copytext(code_attempt, i,i+1) == copytext(oldcode, 1,2)) + if (copytext(code_attempt, i,i+1) == copytext(code, i, i + 1)) + offset += 2 ** (i-1) rightplace++ incode++ - oldcode = copytext(oldcode,2) continue - - var/foundpoint = findtext(oldcode, copytext(code_attempt,i,i+1)) - if (foundpoint) - incode++ - oldcode = copytext(oldcode, 1,foundpoint) + copytext(oldcode, foundpoint+1) + + i = 0 + while (++i < 5) + j = 0 + while(++j < 5) + if(i != j && (((offset - offset % (2 ** (j - 1))) / (2 ** (j - 1))) % 2 == 0) && (copytext(code_attempt, i,i+1) == copytext(code, j, j+1))) + offset += 2 ** (j-1) + incode++ + j = 5 var/desctext = "" switch(rightplace) From 07d2392df722a511420b2700f991d0b054ebe599 Mon Sep 17 00:00:00 2001 From: iod6239 <60639431+iod6239@users.noreply.github.com> Date: Sat, 7 Mar 2020 03:23:08 -0500 Subject: [PATCH 2/6] Update secure_safe.dm --- code/obj/item/storage/secure_safe.dm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/code/obj/item/storage/secure_safe.dm b/code/obj/item/storage/secure_safe.dm index d0179cbd..52f4a6ff 100644 --- a/code/obj/item/storage/secure_safe.dm +++ b/code/obj/item/storage/secure_safe.dm @@ -64,7 +64,7 @@ if (ispulsingtool(W) && (src.open == 1) && (!src.locked) && (!src.l_hacking)) user.show_message(text("Now attempting to reset internal memory, please hold."), 1) src.l_hacking = 1 - SPAWN_DBG(10 SECONDS) + SPAWN_DBG(100) if (prob(40)) src.l_setshort = 1 configure_mode = 1 @@ -267,21 +267,26 @@ usr << output("ERR!&0", "caselock.browser:updateReadout") var/code_attempt = uppertext(ckey(href_list["enter"])) if (length(code_attempt) == 4) - var/oldcode = code var/i = 0 + var/j = 0 var/incode = 0 var/rightplace = 0 + var/offset = 0 while (++i < 5) - if (copytext(code_attempt, i,i+1) == copytext(oldcode, 1,2)) + if (copytext(code_attempt, i,i+1) == copytext(code, i, i + 1)) + offset += 2 ** (i-1) rightplace++ incode++ - oldcode = copytext(oldcode,2) continue - - var/foundpoint = findtext(oldcode, copytext(code_attempt,i,i+1)) - if (foundpoint) - incode++ - oldcode = copytext(oldcode, 1,foundpoint) + copytext(oldcode, foundpoint+1) + + i = 0 + while (++i < 5) + j = 0 + while(++j < 5) + if(i != j && (((offset - offset % (2 ** (j - 1))) / (2 ** (j - 1))) % 2 == 0) && (copytext(code_attempt, i,i+1) == copytext(code, j, j+1))) + offset += 2 ** (j-1) + incode++ + j = 5 var/desctext = "" switch(rightplace) From 18f8ff976729e40b5840218d1c5a7b7a542698ff Mon Sep 17 00:00:00 2001 From: iod6239 <60639431+iod6239@users.noreply.github.com> Date: Tue, 10 Mar 2020 15:05:30 -0400 Subject: [PATCH 3/6] Revert "Update secondary_system.dm" --- .../transport/pods/secondary_system.dm | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/code/modules/transport/pods/secondary_system.dm b/code/modules/transport/pods/secondary_system.dm index 45a8166e..b5f37ae4 100644 --- a/code/modules/transport/pods/secondary_system.dm +++ b/code/modules/transport/pods/secondary_system.dm @@ -673,26 +673,21 @@ usr << output("ERR!&0", "ship_lock.browser:updateReadout") var/code_attempt = uppertext(ckey(href_list["enter"])) if (length(code_attempt) == 4) + var/oldcode = code var/i = 0 - var/j = 0 var/incode = 0 var/rightplace = 0 - var/offset = 0 while (++i < 5) - if (copytext(code_attempt, i,i+1) == copytext(code, i, i + 1)) - offset += 2 ** (i-1) + if (copytext(code_attempt, i,i+1) == copytext(oldcode, 1,2)) rightplace++ incode++ + oldcode = copytext(oldcode,2) continue - - i = 0 - while (++i < 5) - j = 0 - while(++j < 5) - if(i != j && (((offset - offset % (2 ** (j - 1))) / (2 ** (j - 1))) % 2 == 0) && (copytext(code_attempt, i,i+1) == copytext(code, j, j+1))) - offset += 2 ** (j-1) - incode++ - j = 5 + + var/foundpoint = findtext(oldcode, copytext(code_attempt,i,i+1)) + if (foundpoint) + incode++ + oldcode = copytext(oldcode, 1,foundpoint) + copytext(oldcode, foundpoint+1) var/desctext = "" switch(rightplace) From 78d0b46ffe634721c27f98d8b547449eff6be00b Mon Sep 17 00:00:00 2001 From: iod6239 <60639431+iod6239@users.noreply.github.com> Date: Tue, 10 Mar 2020 15:06:24 -0400 Subject: [PATCH 4/6] Revert "Update secure_safe.dm" --- code/obj/item/storage/secure_safe.dm | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/code/obj/item/storage/secure_safe.dm b/code/obj/item/storage/secure_safe.dm index 52f4a6ff..d0179cbd 100644 --- a/code/obj/item/storage/secure_safe.dm +++ b/code/obj/item/storage/secure_safe.dm @@ -64,7 +64,7 @@ if (ispulsingtool(W) && (src.open == 1) && (!src.locked) && (!src.l_hacking)) user.show_message(text("Now attempting to reset internal memory, please hold."), 1) src.l_hacking = 1 - SPAWN_DBG(100) + SPAWN_DBG(10 SECONDS) if (prob(40)) src.l_setshort = 1 configure_mode = 1 @@ -267,26 +267,21 @@ usr << output("ERR!&0", "caselock.browser:updateReadout") var/code_attempt = uppertext(ckey(href_list["enter"])) if (length(code_attempt) == 4) + var/oldcode = code var/i = 0 - var/j = 0 var/incode = 0 var/rightplace = 0 - var/offset = 0 while (++i < 5) - if (copytext(code_attempt, i,i+1) == copytext(code, i, i + 1)) - offset += 2 ** (i-1) + if (copytext(code_attempt, i,i+1) == copytext(oldcode, 1,2)) rightplace++ incode++ + oldcode = copytext(oldcode,2) continue - - i = 0 - while (++i < 5) - j = 0 - while(++j < 5) - if(i != j && (((offset - offset % (2 ** (j - 1))) / (2 ** (j - 1))) % 2 == 0) && (copytext(code_attempt, i,i+1) == copytext(code, j, j+1))) - offset += 2 ** (j-1) - incode++ - j = 5 + + var/foundpoint = findtext(oldcode, copytext(code_attempt,i,i+1)) + if (foundpoint) + incode++ + oldcode = copytext(oldcode, 1,foundpoint) + copytext(oldcode, foundpoint+1) var/desctext = "" switch(rightplace) From 1ca99b924e15ee1fc95d798510b5d07301f04e1a Mon Sep 17 00:00:00 2001 From: iod6239 <60639431+iod6239@users.noreply.github.com> Date: Mon, 30 Mar 2020 14:52:53 -0400 Subject: [PATCH 5/6] Update vending.dm --- code/modules/vending/vending.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/vending/vending.dm b/code/modules/vending/vending.dm index dd9f42a0..718a5eaf 100644 --- a/code/modules/vending/vending.dm +++ b/code/modules/vending/vending.dm @@ -1387,6 +1387,8 @@ else boutput(user, "[bicon(W)] Regular electrical response received from access panel.") return + else if (issnippingtool(W) && src.panel_open) + return src.attack_hand(user) else if (ispulsingtool(W)) return src.attack_hand(user) @@ -1889,4 +1891,4 @@ #undef WIRE_EXTEND #undef WIRE_SCANID #undef WIRE_SHOCK -#undef WIRE_SHOOTINV \ No newline at end of file +#undef WIRE_SHOOTINV From 8a75fb7f0f3aee6a4bc875989745d802e1cc81c5 Mon Sep 17 00:00:00 2001 From: iod6239 <60639431+iod6239@users.noreply.github.com> Date: Mon, 30 Mar 2020 14:54:16 -0400 Subject: [PATCH 6/6] Update seed.dm --- code/obj/submachine/seed.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/obj/submachine/seed.dm b/code/obj/submachine/seed.dm index f56baf95..ef64b3bd 100644 --- a/code/obj/submachine/seed.dm +++ b/code/obj/submachine/seed.dm @@ -1269,6 +1269,10 @@ src.panelopen = 0 boutput(user, "You [src.panelopen ? "open" : "close"] the maintenance panel.") src.updateUsrDialog() + else if (issnippingtool(W) && src.panelopen) + return src.attack_hand(user) + else if (ispulsingtool(W)) + return src.attack_hand(user) else ..() proc/isWireColorCut(var/wireColor)