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

13
world/cmd/obj/packitem.js Normal file
View File

@@ -0,0 +1,13 @@
this.inherits(COMMAND);
this.command = "packitem";
this.regex=/^(\w+)\s+(\w+)(?:\s+(\w+))?$/;
this.enter = function (player,cmd, objid,par) {
var obj = player.find_obj(objid);
if (!obj) return player.notify("你身上没有这个东西。");
if (!obj.actions) return player.notify("你要对" + obj.color_name + "做什么?");
var act = obj.actions[cmd];
if (!act || !act.action) return player.notify("你要对" + obj.color_name + "做什么?");
act.action.call(obj, player, par);
}