From 01ee8b97b230722ed4f1159f624dd1b745816902 Mon Sep 17 00:00:00 2001 From: scamtank Date: Fri, 5 Jun 2015 18:24:02 +0300 Subject: [PATCH 1/2] Add format guide to item-descriptions.lua Including a short list of the screen's limitations would be a good idea, I think. --- scripts/item-descriptions.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/item-descriptions.lua b/scripts/item-descriptions.lua index dd85d54ba..9ce970c95 100644 --- a/scripts/item-descriptions.lua +++ b/scripts/item-descriptions.lua @@ -1,6 +1,15 @@ -- Holds custom descriptions for view-item-info -- By PeridexisErrant +-- Each line near the bottom has 53 characters of room until +-- it starts clipping over the UI in an ugly fashion. +-- For proper spacing, 50 characters is the maximum. +-- Descriptions which aren't pushed down the page by +-- barrel contents or such line up with the UI on the +-- 11th line down. There is room for a 10th long line +-- without clipping, but stopping at 9 leaves enough space +-- for ideal legibility. + -- The following people contributed descriptions: -- Raideau, PeridexisErrant, /u/Puffin4Tom, /u/KroyMortlach -- /u/genieus, /u/TeamsOnlyMedic, /u/johny5w, /u/DerTanni From 8336e831d2a753131ed6260be398018dbd38fe2f Mon Sep 17 00:00:00 2001 From: scamtank Date: Fri, 5 Jun 2015 19:59:28 +0300 Subject: [PATCH 2/2] Fixed elasticity descriptions Previous order of comparisons would describe any amount of strain at yield below 50000 as "elastic". Flip the order of checks and it works as intended. Seems like a simple mistake, I don't think this'll break anything else. --- scripts/view-item-info.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/view-item-info.lua b/scripts/view-item-info.lua index bb8594656..9ea539ca2 100644 --- a/scripts/view-item-info.lua +++ b/scripts/view-item-info.lua @@ -72,12 +72,12 @@ function GetMatPropertiesStringList (item) append(list,"Temperature: "..deg_C.."\248C ("..deg_U.."U)") append(list,"Color: "..df.global.world.raws.language.colors[mat.state_color.Solid].name) local function GetStrainDescription (number) - if tonumber(number) >= 50000 then return "very elastic" - elseif tonumber(number) < 50000 then return "elastic" - elseif tonumber(number) < 15001 then return "medium" - elseif tonumber(number) < 5001 then return "stiff" + if tonumber(number) < 1 then return "crystalline" elseif tonumber(number) < 1000 then return "very stiff" - elseif tonumber(number) < 1 then return "crystalline" + elseif tonumber(number) < 5001 then return "stiff" + elseif tonumber(number) < 15001 then return "medium" + elseif tonumber(number) < 50000 then return "elastic" + elseif tonumber(number) >= 50000 then return "very elastic" else return "unknown" end end local mat_properties_for = {"BAR", "SMALLGEM", "BOULDER", "ROUGH",