"use strict";

// A slab suspiciously large enough to hold, say, a Meli
var GO_MeliDesk = function(){
	this.sprite = new Sprite(GO_MeliDesk.spriteSheet,"MeliDesk");
	this.sprite.collision_flags = 
		DEFINE_SPRITE_COLLISION_FLAGS.SPRITES_PASSIVE;
	this.sprite.setBoundingBox(0,0,31,15);
	this.sprite.game_object = this; // no longer a generic GO

	this.name = "MeliDesk";

	this.checked = false;
};
GO_MeliDesk.spriteImg = SDS_Load_Image("art/sheets/sprite/desk.png");
GO_MeliDesk.spriteSheet = new TileSheet(5, 4, 0, 0, GO_MeliDesk.spriteImg);

GO_MeliDesk.prototype = new GameObject(
	new Sprite(
		GO_MeliDesk.spriteSheet,
		"MeliDesk"
	),
	"MeliDesk"
	);

	GO_MeliDesk.prototype.interactions = DEFINE_GAMEOBJECT_INTERACTIONS.CHECK;

	GO_MeliDesk.prototype.Update = function(){

	};

	GO_MeliDesk.prototype.checkEvent = function(sourceGO){
		// if meli soul is collected, acknowledge.
		// if soul not collected, spawn on first check, point out on subsequent
		if (GLOBAL_DIARY.hasSoul("MELI")) return "GD_Meli_Desk";
		else if (!this.checked){
			this.checked = true;
			return "Nosce_Te_Ipsum";
		}
		else return "GD_Meli_Desk_Uncollected";
	};
