From f5e535f48dc60fdcaa93b9b6ee523801448b9f82 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 22 Jun 2015 09:56:29 +0200 Subject: [PATCH] sc: colourise negative supply values (providers) --- sc.css | 3 +++ sc.plp | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sc.css b/sc.css index 0f2bb88..17aec81 100644 --- a/sc.css +++ b/sc.css @@ -37,6 +37,9 @@ table h2 { .units td.unit + td.unit { padding-left: 0; } +.unit-supply { + color: #080; +} .unit-o {color: #C08} /* organic */ .unit-u {color: #44C} /* mechanic */ .unit-p {color: #0A8} /* psionic */ diff --git a/sc.plp b/sc.plp index e1132b8..09ae989 100644 --- a/sc.plp +++ b/sc.plp @@ -265,8 +265,9 @@ sub showrange { $_->{attr}->{massive} && '⚓', ), - '' . ( - defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop} + sprintf('%s', + defined $_->{pop} && $_->{pop} < 0 && ' unit-supply', + defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop}, ), '' . join('', grep { $_ } (defined $_->{organic} ? !$_->{organic} : $_->{attr}->{mech}) -- 2.30.0