From 95c2b09c9462ecd5c79303dc956a3f91caa00a1b Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 5 Dec 2014 21:59:52 +0000 Subject: [PATCH 1/3] Fix num2hex()'s handling of zero --- code/__HELPERS/type2type.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 8c188d0d18..12c8dc5d7c 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -50,8 +50,10 @@ placeholder = 2 if (!( isnum(num) )) return - if (!( num )) - return "0" + if (num == 0) + var/final = "" + for(var/i=1 to placeholder) final = "[final]0" + return final var/hex = "" var/i = 0 while(16 ** i < num) From bb4f81e443a698cbb5a6731cbccbe4531cb4e25d Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 6 Dec 2014 18:01:31 +0300 Subject: [PATCH 2/3] Fix for #7232. --- code/game/machinery/adv_med.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 963b07df0f..0f7491b3c9 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -334,9 +334,9 @@ dat += text("Inaprovaline: [] units
", occ["inaprovaline_amount"]) dat += text("Soporific: [] units
", occ["stoxin_amount"]) - dat += text("[]\tDermaline: [] units
", (occ["dermaline"] < 30 ? "" : ""), occ["dermaline"]) - dat += text("[]\tBicaridine: [] units
", (occ["bicaridine"] < 30 ? "" : ""), occ["bicaridine"]) - dat += text("[]\tDexalin: [] units
", (occ["dexalin"] < 30 ? "" : ""), occ["dexalin"]) + dat += text("[]\tDermaline: [] units
", (occ["dermaline_amount"] < 30 ? "" : ""), occ["dermaline_amount"]) + dat += text("[]\tBicaridine: [] units
", (occ["bicaridine_amount"] < 30 ? "" : ""), occ["bicaridine_amount"]) + dat += text("[]\tDexalin: [] units
", (occ["dexalin_amount"] < 30 ? "" : ""), occ["dexalin_amount"]) for(var/datum/disease/D in occ["tg_diseases_list"]) if(!D.hidden[SCANNER]) From 8df3e41788924185c6d4bf1bf6f54daa0c0cf59a Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 6 Dec 2014 18:08:12 +0300 Subject: [PATCH 3/3] Fix for #7204. --- code/WorkInProgress/computer3/computers/medical.dm | 4 +++- code/WorkInProgress/computer3/computers/security.dm | 4 +++- code/game/machinery/computer/medical.dm | 6 +++++- code/game/machinery/computer/security.dm | 4 +++- code/game/machinery/computer/skills.dm | 4 +++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/code/WorkInProgress/computer3/computers/medical.dm b/code/WorkInProgress/computer3/computers/medical.dm index 5cb984ee36..f7e6167e1d 100644 --- a/code/WorkInProgress/computer3/computers/medical.dm +++ b/code/WorkInProgress/computer3/computers/medical.dm @@ -377,6 +377,8 @@ src.active1.fields["p_stat"] = "Physically Unfit" if("disabled") src.active1.fields["p_stat"] = "Disabled" + if(PDA_Manifest.len) + PDA_Manifest.Cut() if (href_list["m_stat"]) if (src.active1) @@ -525,4 +527,4 @@ src.printing = null interact() - return + return \ No newline at end of file diff --git a/code/WorkInProgress/computer3/computers/security.dm b/code/WorkInProgress/computer3/computers/security.dm index f3a3d3ae2b..1c409da853 100644 --- a/code/WorkInProgress/computer3/computers/security.dm +++ b/code/WorkInProgress/computer3/computers/security.dm @@ -594,6 +594,8 @@ What a mess.*/ R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released") if(5) R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit") + if(PDA_Manifest.len) + PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue @@ -606,4 +608,4 @@ What a mess.*/ /obj/machinery/computer3/secure_data/detective_computer icon = 'icons/obj/computer.dmi' - icon_state = "messyfiles" + icon_state = "messyfiles" \ No newline at end of file diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index a23c717a7b..6d347224f2 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -367,6 +367,8 @@ src.active1.fields["p_stat"] = "Physically Unfit" if("disabled") src.active1.fields["p_stat"] = "Disabled" + if(PDA_Manifest.len) + PDA_Manifest.Cut() if (href_list["m_stat"]) if (src.active1) @@ -536,6 +538,8 @@ R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+") if(5) R.fields["p_stat"] = pick("*SSD*", "Active", "Physically Unfit", "Disabled") + if(PDA_Manifest.len) + PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue @@ -550,4 +554,4 @@ /obj/machinery/computer/med_data/laptop name = "Medical Laptop" desc = "Cheap Nanotrasen Laptop." - icon_state = "medlaptop" + icon_state = "medlaptop" \ No newline at end of file diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index fde49fb7e3..af720b8c19 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -601,6 +601,8 @@ What a mess.*/ R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released") if(5) R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit") + if(PDA_Manifest.len) + PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue @@ -613,4 +615,4 @@ What a mess.*/ /obj/machinery/computer/secure_data/detective_computer icon = 'icons/obj/computer.dmi' - icon_state = "messyfiles" + icon_state = "messyfiles" \ No newline at end of file diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 6d2a4857c5..c08f227b10 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -404,6 +404,8 @@ What a mess.*/ R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released") if(5) R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit") + if(PDA_Manifest.len) + PDA_Manifest.Cut() if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") continue @@ -412,4 +414,4 @@ What a mess.*/ del(R) continue - ..(severity) + ..(severity) \ No newline at end of file