-
Notifications
You must be signed in to change notification settings - Fork 0
/
CM_FelskiAutoSave_AddOn.js
69 lines (57 loc) · 1.92 KB
/
CM_FelskiAutoSave_AddOn.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
68
69
//=============================================================================
// Felski Autosave Add-On
// You may not use this plugin in your project.
// The purpose of this plugin being public is for developer reference.
//=============================================================================
//=============================================================================
/*:
* @plugindesc v1.1
* @author Joseph Abraham, Codemora
*
* @help
* ============================================================================
* Introduction
* ============================================================================
*
* This plugin is for use with Felski's Autosave plugin. Place this plugin under
* Felski's plugin.
*
* This plugin allows the developer to exclude certain maps for autosave.
*
* @plugindesc This plugin removes outlines for RPG Maker MV.
* Contact me via email: [email protected]
*
* @param Save Settings
* @param Excluded Maps List
* @parent Save Settings
* @desc List of Maps to exclude when using Felski Autosave feature, separate IDs with commas.
* @type string
* @default
*/
* @param Save Settings
* @param Excluded Maps List
* @parent Save Settings
* @desc List of Maps to exclude when using Felski Autosave feature, separate IDs with commas
* @type string
* @default
*/
var CM = CM || {};
var parameters = PluginManager.parameters('CM_FelskiAutoSave_AddOn');
CM.ExcludedMaps = String(parameters['Excluded Maps List']);
CM.GetExcludedMaps = function() {
var list = CM.ExcludedMaps.split(",");
var maps = [];
list.forEach(function(map) {
var mapID = parseInt(map);
if (mapID > 0)
maps.push(mapID);
});
return maps;
}
var autoSave = Game_System.prototype.autoSaveGame;
Game_System.prototype.autoSaveGame = function() {
if (CM.GetExcludedMaps().includes($gameMap.mapId()))
return;
else
autoSave.call(this);
}