• 每个人都可以搬运插件,请严格遵守搬运插件的规则,帖子一定要写上原帖地址! 近期Rustbbs会有大量更新!服务器版块请严格按照规定排版写入! 搬运插件请不要大量机翻!QQ交流群:612904352
Copy Paste/复制粘贴建筑物

搬运 Copy Paste/复制粘贴建筑物 v4.1.32

没有下载权限
原网址
https://umod.org/plugins/copy-paste
原作者
misticos
原名称
Copy Paste
当前插件以支持自动更新,请前往该网址下载最新版本:插件下载


此插件被以下两个插件使用!
聊天命令
复制:
代码:
/copy NAME options values - Copy a building
Example: /copy home radius 3 method building
Short example: /copy home r 3 m building
语法-选项
  • each true/false - 默认值:true -从每个实体检查半径
  • method building/proximity - 默认值:接近度 -选择用于复制建筑物的力学类型- Building :仅复制当前建筑物。 Proximity :复制靠近建筑物的所有街区。(在某些情况下,Building可能会缺少一些可部署的对象,因此在这些情况下也可以使用接近性)
  • radius XX - 默认:3 -设置半径搜索实体围绕每一个建筑构件及deployables
  • share true/false - 默认值:true -设置复制数据CodeLocks,BuildingPrivileges,睡袋
  • tree true/false - 默认值:false -设置复制树和资源
粘贴:
代码:
/paste NAME options values - Paste a building
Example: /paste home auth true stability false
Short example: /paste home a true s false
语法-选项
  • auth true/false - 默认值:true -在所有的橱柜授权播放器
  • blockcollision XX - 默认:0 -在XX半径检查是否存在是有可能与新的建筑,如果有冲突,块构建。0是禁用检测。
  • deployables true/false - 默认值:true -设置粘贴deployables
  • **height XX **- *default: 0 * -调整粘贴高度
  • autoheight true/false - 默认值:true -阉或不试图找到最好的建筑高度
  • inventories true/false - 默认值:true -设置粘贴库存
  • stability true/false - 默认值:true -设置为false忽略稳定系统
  • vending true/false - 默认值:true -设置粘贴sellings,名称和广播的自动贩卖机
  • entityowner true/false - 默认值:true -建筑的复制实体的所有权。
撤回:
代码:
/pasteback NAME options values - Paste on old place a building where it was when it was saved
Example: /pasteback home auth true stability false
Short example: /pasteback home a true s false
语法-选项
  • auth true/false - 默认值:false -在所有的橱柜授权播放器
  • deployables true/false - 默认值:true -设置粘贴deployables
  • **inventories true/false **- default: true -设置粘贴库存量
  • height XX - default: 0 -调整高度pasteback
  • stability true/false - 默认值:true -设置为false忽略稳定系统
  • vending true/false - 默认值:false -设置粘贴sellings,名称和广播的自动贩卖机
其他
/ undo-删除您上一次粘贴的内容/副本列表-结构列表(从氧化物/数据/复制粘贴文件夹中)

服务器权限
该插件使用Oxide的权限系统。
要分配权限,请使用oxide.grant <user or group> <name or steam id> <permission>
要删除权限,请使用oxide.revoke <user or group> <name or steam id> <permission>
  • copypaste.copy
  • copypaste.list
  • copypaste.paste
  • copypaste.pasteback
  • copypaste.undo
组态
可以CopyPaste.json在oxide/config目录下的文件中配置此插件的设置和选项。建议使用JSON编辑器或验证站点(例如jsonlint.com),以避免格式问题和语法错误。
代码:
{
  "Amount of entities to paste per batch. Use to tweak performance impact of pasting": 15,
  "Amount of entities to copy per batch. Use to tweak performance impact of copying": 100,
  "Amount of entities to undo per batch. Use to tweak performance impact of undoing": 15,
  "Enable data saving feature": true,
  "Copy Options": {
    "Check radius from each entity (true/false)": true,
    "Share (true/false)": true,
    "Tree (true/false)": false
  },
  "Paste Options": {
    "Auth (true/false)": true,
    "Deployables (true/false)": true,
    "Inventories (true/false)": true,
    "Vending Machines (true/false)": true,
    "Stability (true/false)": true
  }
}
开发人员API
代码:
object TryCopyFromSteamID(ulong userID, string filename, string[] args)
object TryPasteFromSteamID(ulong userID, string filename, string[] args)
object TryPasteFromVector3(Vector3 pos, float rotationCorrection, string filename, string[] args)
如果失败则返回字符串,如果成功则返回true
复制完成后调用 OnCopyFinished(List<object> rawData)
粘贴完成后调用 OnPasteFinished(List<BaseEntity> pastedEntities)

例如:
代码:
bool BuyBuilding(BasePlayer player, string buildingName)
{
    var options = new List<string>{ "blockcollision", "true" };

    var success = CopyPaste.Call("TryPasteFromSteamID", player.userID, buildingName, options.ToArray());

    if(success is string)
    {
        SendReply(player, "Can't place the building here");

        return false;
    }

    SendReply(player, "You've successfully bought this building");

    return true;
}
作者
Tim
下载
105
查看
4,310
首次发布
上次更新
评分
0.00 星 0个评价

Tim的更多资源

分享此资源