FML/Script/Script.php
public function addScriptConstant($name, $value = null)
    {
        if ($name instanceof ScriptConstant) {
            $scriptConstant = $name;
        } else {
            $scriptConstant = new ScriptConstant($name, $value);
        }
        if (!in_array($scriptConstant, $this->constants)) {
            array_push($this->constants, $scriptConstant);
        }
        return $this;
    }
public function addScriptConstant($name, $value = null)
    {
        if ($name instanceof ScriptConstant) {
            $scriptConstant = $name;
        } else {
            $scriptConstant = new ScriptConstant($name, $value);
        }
        if (!in_array($scriptConstant, $this->constants)) {
            array_push($this->constants, $scriptConstant);
        }
        return $this;
    }
public function addScriptConstant ( $ name , $ value = null ) { if ( $ name instanceof ScriptConstant ) { $ scriptConstant = $ name ; } else { $ scriptConstant = new ScriptConstant ( $ name , $ value ) ; } if ( ! in_array ( $ scriptConstant , $ this -> constants ) ) { array_push ( $ this -> constants , $ scriptConstant ) ; } return $ this ; }
Add a Script Constant

@api
@param string|ScriptConstant $name  Constant name or ScriptConstant
@param string                $value Constant value
@return static
Add a Script Constant