diff options
author | emkael <emkael@tlen.pl> | 2025-02-10 23:54:59 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2025-02-10 23:54:59 +0100 |
commit | 5f4bf95d5baad11e1ea206043c5c1ef332e59fc2 (patch) | |
tree | 846e1c44c432592f63613b0d92d8fc4af8e2bdaf | |
parent | a878f6c9003c0dca5680f620fae993fc7c7d29e4 (diff) |
2025.01.01 update to RegKlas: if points for 1st place are defined, they're no longer minimum, they're strictly assigned to first place
-rw-r--r-- | http/api-inc.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/http/api-inc.php b/http/api-inc.php index 63c6763..cb26c69 100644 --- a/http/api-inc.php +++ b/http/api-inc.php @@ -38,7 +38,8 @@ function run($parameters) { '2' => 'ApiPklV2', // RegKMP 2020.01.01 '3' => 'ApiPklV3', // local BNET 2020.05.01 '3.1' => 'ApiPklV3_1', // local BNET changes from 2021.01.10 - '_default' => 'ApiPklV3_1' + '4.0' => 'ApiPklV4', // RegKlas 2025.01.01 + '_default' => 'ApiPklV4' ); $version = isset($parameters['version']) ? $parameters['version'] : '_default'; $apiClass = isset($versionClasses[$version]) ? $versionClasses[$version] : $versionClasses['_default']; @@ -326,4 +327,16 @@ class ApiPklV3_1 extends ApiPklV3 { } +// 2025.01.01 - parameterized points for 1st place are no longer a minimum, they're strictly applied +class ApiPklV4 extends ApiPklV3_1 { + + protected function _get_max_points() { + if ($this->parameters['min_points']) { + return $this->parameters['min_points']; + } + return parent::_get_max_points(); + } + +} + ?> |