-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathMrTS_SimpleItemPrice.js
45 lines (43 loc) · 1.64 KB
/
MrTS_SimpleItemPrice.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
//=============================================================================
// MrTS_SimpleItemPrice.js
//=============================================================================
/*:
* @plugindesc Allows to set default sell price in note tags.
* @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.0
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Item/Weapon/Armor Tags
* --------------------------------------------------------------------------------
* <SellPrice: [PRICE]>
* [PRICE] - default sell price.
*
* E.g.:
* <SellPrice: 9999>
* <SellPrice: 2000>
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Version History
* --------------------------------------------------------------------------------
* 1.0 - Release
*/
(function() {
var _SceneShop_sellingPrice = Scene_Shop.prototype.sellingPrice;
Scene_Shop.prototype.sellingPrice = function() {
if (this._item.meta.SellPrice)
return Number(this._item.meta.SellPrice)
else
return _SceneShop_sellingPrice.call(this);
};
})();