sc: rename 'unit' field to 'pop' in data includes
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 05:38:33 +0000 (07:38 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000 (15:38 +0200)
sc-units-bw.inc.pl
sc-units-hots.inc.pl
sc.plp

index 94918dc7e71eef3170e83ed6f6876b7ae7d6801b..7d59dc4b17470c93101bf8376d06cc0d103e803e 100644 (file)
@@ -19,7 +19,7 @@ min => 50,
 gas => 0,
 build => 20,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'protoss',
 organic => 0,
 hp => 20,
@@ -79,7 +79,7 @@ min => 100,
 gas => 0,
 build => 40,
 suit => 1,
-unit => 2,
+pop => 2,
 race => 'protoss',
 organic => 1,
 hp => 100,
@@ -120,7 +120,7 @@ min => 125,
 gas => 50,
 build => 50,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'protoss',
 organic => 0,
 hp => 100,
@@ -166,7 +166,7 @@ min => 50,
 gas => 150,
 build => 50,
 suit => 1,
-unit => 2,
+pop => 2,
 race => 'protoss',
 organic => 1,
 hp => 40,
@@ -221,7 +221,7 @@ min => 125,
 gas => 100,
 build => 50,
 suit => 1,
-unit => 2,
+pop => 2,
 race => 'protoss',
 organic => 1,
 hp => 80,
@@ -261,7 +261,7 @@ gas => 300,
 build => 20,
 base => ['templar', 'templar'],
 suit => 3,
-unit => 4,
+pop => 4,
 race => 'protoss',
 organic => 0,
 hp => 10,
@@ -294,7 +294,7 @@ gas => 200,
 build => 20,
 base => ['dark templar', 'dark templar'],
 suit => 3,
-unit => 4,
+pop => 4,
 race => 'protoss',
 organic => 0,
 hp => 25,
@@ -357,7 +357,7 @@ min => 275,
 gas => 125,
 build => 80,
 suit => 3,
-unit => 3,
+pop => 3,
 race => 'protoss',
 organic => 0,
 air => 1,
@@ -411,7 +411,7 @@ min => 150,
 gas => 100,
 build => 40,
 suit => 2,
-unit => 2,
+pop => 2,
 race => 'protoss',
 organic => 0,
 air => 1,
@@ -467,7 +467,7 @@ min => 350,
 gas => 250,
 build => 140,
 suit => 3,
-unit => 6,
+pop => 6,
 race => 'protoss',
 organic => 0,
 hp => 300,
@@ -490,7 +490,7 @@ special => [
                min => 25,
                build => 20,
                suit => 1,
-               unit => 0,
+               pop => 0,
                race => 'protoss',
                organic => 0,
                hp => 40,
@@ -534,7 +534,7 @@ min => 100,
 gas => 350,
 build => 160,
 suit => 3,
-unit => 4,
+pop => 4,
 race => 'protoss',
 organic => 0,
 air => 1,
@@ -601,7 +601,7 @@ min => 200,
 gas => 100,
 build => 70,
 suit => 3,
-unit => 4,
+pop => 4,
 race => 'protoss',
 organic => 0,
 hp => 100,
@@ -664,7 +664,7 @@ min => 25,
 gas => 75,
 build => 40,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'protoss',
 organic => 0,
 air => 1,
@@ -710,7 +710,7 @@ min => 200,
 gas => 0,
 build => 60,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'protoss',
 organic => 0,
 hp => 80,
@@ -740,7 +740,7 @@ min => 50,
 gas => 0,
 build => 20,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'terran',
 organic => 0,
 hp =>  60,
@@ -794,7 +794,7 @@ min => 50,
 gas => 0,
 build => 24,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'terran',
 organic => 1,
 hp =>  40,
@@ -850,7 +850,7 @@ min => 50,
 gas => 25,
 build => 24,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'terran',
 organic => 1,
 hp =>  50,
@@ -900,7 +900,7 @@ min => 25,
 gas => 75,
 build => 50,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'terran',
 organic => 1,
 hp =>  45,
@@ -967,7 +967,7 @@ special => [
                abbr => 'ns',
                min => 200,
                gas => 200,
-               unit => 8,
+               pop => 8,
                desc => 'guides a nuclear missile which will do 500 damage',
                duration => 14+3,
                range => 8,
@@ -982,7 +982,7 @@ min => 50,
 gas => 25,
 build => 30,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'terran',
 organic => 1,
 hp =>  60,
@@ -1043,7 +1043,7 @@ min => 75,
 gas => 0,
 build => 30,
 suit => 2,
-unit => 2,
+pop => 2,
 race => 'terran',
 organic => 0,
 hp =>  80,
@@ -1108,7 +1108,7 @@ min => 150,
 gas => 100,
 build => 50,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'terran',
 organic => 0,
 hp => 150,
@@ -1159,7 +1159,7 @@ min => 100,
 gas => 50,
 build => 40,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'terran',
 organic => 0,
 hp => 125,
@@ -1206,7 +1206,7 @@ min => 150,
 gas => 100,
 build => 60,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'terran',
 organic => 0,
 air => 1,
@@ -1265,7 +1265,7 @@ min => 400,
 gas => 300,
 build => 133,
 suit => 3,
-unit => 6,
+pop => 6,
 race => 'terran',
 organic => 0,
 air => 1,
@@ -1322,7 +1322,7 @@ min => 100,
 gas => 225,
 build => 80,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'terran',
 organic => 0,
 air => 1,
@@ -1388,7 +1388,7 @@ min => 250,
 gas => 125,
 build => 50,
 suit => 3,
-unit => 3,
+pop => 3,
 race => 'terran',
 organic => 0,
 air => 1,
@@ -1417,7 +1417,7 @@ min => 100,
 gas => 100,
 build => 50,
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'terran',
 organic => 0,
 air => 1,
@@ -1438,7 +1438,7 @@ min => 50,
 gas => 0,
 build => 20,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'zerg',
 organic => 1,
 hp => 40,
@@ -1462,7 +1462,7 @@ min => 100,
 gas => 0,
 build => 40,
 suit => 3,
-unit => -9,
+pop => -9,
 race => 'zerg',
 organic => 1,
 air => 1,
@@ -1506,7 +1506,7 @@ trans => {
 },
 build => 20,
 suit => 1,
-unit => 0,
+pop => 0,
 race => 'zerg',
 organic => 1,
 hp => 25,
@@ -1584,7 +1584,7 @@ min => 25,
 gas => 0,
 build => 28, # for 2
 suit => 1,
-unit => 0.5,
+pop => 0.5,
 race => 'zerg',
 organic => 1,
 hp => 35,
@@ -1630,7 +1630,7 @@ min => 75,
 gas => 25,
 build => 28,
 suit => 2,
-unit => 1,
+pop => 1,
 race => 'zerg',
 organic => 1,
 hp => 80,
@@ -1683,7 +1683,7 @@ gas => 125,
 base => 'hydralisk',
 build => 40,
 suit => 2,
-unit => 2,
+pop => 2,
 race => 'zerg',
 organic => 1,
 hp => 125,
@@ -1709,7 +1709,7 @@ min => 100,
 gas => 100,
 build => 50,
 suit => 2,
-unit => 2,
+pop => 2,
 race => 'zerg',
 organic => 1,
 air => 1,
@@ -1756,7 +1756,7 @@ special => [
                count => 2,
                alt => 'Broodling',
                suit => 1,
-               unit => 0,
+               pop => 0,
                organic => 1,
                hp => 30,
                armor => 0,
@@ -1782,7 +1782,7 @@ min => 100,
 gas => 50,
 build => 40,
 suit => 1,
-unit => 1,
+pop => 1,
 race => 'zerg',
 organic => 1,
 hp => 60,
@@ -1807,7 +1807,7 @@ min => 12,
 gas => 38,
 build => 30, # for 2
 suit => 1,
-unit => 0.5,
+pop => 0.5,
 race => 'zerg',
 organic => 1,
 air => 1,
@@ -1832,7 +1832,7 @@ min => 100,
 gas => 100,
 build => 40,
 suit => 1,
-unit => 2,
+pop => 2,
 race => 'zerg',
 organic => 1,
 air => 1,
@@ -1873,7 +1873,7 @@ gas => 200,
 build => 40,
 base => 'mutalisk',
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'zerg',
 organic => 1,
 air => 1,
@@ -1900,7 +1900,7 @@ gas => 150,
 build => 40,
 base => 'mutalisk',
 suit => 3,
-unit => 2,
+pop => 2,
 race => 'zerg',
 organic => 1,
 air => 1,
@@ -1928,7 +1928,7 @@ min => 50,
 gas => 150,
 build => 50,
 suit => 2,
-unit => 2,
+pop => 2,
 race => 'zerg',
 organic => 1,
 hp => 80,
@@ -1977,7 +1977,7 @@ min => 200,
 gas => 200,
 build => 60,
 suit => 3,
-unit => 4,
+pop => 4,
 race => 'zerg',
 organic => 1,
 hp => 400,
index 5d558d101e92bba77ffc8c738408a34b225d79bf..df3794444474a2ffa955411c184ae2b257a33316 100644 (file)
@@ -11,7 +11,7 @@ use strict;
        race => 'protoss',
        cat => 'base',
        name => 'Probe',
-       unit => 1,
+       pop => 1,
        min => 50,
        gas => 0,
        build => 17,
@@ -71,7 +71,7 @@ use strict;
        race => 'protoss',
        cat => 'base',
        name => 'Mothership Core',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 100,
        build => 30,
@@ -132,7 +132,7 @@ use strict;
        race => 'protoss',
        cat => 'base',
        name => 'Mothership',
-       unit => 8,
+       pop => 8,
        min => 300,
        gas => 300,
        build => 100,
@@ -233,7 +233,7 @@ use strict;
        race => 'protoss',
        cat => 'gateway',
        name => 'Zealot',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 0,
        build => 38,
@@ -280,7 +280,7 @@ use strict;
        race => 'protoss',
        cat => 'gateway',
        name => 'Sentry',
-       unit => 2,
+       pop => 2,
        min => 50,
        gas => 100,
        build => 37,
@@ -341,7 +341,7 @@ use strict;
        race => 'protoss',
        cat => 'gateway',
        name => 'Stalker',
-       unit => 2,
+       pop => 2,
        min => 125,
        gas => 50,
        build => 42,
@@ -389,7 +389,7 @@ use strict;
        race => 'protoss',
        cat => 'gateway',
        name => 'High Templar',
-       unit => 2,
+       pop => 2,
        min => 50,
        gas => 150,
        build => 55,
@@ -435,7 +435,7 @@ use strict;
        race => 'protoss',
        cat => 'gateway',
        name => 'Dark Templar',
-       unit => 2,
+       pop => 2,
        min => 125,
        gas => 125,
        build => 55,
@@ -478,7 +478,7 @@ use strict;
        name => 'Archon',
        min => 100, # or 175 or 250
        gas => 300, # or 275 or 250
-       unit => 4,
+       pop => 4,
        build => 12,
        base => ['Templar', 'Templar'],
        size => 1.5,
@@ -513,7 +513,7 @@ use strict;
        race => 'protoss',
        cat => 'robotic',
        name => 'Immortal',
-       unit => 4,
+       pop => 4,
        min => 250,
        gas => 100,
        build => 55,
@@ -556,7 +556,7 @@ use strict;
        race => 'protoss',
        cat => 'robotic',
        name => 'Colossus',
-       unit => 6,
+       pop => 6,
        min => 300,
        gas => 200,
        build => 75,
@@ -604,7 +604,7 @@ use strict;
        race => 'protoss',
        cat => 'robotic',
        name => 'Observer',
-       unit => 1,
+       pop => 1,
        min => 25,
        gas => 75,
        build => 30,
@@ -644,7 +644,7 @@ use strict;
        race => 'protoss',
        cat => 'robotic',
        name => 'Warp Prism',
-       unit => 2,
+       pop => 2,
        min => 200,
        gas => 0,
        build => 50,
@@ -683,7 +683,7 @@ use strict;
        race => 'protoss',
        cat => 'stargate',
        name => 'Phoenix',
-       unit => 2,
+       pop => 2,
        min => 150,
        gas => 100,
        build => 35,
@@ -744,7 +744,7 @@ use strict;
        race => 'protoss',
        cat => 'stargate',
        name => 'Void Ray',
-       unit => 4,
+       pop => 4,
        min => 250,
        gas => 150,
        build => 60,
@@ -796,7 +796,7 @@ use strict;
        race => 'protoss',
        cat => 'stargate',
        name => 'Oracle',
-       unit => 3,
+       pop => 3,
        min => 150,
        gas => 150,
        build => 50,
@@ -855,7 +855,7 @@ use strict;
        race => 'protoss',
        cat => 'stargate',
        name => 'Tempest',
-       unit => 4,
+       pop => 4,
        min => 300,
        gas => 200,
        build => 60,
@@ -902,7 +902,7 @@ use strict;
        race => 'protoss',
        cat => 'stargate',
        name => 'Carrier',
-       unit => 6,
+       pop => 6,
        min => 350,
        gas => 250,
        build => 120,
@@ -931,7 +931,7 @@ use strict;
        special => [
                {
                        alt => 'Interceptor',
-                       unit => 0,
+                       pop => 0,
                        min => 25,
                        gas => 0,
                        build => 8,
@@ -982,7 +982,7 @@ use strict;
        race => 'terran',
        cat => 'base',
        name => 'SCV', # T-280 Space Construction Vehicle
-       unit => 1,
+       pop => 1,
        min => 50,
        gas => 0,
        build => 17,
@@ -1012,7 +1012,7 @@ use strict;
        race => 'terran',
        cat => 'base',
        name => 'Mule',
-       unit => 0,
+       pop => 0,
        min => 0,
        build => 0,
        size => 0.75,
@@ -1083,7 +1083,7 @@ use strict;
        cat => 'base',
        name => 'Planetary Fortress',
        base => ['Command Center'],
-       unit => -11,
+       pop => -11,
        min => 150,
        gas => 150,
        build => 50,
@@ -1141,7 +1141,7 @@ use strict;
        race => 'terran',
        cat => 'barracks',
        name => 'Marine',
-       unit => 1,
+       pop => 1,
        min => 50,
        gas => 0,
        build => 25,
@@ -1201,7 +1201,7 @@ use strict;
        race => 'terran',
        cat => 'barracks',
        name => 'Marauder',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 25,
        build => 30,
@@ -1273,7 +1273,7 @@ use strict;
        race => 'terran',
        cat => 'barracks',
        name => 'Reaper',
-       unit => 1,
+       pop => 1,
        min => 50,
        gas => 50,
        build => 40,
@@ -1313,7 +1313,7 @@ use strict;
        race => 'terran',
        cat => 'barracks',
        name => 'Ghost',
-       unit => 2,
+       pop => 2,
        min => 200,
        gas => 100,
        build => 40,
@@ -1382,7 +1382,7 @@ use strict;
        race => 'terran',
        cat => 'factory',
        name => 'Hellion',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 0,
        build => 30,
@@ -1443,7 +1443,7 @@ use strict;
        race => 'terran',
        cat => 'factory',
        name => 'Hellbat',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 0,
        build => 30,
@@ -1499,7 +1499,7 @@ use strict;
        race => 'terran',
        cat => 'factory',
        name => 'Widow Mine',
-       unit => 2,
+       pop => 2,
        min => 75,
        gas => 25,
        build => 40,
@@ -1542,7 +1542,7 @@ use strict;
        race => 'terran',
        cat => 'factory',
        name => 'Siege Tank',
-       unit => 3,
+       pop => 3,
        min => 150,
        gas => 125,
        build => 45,
@@ -1601,7 +1601,7 @@ use strict;
        race => 'terran',
        cat => 'factory',
        name => 'Thor',
-       unit => 6,
+       pop => 6,
        min => 300,
        gas => 200,
        build => 60,
@@ -1658,7 +1658,7 @@ use strict;
        race => 'terran',
        cat => 'starport',
        name => 'Viking',
-       unit => 2,
+       pop => 2,
        min => 150,
        gas => 75,
        build => 42,
@@ -1713,7 +1713,7 @@ use strict;
        race => 'terran',
        cat => 'starport',
        name => 'Medivac',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 100,
        build => 42,
@@ -1761,7 +1761,7 @@ use strict;
        race => 'terran',
        cat => 'starport',
        name => 'Banshee', # AH/G-24
-       unit => 3,
+       pop => 3,
        min => 150,
        gas => 100,
        build => 60,
@@ -1807,7 +1807,7 @@ use strict;
        race => 'terran',
        cat => 'starport',
        name => 'Raven',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 200,
        build => 60,
@@ -1958,7 +1958,7 @@ use strict;
        race => 'terran',
        cat => 'starport',
        name => 'Battlecruiser',
-       unit => 6,
+       pop => 6,
        min => 400,
        gas => 300,
        build => 90,
@@ -2030,7 +2030,7 @@ use strict;
        race => 'zerg',
        cat => 'base',
        name => 'Drone',
-       unit => 1,
+       pop => 1,
        min => 50,
        gas => 0,
        build => 17,
@@ -2060,7 +2060,7 @@ use strict;
        race => 'zerg',
        cat => 'base',
        name => 'Queen',
-       unit => 2,
+       pop => 2,
        min => 150,
        gas => 0,
        build => 50,
@@ -2130,7 +2130,7 @@ use strict;
        race => 'zerg',
        cat => 'base',
        name => 'Overlord',
-       unit => -9,
+       pop => -9,
        min => 100,
        gas => 0,
        build => 25,
@@ -2180,7 +2180,7 @@ use strict;
        cat => 'base',
        name => 'Overseer',
        base => ['Overlord'],
-       unit => -9,
+       pop => -9,
        min => 100+50,
        gas => 50,
        build => 17,
@@ -2241,7 +2241,7 @@ use strict;
        race => 'zerg',
        cat => 'creep',
        name => 'Larva',
-       unit => 0,
+       pop => 0,
        build => 15,
        size => 0.25,
        cargo => 0,
@@ -2341,7 +2341,7 @@ use strict;
        race => 'zerg',
        cat => 'hatchery',
        name => 'Zergling',
-       unit => 0.5,
+       pop => 0.5,
        min => 25,
        gas => 0,
        build => 24,
@@ -2395,7 +2395,7 @@ use strict;
        cat => 'hatchery',
        name => 'Baneling',
        base => ['Zergling'],
-       unit => 0.5,
+       pop => 0.5,
        min => 25+25,
        gas => 25,
        build => 20,
@@ -2441,7 +2441,7 @@ use strict;
        race => 'zerg',
        cat => 'hatchery',
        name => 'Roach',
-       unit => 2,
+       pop => 2,
        min => 75,
        gas => 25,
        build => 27,
@@ -2500,7 +2500,7 @@ use strict;
        race => 'zerg',
        cat => 'lair',
        name => 'Hydralisk',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 50,
        build => 33,
@@ -2553,7 +2553,7 @@ use strict;
        race => 'zerg',
        cat => 'lair',
        name => 'Infestor',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 150,
        build => 50,
@@ -2653,7 +2653,7 @@ use strict;
        race => 'zerg',
        cat => 'lair',
        name => 'Swarm Host',
-       unit => 4,
+       pop => 4,
        min => 100,
        gas => 200,
        build => 40,
@@ -2727,7 +2727,7 @@ use strict;
        race => 'zerg',
        cat => 'lair',
        name => 'Mutalisk',
-       unit => 2,
+       pop => 2,
        min => 100,
        gas => 100,
        build => 33,
@@ -2767,7 +2767,7 @@ use strict;
        race => 'zerg',
        cat => 'lair',
        name => 'Corruptor',
-       unit => 2,
+       pop => 2,
        min => 150,
        gas => 100,
        build => 40,
@@ -2813,7 +2813,7 @@ use strict;
        cat => 'hive',
        name => 'Brood Lord',
        base => ['Corruptor'],
-       unit => 4,
+       pop => 4,
        min => 150+150,
        gas => 100+150,
        build => 34,
@@ -2846,7 +2846,7 @@ use strict;
                        desc => 'Broodlings are spawned upon each attack',
                        duration => -1,
                        alt => 'Broodling',
-                       unit => 0,
+                       pop => 0,
 #                      build => 1,
                        size => 0.75,
                        cargo => 0,
@@ -2883,7 +2883,7 @@ use strict;
        race => 'zerg',
        cat => 'hive',
        name => 'Viper',
-       unit => 3,
+       pop => 3,
        min => 100,
        gas => 200,
        build => 40,
@@ -2934,7 +2934,7 @@ use strict;
        race => 'zerg',
        cat => 'hive',
        name => 'Ultralisk',
-       unit => 6,
+       pop => 6,
        min => 300,
        gas => 200,
        build => 55,
diff --git a/sc.plp b/sc.plp
index dc32a47f67b16dddf57266e0b21cbec0a8106d2b..e1132b855564884470427bcdb21b7a1ad5ebf15c 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -266,7 +266,7 @@ sub showrange {
                                        && '<span class="unit-massive" title="massive">⚓</span>',
                        ),
                        '<td class="val unit">' . (
-                               defined $_->{unit} && $_->{unit} == .5 ? '½' : $_->{unit}
+                               defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop}
                        ),
                        '<td class="unit unit-type">' . join('', grep { $_ }
                                (defined $_->{organic} ? !$_->{organic} : $_->{attr}->{mech})
@@ -316,13 +316,13 @@ sub showrange {
                $get{order} ||= '';
                if ($get{order} eq 'size') {
                        $_->{order} = (
-                               $_->{unit}*16 + ($_->{size} // $_->{suit}) + $_->{cargo}/8
+                               $_->{pop}*16 + ($_->{size} // $_->{suit}) + $_->{cargo}/8
                                + $_->{hp}/512 + $_->{min}/8192
                        ) for @$units;
                }
                elsif ($get{order} eq 'cost') {
                        $_->{order} = (
-                               $_->{gas}*1.5 + $_->{min} + $_->{unit}/8 + $_->{build}/256/8
+                               $_->{gas}*1.5 + $_->{min} + $_->{pop}/8 + $_->{build}/256/8
                        ) for @$units;
                }
                elsif ($get{order} eq 'attack') {