/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package src.model;

import src.controller.Entity;
import src.controller.Item;
import src.controller.Occupation;
import src.controller.StatsPack;

/**
 *
 * @author JohnReedLOL
 */
public class MapEntity_Relation extends MapDrawableThing_Relation {

    private final Entity entity_;

    public MapEntity_Relation(Entity entity,
            int x_respawn_point, int y_respawn_point) {
        super(entity);
        entity_ = entity;
        x_respawn_point_ = x_respawn_point;
        y_respawn_point_ = y_respawn_point;
    }
    private final int x_respawn_point_;
    private final int y_respawn_point_;
    
    public void spawn(Entity toSpawn, int time_until_spawn) {

    }
    /**
     * Moves the entity that this relation refers to over x and up y
     * @param x x displacement
     * @param y y displacement
     * @return error codes: see function pushEntityInDirection() in MapDrawableThing_Relation
     * @author John-Michael Reed
     */
    public int moveInDirection(int x, int y) {
        return super.pushEntityInDirection(entity_, x, y);
    }

    public void sendAttack(int x, int y) {

    }

    public void recieveAttack(int damage) {

    }

    public void levelUp(StatsPack stats_pack) {

    }

    public void addStatsPack(StatsPack stats_pack) {

    }

    public void subtractStatsPack(StatsPack stats_pack) {

    }
    /**
     * An item underneath you can be picked up using the parameters 0,0
     * @param x
     * @param y 
     * @return error_code:
     */
    public int pickUpItemInDirection(int x, int y) {
        int error_code = 0;
        return error_code;
    }
}

@@ -1524,32 +1524,37 @@
 _pack) %7B%0A%0A    %7D%0A
+    %0A
     /**%0A     * A
@@ -1616,16 +1616,100 @@
 ters 0,0
+.%0A     * 0 if item is picked up successfully, 1 if no item is on the specified tile.
 %0A     * 
@@ -1759,17 +1759,16 @@
 ror_code
-:
 %0A     */
@@ -1850,10 +1850,245 @@
 e = 
-0;
+1;%0A%0A    %09Item itemToBePickedUp = current_map_reference_.removeTopItem(x + getMyXCordinate(),y + getMyYCordinate());%0A    %09if(itemToBePickedUp != null)%7B%0A    %09%09entity_.addItemToInventory(itemToBePickedUp);%0A    %09%09error_code = 0;%0A    %09%7D%0A    %09
 %0A   

Update MapEntity_Relation.java