From c764290b559c18ef5a5f37ccde160997e21636ba Mon Sep 17 00:00:00 2001
From: Petteri <jupean@utu.fi>
Date: Sun, 3 Mar 2019 20:54:20 +0200
Subject: [PATCH] Revert "Collector update"

This reverts commit bd780c918f3a5f90cf1c490aa06ed4f637ff8726.
---
 Assets/Scripts/Collector.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Assets/Scripts/Collector.cs b/Assets/Scripts/Collector.cs
index 3a1b448..94e742b 100644
--- a/Assets/Scripts/Collector.cs
+++ b/Assets/Scripts/Collector.cs
@@ -140,16 +140,16 @@ public class Collector : MonoBehaviour
             {
                 if (collision.gameObject.GetComponent<BoxCollider2D>().bounds.Contains(new Vector3(home.transform.position.x, home.transform.position.y, collision.gameObject.transform.position.z)))
                 {
-                    if (target != null && target.GetComponent<Outcrop>() && this.Requested_resource != null)
+                    if (target.GetComponent<Outcrop>() && this.Requested_resource != null)
                     {
                         if(this.Requested_amount < this.max_amount)
                             this.amount = home.GetComponent<City>().UseResource(this.Requested_resource, this.Requested_amount);
                         else
                             this.amount = home.GetComponent<City>().UseResource(this.Requested_resource, this.max_amount);
                     }
-                    else if (collision.gameObject.GetComponent<City>() != null)
+                    else
                     {
-                        
+
                         //resets amount and resource variables
                         collision.gameObject.GetComponent<City>().AddResource(this.resource, this.amount);
                         this.amount = 0;
-- 
GitLab