Fix 2.7 接档工具
This commit is contained in:
parent
2adf9ed529
commit
4a6c5042ac
@ -2142,10 +2142,6 @@ core.showWithAnimate(obj, speed, callback) / core.hideWithAnimate(obj, speed, ca
|
|||||||
动画淡入或淡出一个对象。
|
动画淡入或淡出一个对象。
|
||||||
|
|
||||||
|
|
||||||
core.hashCode(obj)
|
|
||||||
计算一个对象的哈希值。
|
|
||||||
|
|
||||||
|
|
||||||
core.same(a, b)
|
core.same(a, b)
|
||||||
判定a和b是否相同,包括类型相同和值相同。
|
判定a和b是否相同,包括类型相同和值相同。
|
||||||
如果a和b都是数组,则会递归依次比较数组中的值;如果都是对象亦然。
|
如果a和b都是数组,则会递归依次比较数组中的值;如果都是对象亦然。
|
||||||
|
|||||||
@ -2142,10 +2142,6 @@ core.showWithAnimate(obj, speed, callback) / core.hideWithAnimate(obj, speed, ca
|
|||||||
动画淡入或淡出一个对象。
|
动画淡入或淡出一个对象。
|
||||||
|
|
||||||
|
|
||||||
core.hashCode(obj)
|
|
||||||
计算一个对象的哈希值。
|
|
||||||
|
|
||||||
|
|
||||||
core.same(a, b)
|
core.same(a, b)
|
||||||
判定a和b是否相同,包括类型相同和值相同。
|
判定a和b是否相同,包括类型相同和值相同。
|
||||||
如果a和b都是数组,则会递归依次比较数组中的值;如果都是对象亦然。
|
如果a和b都是数组,则会递归依次比较数组中的值;如果都是对象亦然。
|
||||||
|
|||||||
@ -1760,8 +1760,6 @@ control.prototype._doSL_replayLoad_afterGet = function (id, data) {
|
|||||||
if (!data) return core.drawTip("无效的存档");
|
if (!data) return core.drawTip("无效的存档");
|
||||||
if (data.version != core.firstData.version) return core.drawTip("存档版本不匹配");
|
if (data.version != core.firstData.version) return core.drawTip("存档版本不匹配");
|
||||||
if (data.hard != core.status.hard) 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));
|
var route = core.subarray(core.status.route, core.decodeRoute(data.route));
|
||||||
if (route == null || data.hero.flags.__seed__ != core.getFlag('__seed__'))
|
if (route == null || data.hero.flags.__seed__ != core.getFlag('__seed__'))
|
||||||
return core.drawTip("无法从此存档回放录像");
|
return core.drawTip("无法从此存档回放录像");
|
||||||
|
|||||||
@ -1091,20 +1091,6 @@ utils.prototype._decodeCanvas = function (arr, width, height) {
|
|||||||
tempCanvas.putImageData(imgData, 0, 0);
|
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) {
|
utils.prototype.same = function (a, b) {
|
||||||
if (a == null && b == null) return true;
|
if (a == null && b == null) return true;
|
||||||
if (a == null || b == null) return false;
|
if (a == null || b == null) return false;
|
||||||
|
|||||||
4
main.js
4
main.js
@ -186,8 +186,8 @@ function main() {
|
|||||||
this.floors = {}
|
this.floors = {}
|
||||||
this.canvas = {};
|
this.canvas = {};
|
||||||
|
|
||||||
this.__VERSION__ = "2.6.6";
|
this.__VERSION__ = "2.7";
|
||||||
this.__VERSION_CODE__ = 99;
|
this.__VERSION_CODE__ = 127;
|
||||||
}
|
}
|
||||||
|
|
||||||
main.prototype.init = function (mode, callback) {
|
main.prototype.init = function (mode, callback) {
|
||||||
|
|||||||
@ -118,7 +118,7 @@ function action_data(callback) {
|
|||||||
|
|
||||||
// Step 0: 移动目录
|
// Step 0: 移动目录
|
||||||
// materials
|
// 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) {});
|
fs.moveFile('project/images/'+one+".png", 'project/materials/'+one+'.png', function (e, d) {});
|
||||||
});
|
});
|
||||||
main.tilesets.forEach(function (one) {
|
main.tilesets.forEach(function (one) {
|
||||||
@ -127,7 +127,7 @@ function action_data(callback) {
|
|||||||
});
|
});
|
||||||
// bgms
|
// bgms
|
||||||
main.bgms.forEach(function (one) {
|
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
|
// Step 1: 重置levelChoose和shop
|
||||||
@ -308,7 +308,7 @@ function action_items(callback) {
|
|||||||
var data = items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a[one];
|
var data = items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a[one];
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
for (var id in data) {
|
for (var id in data) {
|
||||||
if (data[id] != null)
|
if (data[id] != null && items[id])
|
||||||
items[id][one] = data[id];
|
items[id][one] = data[id];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -87,7 +87,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
"firstData": {
|
"firstData": {
|
||||||
"title": "魔塔样板",
|
"title": "魔塔样板",
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"version": "Ver 2.6.6",
|
"version": "Ver 2.7",
|
||||||
"floorId": "sample0",
|
"floorId": "sample0",
|
||||||
"hero": {
|
"hero": {
|
||||||
"image": "hero.png",
|
"image": "hero.png",
|
||||||
|
|||||||
@ -164,6 +164,8 @@ def moveFile():
|
|||||||
if not os.path.exists(src):
|
if not os.path.exists(src):
|
||||||
abort(404)
|
abort(404)
|
||||||
return
|
return
|
||||||
|
if src == dest:
|
||||||
|
return 'Success'
|
||||||
if os.path.exists(dest):
|
if os.path.exists(dest):
|
||||||
os.remove(dest)
|
os.remove(dest)
|
||||||
os.rename(src, dest)
|
os.rename(src, dest)
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
(已完成!) 大屏幕下放大游戏界面
|
(已完成!) 大屏幕下放大游戏界面
|
||||||
(已完成!) 最近使用/最常使用的图块
|
(已完成!) 最近使用/最常使用的图块
|
||||||
(已完成!) loader并行加载
|
(已完成!) loader并行加载
|
||||||
合并items.js
|
(已完成!) 合并items.js
|
||||||
(已完成!) 增加fonts目录,全塔属性增加fonts引用
|
(已完成!) 增加fonts目录,全塔属性增加fonts引用
|
||||||
(已完成!) 右边框输入完后解析按钮高亮
|
(已完成!) 右边框输入完后解析按钮高亮
|
||||||
(已完成!) 32x48的门
|
(已完成!) 32x48的门
|
||||||
@ -68,6 +68,7 @@
|
|||||||
(不处理;现在静止状态可以有帧动画了,所以不考虑行走过程动画) 行走动画
|
(不处理;现在静止状态可以有帧动画了,所以不考虑行走过程动画) 行走动画
|
||||||
(已完成!) 合并main中一些设置内容
|
(已完成!) 合并main中一些设置内容
|
||||||
(已完成!) \t[this], 勇士朝下,flag:arg清理,瞬移扣血
|
(已完成!) \t[this], 勇士朝下,flag:arg清理,瞬移扣血
|
||||||
|
nowLoc;同步存档合并;右键反复弹出;失去焦点右键;地图编辑框无效
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user