diff --git a/app/Http/Controllers/MoonsController.php b/app/Http/Controllers/MoonsController.php index c9e1c8b19..c6d7070ab 100644 --- a/app/Http/Controllers/MoonsController.php +++ b/app/Http/Controllers/MoonsController.php @@ -33,7 +33,7 @@ class MoonsController extends Controller //Setup formats as needed $spm = $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon; $rentalEnd = date('m/d/Y', $moon->RentalEnd); - $price = $moonCalc->SpatialMoons($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity, + $price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity, $moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity); //Add the data to the html string to be passed to the view $html .= ''; diff --git a/app/Library/MoonCalc.php b/app/Library/MoonCalc.php index 62546ceae..873a8872b 100644 --- a/app/Library/MoonCalc.php +++ b/app/Library/MoonCalc.php @@ -19,40 +19,6 @@ use App\Models\ItemComposition; class MoonCalc { - private function IsRMoon($ore) { - $ores = [ - 'Zeolites' => 'Gas', - 'Sylvite' => 'Gas', - 'Bitumens' => 'Gas', - 'Coesite' => 'Gas', - 'Cobaltite' => 'R8', - 'Euxenite' => 'R8', - 'Titanite' => 'R8', - 'Scheelite' => 'R8', - 'Otavite' => 'R16', - 'Sperrylite' => 'R16', - 'Vanadinite' => 'R16', - 'Chromite' => 'R16', - 'Carnotite' => 'R32', - 'Zircon' => 'R32', - 'Pollucite' => 'R32', - 'Cinnabar' => 'R32', - 'Xenotime' => 'R64', - 'Monazite' => 'R64', - 'Loparite' => 'R64', - 'Ytterbite' => 'R64', - ]; - - foreach($ores as $key => $value) { - - if(strtolower($key) == strtolower($ore)) { - return true; - } - } - - return false; - } - public function SpatialMoonsOnlyGoo($firstOre, $firstQuan, $secondOre, $secondQuan, $thirdOre, $thirdQuan, $fourthOre, $fourthQuan) { //Always assume a 1 month pull which equates to 5.55m3 per second or 2,592,000 seconds //Total pull size is 14,385,600 m3 @@ -375,4 +341,42 @@ class MoonCalc { private function ConvertToPercentage($quantity) { return $quantity / 100.00; } + + private function IsRMoon($ore) { + $ores = [ + 'Prime Arkonor' => 'Null', + 'Cubic Bistot' => 'Null', + 'Pellucid Crokite' => 'Null', + 'Jet Ochre' => 'Null', + 'Zeolites' => 'Gas', + 'Sylvite' => 'Gas', + 'Bitumens' => 'Gas', + 'Coesite' => 'Gas', + 'Cobaltite' => 'R8', + 'Euxenite' => 'R8', + 'Titanite' => 'R8', + 'Scheelite' => 'R8', + 'Otavite' => 'R16', + 'Sperrylite' => 'R16', + 'Vanadinite' => 'R16', + 'Chromite' => 'R16', + 'Carnotite' => 'R32', + 'Zircon' => 'R32', + 'Pollucite' => 'R32', + 'Cinnabar' => 'R32', + 'Xenotime' => 'R64', + 'Monazite' => 'R64', + 'Loparite' => 'R64', + 'Ytterbite' => 'R64', + ]; + + foreach($ores as $key => $value) { + + if(strtolower($key) == strtolower($ore)) { + return true; + } + } + + return false; + } } \ No newline at end of file