"use strict";

var GO_Diary = function(diaryname){
	this.sprite = new Sprite(GO_Diary.spriteSheet,"Diary");
	this.sprite.collision_flags = 
		DEFINE_SPRITE_COLLISION_FLAGS.SPRITES_PASSIVE;
	this.sprite.setBoundingBox(0,0,15,15);
	this.sprite.game_object = this; // no longer a generic GO

	diaryname = diaryname ? diaryname : "HOME";

	this.name = "Diary_"+diaryname;

	this.diary_name=diaryname;
};
GO_Diary.spriteImg = SDS_Load_Image("art/sheets/sprite/diary.png");
GO_Diary.spriteSheet = new TileSheet(4, 4, 1, 0, GO_Diary.spriteImg);

GO_Diary.prototype = new GameObject(
	new Sprite(
		GO_Diary.spriteSheet,
		"Diary"
	),
	"Diary"
	);

	GO_Diary.prototype.interactions = 
		DEFINE_GAMEOBJECT_INTERACTIONS.CHECK;

	GO_Diary.prototype.checkEvent = function(sourceGO){
		GLOBAL_DIARY.life = GLOBAL_DIARY.max_life;
		GLOBAL_DIARY.chi = GLOBAL_DIARY.max_chi;
		return "DIARY_"+this.diary_name;
	};

	GO_Diary.prototype.Update = function(){

	};
