This commit is contained in:
2019-11-06 23:21:12 -06:00
parent f48f75ab79
commit 93db789a0f
2 changed files with 4 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;
} }