testing
This commit is contained in:
@@ -167,9 +167,11 @@ class MoonsController extends Controller
|
|||||||
//Get the composition for the first ore if it is not None.
|
//Get the composition for the first ore if it is not None.
|
||||||
//Add the first ore composition to the final composition
|
//Add the first ore composition to the final composition
|
||||||
if($firstOre != 'None') {
|
if($firstOre != 'None') {
|
||||||
|
dd($firstOre);
|
||||||
|
|
||||||
$firstComp = $moonCalc->GetOreComposition($firstOre);
|
$firstComp = $moonCalc->GetOreComposition($firstOre);
|
||||||
$rUnits = $moonCalc->CalcReprocessingUnits($firstOre, $firstQuantity);
|
$rUnits = $moonCalc->CalcReprocessingUnits($firstOre, $firstQuantity);
|
||||||
dd($rUnits);
|
|
||||||
|
|
||||||
foreach($firstComp as $key => $value) {
|
foreach($firstComp as $key => $value) {
|
||||||
$composition[$key] += floor(($firstComp[$key] * $rUnits) * $reprocessing);
|
$composition[$key] += floor(($firstComp[$key] * $rUnits) * $reprocessing);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class MoonCalc {
|
|||||||
public function GetOreComposition($ore) {
|
public function GetOreComposition($ore) {
|
||||||
$composition = ItemComposition::where([
|
$composition = ItemComposition::where([
|
||||||
'Name' => $ore,
|
'Name' => $ore,
|
||||||
])->first()->toArray();
|
])->first();
|
||||||
|
|
||||||
return $composition;
|
return $composition;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user