-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathMrTS_SceneBackgrounds.js
67 lines (64 loc) · 2.55 KB
/
MrTS_SceneBackgrounds.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//=============================================================================
// MrTS_SceneBackgrounds.js
//=============================================================================
/*:
* @plugindesc Allows to set specific backgrounds to each scene instead of using map screenshot.
* @author Mr. Trivel
*
* @help
* --------------------------------------------------------------------------------
* Terms of Use
* --------------------------------------------------------------------------------
* Don't remove the header or claim that you wrote this plugin.
* Credit Mr. Trivel if using this plugin in your project.
* Free for commercial and non-commercial projects.
* --------------------------------------------------------------------------------
* Version 1.1
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* How to use
* --------------------------------------------------------------------------------
* Open this plugin in your favorite text editor and scroll down to EDIT LIST HERE.
* Then edit it as follows:
* SceneName: "BackgroundName",
* All images go to img\system
*
* NOTE: Only works for scenes based on Scene_MenuBase.
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Version History
* --------------------------------------------------------------------------------
* 1.1 - Compatibility with Yanfly
* 1.0 - Release
*/
(function() {
sceneBackgroundList = {
// --------------------------------------------------------------------------------
// EDIT LIST HERE v
// --------------------------------------------------------------------------------
Scene_Shop: "pick_Background",
Scene_Menu: "pick_Background2",
Scene_Item: "Meadow"
// --------------------------------------------------------------------------------
// EDIT LIST THERE ^
// --------------------------------------------------------------------------------
}
var _Scene_MenuBase_createBackground = Scene_MenuBase.prototype.createBackground;
Scene_MenuBase.prototype.createBackground = function() {
_Scene_MenuBase_createBackground.call(this);
if (this._backgroundSprite)
{
for (var key in sceneBackgroundList) {
if (sceneBackgroundList.hasOwnProperty(key)) {
if (this.constructor === eval(key))
{
this._backgroundSprite.bitmap = ImageManager.loadSystem(sceneBackgroundList[key]);
break;
}
}
}
}
};
})();