7 Star 44 Fork 11

TonyJiangWJ / Ant-Forest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
GPL-2.0

简介

基于 Autojs 的蚂蚁森林自动收能量脚本,采用 AutoJS Modify 版本开发。解锁模块参考自:https://github.com/e1399579/autojs

  • 脚本执行依赖于:AutoJS Modify困鱼,4.1.1原作者完全不会再维护且已经删库,同时存在较多内存泄露等问题、不支持Android12、脚本中部分特性也不支持,如本地OCR 多分辨率找图 等等。Pro限制无障碍操作且存在代码审查机制,不再受支持。

  • 本项目原始版本 https://github.com/Nick-Hopps/Ant-Forest-autoscript ,原作者Nick-Hoops已不再维护。虽然目前版本和原始版本代码已经完全不一样,但是还是非常感谢 Nick-Hoops

  • 设备系统要求

    • 具有 ROOT 权限的安卓 5.0 及以上版本
    • 没有 ROOT 权限的安卓 7.0 及以上版本
    • 因为图色识别的原因不支持护眼模式、暗色模式等。
  • 觉得本项目好用的话请给个star吧~

其他脚本

实验性功能

  • 1.4.0版本开始增加基于YOLO的目标检测算法,需要下载最新版本的AutoJS Modify困鱼
  • 请手动下载YOLO模型,并将其放置到config_data目录下,链接地址:https://github.com/TonyJiangWJ/Ant-Forest/releases/download/v1.1.1.4/forest_lite.onnx
  • 运行可视化配置,进入图像识别相关设置,打开使用YOLO模型识别能量球即可启用。如果当前AutoJS不支持或者模型未下载将自动降级使用旧版识别方案。
  • 从1.4.0版本开始将逐渐优化模型,将各种图片配置移除,尽量做的开箱即用
  • 原方案识别能量球速度大概3-40ms,YOLO模型大概100ms请自行取舍,YOLO识别默认关闭

使用

  • 下载安装 AutoJS Modify困鱼 之后把整个脚本项目放进 "/sdcard/脚本/" 文件夹下面。打开软件后下拉刷新,然后运行项目或者 main.js 即可运行,首次运行请先进行部分必要配置否则部分功能不能正常运行,见配置小节
  • 给与软件必要权限 后台弹出界面显示悬浮窗自启动电量无限制,并将软件保持后台运行
  • 定时启动脚本,点击 main.js 的菜单,选择 更多 定时任务 即可配置定时启动
  • 如果运行提示有任务正在队列中,请运行配置 可视化配置.js 然后进到 高级设置 中勾选 单脚本运行,该功能是用于多个脚本同时运行时的任务队列 相当于一个调度程序,避免多个脚本抢占前台导致出错
  • 当前版本森林只通过逛一逛收集能量,排行榜中仅获取倒计时数据,需要配置逛一逛(收能量)按钮位置或图片信息。更多配置信息见配置小节
  • 运行有问题请查看#常见问题小节
  • 不同手机的解锁方法不同可能不适配,需要自行编写解锁方法,具体见#添加解锁设备小节
  • ocr优先使用mlkit,不支持时尝试paddleocr,最后使用百度(需要配置API KEY,而且每天有500次的次数限制),推荐直接使用修改版或下载ocr插件mlkit-ocr插件下载
  • 关于本地OCR的说明,mlkit-ocr速度非常快,但是缺点是识别准确性不佳,目前基本能满足所需要的识别功能。PaddleOCR识别准确性很高但是缺点是速度慢,而且必须给AutoJS设置电量无限制权限否则容易闪退,另外就是必须安装我的修改的AutoJS困鱼 才能使用PaddleOCR。
  • 当前版本仅通过逛一逛收取,排行榜中只识别倒计时信息不识别帮收和可收取,有一定几率会漏收倒计时刚刚结束的能量

配置

运行 可视化配置.js 后可以看到如下配置:

  • 常用配置按不同类别进行分组,按实际内容进入对应菜单项目即可
  • 所有列表项都可以左滑触发删除或修改,部分输入框也能左滑触发高级输入操作如区域配置和颜色值配置等,多多摸索
  • 运行配置后右上角菜单可以重置所有配置信息为默认值
  • 配置导出导入功能,点击右上角菜单即可导出当前配置到local_config.cfg中,默认已加密加密密码为 device.getAndriodId() 如果需要在免费版和付费版AutoJS之间同步 需要自行创建脚本获取该密码
  • 运行时数据导出导入功能同上所述
  • 重要 因为当前手机分辨率多种多样,请前往 查找图片设置 按说明截取相应位置的图片,特别是逛一逛按钮,避免运行不正常
  • 重要 基于图像分析模式必须按如下配置,否则脚本无法正常执行
  • 好友首页的能量球无法通过控件识别,请进行如下配置:
  • 图像识别区域信息可以在运行可视化配置.js之后进入 图像识别相关配置 直接点击 实时查看可视化配置信息 按钮来刷新配置并显示当前的框选区域。也可以在配置完之后可以运行test/全局悬浮窗显示-配置信息.js 查看配置生效状况,可在 resources 目录下截图保存 region_check.jpg ,然后可以悬浮窗显示半透明信息,方便在运行 可视化配置.js 时拖动进度条快速调整具体区域
  • 区域信息输入框可以左滑,以显示可拖动控件
  • 更多其他配置信息请运行 可视化配置.js 后自行摸索

功能

  • 自动匹配不同系统下自动化的方式,安卓 7 及以上可以通过无障碍服务模拟操作,7以下版本需要通过 root 权限模拟操作;

  • 自动识别屏幕锁定方式并根据配置的密码解锁,支持图形解锁,PIN 解锁,混合密码解锁;特殊设备需要自行扩展,具体见#添加解锁设备小节

  • 图形密码根据数字位置填写到锁屏密码即可,具体数字和手势位置如何对应自行尝试即可了解一二

  • 同时支持支付宝手势解锁

  • 识别自己能量球的倒计时,和好友列表中的倒计时做对比,取最小值作为下次收取的等待时间;

  • 识别好友能量罩,下一次收取时跳过开启能量罩的好友;

  • 可以根据指定时间段自动使用双击卡

  • 默认使用倒计时收取,可通过配置打开循环收取;

  • 可选择永不停止模式,无倒计时或超过激活时间(激活时间可以设置为随机范围)则在激活时间之后继续执行,否则按倒计时时间等待,实现全天不间断收集;

  • 根据白名单实现不收取特定好友能量;

  • 可以设定收取达到一定阈值后自动浇水回馈 默认阈值当日收集超过40克即浇水一次,同时可配置不浇水回馈的黑名单

  • 浇水回馈数量可配置,可选:10 18 33 66

  • 脚本运行时可以显示悬浮窗展示当前状态

  • 开始收集的时候按 音量减 可以延迟五分钟再执行,适合需要使用手机的时候使用,按 音量加 则关闭脚本终止执行

  • 收取完毕后悬浮框显示收取的能量数量

  • 支持切换小号进行能量收集和能量雨,运行 可视化配置 进入 多账号管理 增加支付宝账号并设置昵称用于能量雨自动赠送,并勾选一个主账号。需要确保增加的账号在当前设备可以免密切换。

  • 循环小号并执行能量雨会根据多账号管理中配置的昵称按顺序自动赠送给下一个账号,即配置了A、B、C三个账号,能量雨运行时会自动的A->B->C->A的顺序进行赠送,这样三个账号都能获得三次机会。因此请确保正确配置了账号昵称

  • 设置完毕后可以手动执行或者设置每天的定时任务

    • 自动收集 unit/循环切换小号并收集能量.js 支持小号给大号浇水
    • 自动循环执行能量雨 unit/循环切换小号并执行能量雨收集.js 建议同时关闭逛一逛结束自动执行能量雨的功能
    • 自动同步设备步数 unit/循环切换小号用于同步数据.js
  • 可以自动打开无障碍,需要配合adb赋权,不同的软件请自行替换包名: 可以通过 context.getPackageName() 获取

      adb shell pm grant org.autojs.autojs.modify android.permission.WRITE_SECURE_SETTINGS
  • 通过ADB授权脚本自动获取无障碍权限

  • ROOT设备可以实现自动锁屏,非ROOT设备理论上安卓9以上都可以通过无障碍进行锁屏,如果无障碍锁屏失败需要扩展锁屏方法,具体见#添加自定义锁屏代码,默认实现的是下拉状态栏中指定位置放了个锁屏按键

  • 脚本更新 可以执行update/检测更新.js,也可以运行可视化配置后点击右上角菜单调出弹窗进行更新。

  • 可以将配置数据以及运行时数据进行导入和导出,内容通过AES加密,默认密码是 device.getAndroidId(),因此仅本机可用。如果需要跨设备或者免费版和Pro版之间备份,自行获取 device.getAndroidId() 然后根据提示输入即可

  • 通话状态监听,当通话中或者来电时自动延迟五分钟执行,需要授予AutoJS软件获取通话状态的权限[该功能暂不可靠,且Pro版无法使用]

  • 可以配置在锁屏状态下判断设备姿势,防止在裤兜内误触(基于重力加速度传感器)

  • unit 下提供了多个自定义模式的切换脚本,执行后会自动打断当前运行中的脚本然后按新的设置启动。

    • 自定义1永不停止.js 25-35分钟的随机范围轮询一次,有倒计时按倒计时时间执行,适合9-23点。可以对它设置每天9点的定时任务
    • 自定义2计时停止.js 按倒计时时间执行,最长等待时间60分钟,适合早上执行和晚上23点执行,避免0点后继续无意义的永不停止。可以对它设置7点、23点以及0点的定时任务
    • 自定义3循环千次只收自己.js 循环收集自己的,适合自己能量快要生成的时候执行,因为每天步行能量生成时间是固定的,因此在生成前一分钟设置定时任务即可,然后再设置2分钟后的定时任务自定义2计时停止.js
    • 其他自定义方式请自行创建,内容参考以上文件和config.js中的字段
  • 支持能量收集统计 查看每天能量值增量和收集好友能量数据 参考如下: hourly_summary daily_summary

循环/计时模式、永不停止模式等详细说明

  • 循环模式:脚本会根据设置的次数不间断的循环执行直到当前执行了指定次数之后便会停止。
  • 计时模式:当关闭循环模式,且不开启永不停止模式时,启用计时模式。计时模式需要设置最大等待时间,默认为60分钟,脚本执行时会通过OCR识别排行榜中的倒计时时间,如果得到的最小倒计时时间小于最大等待时间,那么脚本将会按识别到的最小倒计时计时启动,否则脚本将退出执行。
  • 永不停止模式:关闭循环模式并开启永不停止,此时需要设置重新激活时间,当识别到的倒计时时间小于这个重新激活时间时,脚本会按实际倒计时计时启动,当识别到的倒计时时间大于重新激活时间时,则按重新激活时间来计时启动。以此循环实现全天不间断的执行。这个重新激活时间可以设置为一个随机范围,每次判断都会在指定范围内生成一个随机的时间。
  • 以上计时模式和永不停止模式依赖于OCR的正常运行,如果设备分辨率为1080P的建议直接将自建OCR识别和百度OCR识别关闭,此时会启用模拟的识别,准确率和速度都相较OCR来说更理想。其他分辨率设备则没怎么测试过,自行斟酌。

能量雨收集

  • 增加了自动收集能量雨的脚本。运行 unit/能量雨收集.js 也可以在可视化配置中打开。然后打开能量雨界面,并手动开始,点击开始脚本会自动识别并点击
  • 可配置自动赠送好友机会以获得一次能量雨机会,好友名支持正则匹配。
  • 能量雨为暴力点击,基本百分百能得到满分。
  • 配合 多账号管理unit/循环切换小号并执行能量雨收集.js (创建定时任务)可以实现每天自动收集小号的能量雨
  • 无小号时,对 unit/自动启动并执行能量雨.js 创建定时任务即可每天自动执行一遍

神奇海洋收集

  • unit/神奇海洋收集.js 创建每天7点后的定时任务
  • 在可视化配置-图像识别相关配置-神奇海洋相关配置 配置OCR识别区域,垃圾球角标位置等配置 按实际提示进行配置
  • OCR需要至少安装MlKitOCR插件或者修改版AutoJS 否则自动创建两小时后的定时任务

常见问题

  • 可视化配置.js 执行异常,运行 unit/功能测试-重置默认配置.js 依旧有问题,尝试重启AutoJS,并检查AutoJS的版本是否为 AutoJS Modify困鱼,其他版本可能有兼容性问题,另外Pro版不再支持。
  • 可视化配置 运行后显示白屏或者显示 加载失败 大概是因为某个网络资源加载失败了,请退出重新打开,多试几次即可。
  • 如果报错 Function importClass must be called with a class;... 直接强制关闭AutoJS软件,然后再打开即可。一般只在跨版本更新后才会出现这个问题,最新版脚本已解决这个问题,建议安装 AutoJS Modify困鱼
  • 另外如果不断的运行异常,强制关闭AutoJS软件后重新执行脚本。同时建议定期强制关闭AutoJS软件,避免内存不断增长导致卡顿
  • 图像分析模式 如果识别有遗漏,尝试将 颜色相似度 调低 当前默认值已改为20,或者检查一下是否开启了护眼模式或者暗色模式。
  • 软件的定时任务,点击main.js的 三个点菜单->更多->定时任务 然后设置相应的时间即可
  • 报错 获取截图失败多次 请修改 获取截图等待时间 默认为500毫秒,自行调试选择适合自己的,或者直接取消勾选 是否异步等待截图
  • 其他问题可以提ISSUE,但是请勾选保存日志到文件,并将日志文件大小调整为1024,日志文件保存在 logs/log-verboses.log
  • 如果已经按说明配置后开启 是否直接基于图像分析收取和帮助好友 运行不正常,请先取消勾选,然后勾选 区域点击来收取能量, 同时自己扩展区域点击的方法,见下方的 #添加自定义区域点击代码
  • 定时任务不准,一般因为系统电量限制,在系统设置中启用自启动等。实在不行可以安装tasker发送广播触发脚本执行,具体请百度

其他问题反馈

  • 创建ISSUE 描述具体问题,提供相应的日志或者截图信息,最好说明一下当前使用的脚本版本以及AutoJS软件版本
  • 详细日志的文件为logs/log-verboses.log 默认保存100k之后会将旧日志保存到 logs/logback ;反馈问题时需要提供出问题时段的日志文件。
  • 日志文件如果觉得有隐私信息可以单独发我文件,或者删除敏感信息。邮箱: tonyjiangwj@gmail.com

添加解锁设备

  • 具体开发需要获取到锁屏界面的控件信息,可以运行 /unit/获取锁屏界面控件信息.js 根据提示进行操作,然后得到相应的布局信息进行开发,或者在执行完之后发起ISSUE并提供 logs/info.log 文件让开发者帮忙。
  • 脚本根目录下新建extends文件夹,然后创建ExternalUnlockDevice.js文件,内容格式如下自定义
  • 修改完毕后运行 test/测试解锁.js 即可对解锁代码进行测试
  • 更多扩展可以参考extends/ExternalUnlockDevice-demo.js
module.exports = function (obj) {
  this.__proto__ = obj

  this.unlock = function(password) {
    // 此处为自行编写的解锁代码

    // 在结尾返回此语句用于判断是否解锁成功
    return this.check_unlock()
  }

}

添加自定义锁屏代码

  • 同解锁设备,在extends文件夹下创建LockScreen.js,内容可以参考LockScreen-demo.js 实现自定义锁屏
  • 扩展代码之后可以执行 test/TestLockScreen.js 来调试是否生效
  • 安卓9以上可以基于无障碍实现自动锁屏,不需要通过此方法来实现。
  let { config: _config } = require('../config.js')(runtime, global)

  module.exports = function () {
    // MIUI 12 偏右上角下拉新控制中心
    swipe(800, 10, 800, 1000, 500)
    // 等待动画执行完毕
    sleep(500)
    // 点击锁屏按钮
    click(parseInt(_config.lock_x), parseInt(_config.lock_y))
  }

分享你的配置

  • 如果你想分享你的自定义扩展代码,可以提交到 这个分支下,比如解锁代码 可以命名为 ExternalUnlockDevice-手机型号.js 并提交到 extends 目录下,方便其他用户下载使用
  • 想获取其他网友分享的代码可以前往这个分支下载,或者等我集成发布

更新记录

目前存在的问题

  • 可能存在收集完一个好友后,因为没有获取到该好友剩余能量球的倒计时导致漏收
  • 部分系统,如我使用的MIUI12因为省电策略的问题(即便设置了白名单无限制自启动),导致AutoJS软件的定时任务无法准时运行。非脚本自身问题
  • 新发现问题请提交ISSUE,我会尽快跟进解决

请开发者喝咖啡

  • 欢迎使用支付宝或微信请我喝杯咖啡

    • 一元喝速溶、5元喝胶囊、12买全家、33星巴克感激不尽

    alipay_qrcode wechat_qrcode

  • 支付宝扫码领红包,你拿红包我也有份。

  • 扫码领红包

感谢充电~

alipay

  • *剑
  • **杰
  • **佑
  • **豪
  • **旸
  • **渔
  • **真
  • **刚
  • **刚
  • **亚
  • **成
  • *毅
  • **杰
  • *之
  • **旸
  • *硕
  • **杰
  • **宏
  • **鲁
  • *赟
  • *鹏
  • **杰
  • **恒
  • *鹏
  • **光
  • **彬
  • **胜
  • **庭
  • **光
  • **杰
  • **俊
  • *森
  • *悦

wechat

  • z*g
  • *鸟
  • *鸟
  • *明
  • *妖
  • **昌
  • **昌
  • **昌
  • *济
  • *🧸
  • A*g
  • **昌
  • **昌
  • *信
  • **昌
  • *涛
  • J*k
  • *🍅
  • *🧸
  • F*sW
  • **昌
  • F*sW
  • **昌
  • *z
  • **昌
  • **昌
  • *🍃
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.

简介

This is the mirror image from https://github.com/TonyJiangWJ/Ant-Forest 展开 收起
JavaScript 等 3 种语言
GPL-2.0
取消

发行版 (20)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/TonyJiangWJ/Ant-Forest.git
git@gitee.com:TonyJiangWJ/Ant-Forest.git
TonyJiangWJ
Ant-Forest
Ant-Forest
master

搜索帮助