init: add workspace files

This commit is contained in:
2026-05-26 16:41:20 +08:00
commit f4f2393f72
1041 changed files with 67405 additions and 0 deletions

29
world/cmd/obj/equip.js Normal file
View File

@@ -0,0 +1,29 @@
this.inherits(COMMAND);
this.command = "eq";
this.enter = function (me, oid) {
var obj = me.find_obj(oid);
if (!obj) {
return me.notify("你要装备什么?");
}
if (!obj.is_equipment) {
return me.notify("这个东西不能装备。");
}
if (me.fight_type) {
if (me.query_temp('eq_wea') !== oid)
return me.notify("战斗中不能更换装备。");
}
if (me.release_time) {
var diff_time = me.release_time - Date.now();
if (diff_time > 0) {
return me.notify("你的技能还没释放完成,无法切换装备。");
}
}
if (me.equip(obj) != false && obj.on_use) {
obj.notify_action(me, true);
if (me.fight_type) {
me.remove_temp('eq_wea');
}
}
}