From e5a225a68768238ed675e4287d427f28193d8281 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sun, 13 Sep 2020 21:01:07 -0500 Subject: [PATCH] moon calc changes --- app/Library/Moons/MoonCalc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Library/Moons/MoonCalc.php b/app/Library/Moons/MoonCalc.php index 338268bc7..0bc9d8a99 100644 --- a/app/Library/Moons/MoonCalc.php +++ b/app/Library/Moons/MoonCalc.php @@ -12,6 +12,7 @@ use DB; use Carbon\Carbon; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Client; +use Log; //Models use App\Models\Moon\Config; @@ -318,9 +319,7 @@ class MoonCalc { $total = 0.00; //Check to see what type of moon goo the moon is - $calculatePrice = $this->IsMoonGoo($ore); - - dd($calculatePrice); + $calculatePrice = $this->IsRMoonGoo($ore); //Check to make if($calculatePrice != false) { @@ -340,6 +339,9 @@ class MoonCalc { //A 50% discount is given to Gas ores as they aren't worth much currently in the market. if($calculatePrice == 'Gas') { $total = ($units * $unitPrice) / 2.00; + Log::warning('Calculate price found a Gas. It was named ' . $ore . '.'); + Log::warning('Price was: ' . number_format(($units * $unitPrice), "2", ".", ",")); + Log::warning('New price is: ' . number_format((($units * $unitPrice) / 2.00), "2", ".", ",")); } else { $total = $units * $unitPrice; } @@ -388,7 +390,7 @@ class MoonCalc { return false; } - private function IsRMoon($ore) { + private function IsRMoonOre($ore) { $ores = [ 'Zeolites' => 'Gas', 'Sylvite' => 'Gas',