SRPG Studio

SRPG Studio

评价数不足
CL_Restore-Map.js
   
奖励
收藏
已收藏
取消收藏
RESOURCES: plugin
文件大小
发表于
更新日期
10.558 KB
2020 年 10 月 7 日 上午 8:35
2021 年 5 月 2 日 上午 7:30
2 项改动说明 ( 查看 )

订阅以下载
CL_Restore-Map.js

描述
This plugin enables you to save and restore a map to a previous state with script execute commands.
When you wish to store a copy of the map, run the following command.

CL_TerrainFixer.initialize()

When you change much of the map, you may run the following command to restore the most recent change.

CL_TerrainFixer.restore()

To pick a specific index out of the array of changes, run the following command. Note that "i" will be automatically checked for array length, and if it is too high it will not run the command.

CL_TerrainFixer.restoreIndex(i)

To bind a change to a specific unit, run these commands. Note that "u" must be a specific Unit object.

CL_TerrainFixer.pushByUnit(u) <-- adds the change
CL_TerrainFixer.restoreByUnit(u) <-- runs the change

To only make changes if a local switch is on, run the following commands. Note that sID will be automatically checked and if it is too high, it will not run the command.

CL_TerrainFixer.initializeBySwitch(sID)
CL_TerrainFixer.restoreBySwitch(sID)

To wipe all changes, run the following command. This will get rid of everything! Use this when the stored changes are slowing your game down.

CL_TerrainFixer.wipe()

You can also get this script on my GitHub![raw.githubusercontent.com]
The main repo can be found here![github.com]