mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Allow point reversion policies to be customized for each module
This commit is contained in:
parent
5f8586ec8f
commit
7a6400f39d
4 changed files with 43 additions and 13 deletions
|
|
@ -271,7 +271,7 @@ class PointModel extends Point
|
|||
*
|
||||
* @param int $module_srl
|
||||
* @param string $config_key
|
||||
* @return int
|
||||
* @return int|bool
|
||||
*/
|
||||
public static function getModulePointConfig($module_srl, $config_key)
|
||||
{
|
||||
|
|
@ -306,10 +306,10 @@ class PointModel extends Point
|
|||
else
|
||||
{
|
||||
$default_config = self::getConfig();
|
||||
$point = $default_config->{$config_key};
|
||||
$point = $default_config->{$config_key} ?? 0;
|
||||
}
|
||||
|
||||
return intval($point);
|
||||
return is_bool($point) ? $point : intval($point);
|
||||
}
|
||||
}
|
||||
/* End of file point.model.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue