Fix 2.7 接档工具

This commit is contained in:
ckcz123 2020-05-23 20:26:42 +08:00
parent 2adf9ed529
commit 4a6c5042ac
9 changed files with 10 additions and 31 deletions

View File

@ -2142,10 +2142,6 @@ core.showWithAnimate(obj, speed, callback) / core.hideWithAnimate(obj, speed, ca
动画淡入或淡出一个对象。
core.hashCode(obj)
计算一个对象的哈希值。
core.same(a, b)
判定a和b是否相同包括类型相同和值相同。
如果a和b都是数组则会递归依次比较数组中的值如果都是对象亦然。

View File

@ -2142,10 +2142,6 @@ core.showWithAnimate(obj, speed, callback) / core.hideWithAnimate(obj, speed, ca
动画淡入或淡出一个对象。
core.hashCode(obj)
计算一个对象的哈希值。
core.same(a, b)
判定a和b是否相同包括类型相同和值相同。
如果a和b都是数组则会递归依次比较数组中的值如果都是对象亦然。

View File

@ -1760,8 +1760,6 @@ control.prototype._doSL_replayLoad_afterGet = function (id, data) {
if (!data) return core.drawTip("无效的存档");
if (data.version != core.firstData.version) return core.drawTip("存档版本不匹配");
if (data.hard != core.status.hard) core.drawTip("游戏难度不匹配!");
if (data.hashCode != null && data.hashCode != core.utils.hashCode(data.hero))
return alert("存档校验失败,请勿修改存档文件!");
var route = core.subarray(core.status.route, core.decodeRoute(data.route));
if (route == null || data.hero.flags.__seed__ != core.getFlag('__seed__'))
return core.drawTip("无法从此存档回放录像");

View File

@ -1091,20 +1091,6 @@ utils.prototype._decodeCanvas = function (arr, width, height) {
tempCanvas.putImageData(imgData, 0, 0);
}
utils.prototype.hashCode = function (obj) {
if (typeof obj == 'string') {
var hash = 0, i, chr;
if (obj.length === 0) return hash;
for (i = 0; i < obj.length; i++) {
chr = obj.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0;
}
return hash;
}
return this.hashCode(JSON.stringify(obj).split("").sort().join(""));
}
utils.prototype.same = function (a, b) {
if (a == null && b == null) return true;
if (a == null || b == null) return false;

View File

@ -186,8 +186,8 @@ function main() {
this.floors = {}
this.canvas = {};
this.__VERSION__ = "2.6.6";
this.__VERSION_CODE__ = 99;
this.__VERSION__ = "2.7";
this.__VERSION_CODE__ = 127;
}
main.prototype.init = function (mode, callback) {

View File

@ -118,7 +118,7 @@ function action_data(callback) {
// Step 0: 移动目录
// materials
['animates', 'enemys', 'items', 'npcs', 'terrains', 'enemy48', 'npc48', 'icons'].forEach(function (one) {
['animates', 'enemys', 'items', 'npcs', 'terrains', 'enemy48', 'npc48', 'icons', 'airwall', 'fog', 'keyboard'].forEach(function (one) {
fs.moveFile('project/images/'+one+".png", 'project/materials/'+one+'.png', function (e, d) {});
});
main.tilesets.forEach(function (one) {
@ -127,7 +127,7 @@ function action_data(callback) {
});
// bgms
main.bgms.forEach(function (one) {
fs.moveFile('project/bgms/'+one, 'project/bgms/'+one, function (e,d) {});
fs.moveFile('project/sounds/'+one, 'project/bgms/'+one, function (e,d) {});
})
// Step 1: 重置levelChoose和shop
@ -308,7 +308,7 @@ function action_items(callback) {
var data = items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a[one];
if (!data) return;
for (var id in data) {
if (data[id] != null)
if (data[id] != null && items[id])
items[id][one] = data[id];
}
});

View File

@ -87,7 +87,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"firstData": {
"title": "魔塔样板",
"name": "template",
"version": "Ver 2.6.6",
"version": "Ver 2.7",
"floorId": "sample0",
"hero": {
"image": "hero.png",

View File

@ -164,6 +164,8 @@ def moveFile():
if not os.path.exists(src):
abort(404)
return
if src == dest:
return 'Success'
if os.path.exists(dest):
os.remove(dest)
os.rename(src, dest)

View File

@ -54,7 +54,7 @@
(已完成!) 大屏幕下放大游戏界面
(已完成!) 最近使用/最常使用的图块
(已完成!) loader并行加载
合并items.js
(已完成!) 合并items.js
(已完成!) 增加fonts目录全塔属性增加fonts引用
(已完成!) 右边框输入完后解析按钮高亮
(已完成!) 32x48的门
@ -68,6 +68,7 @@
(不处理;现在静止状态可以有帧动画了,所以不考虑行走过程动画) 行走动画
(已完成!) 合并main中一些设置内容
(已完成!) \t[this], 勇士朝下flag:arg清理瞬移扣血
nowLoc同步存档合并右键反复弹出失去焦点右键地图编辑框无效
-------------