Open-source release 0.1.0: GPL-3.0, notices, README
This commit is contained in:
1 parent
82c64086d5
commit
a1b1b1ae51
19 files changed
+1503
-105
No files matched your search
@@ -10,6 +10,8 @@ test
|
|||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
docs/img
|
docs/img
|
||||||
|
# the image needs only the research JSON tables (server/sim/nodeData.js fallback), not the notes
|
||||||
|
docs/research/*.md
|
||||||
# game art is mounted at runtime or downloaded with --build-arg FETCH_ASSETS=1, never sent from the host
|
# game art is mounted at runtime or downloaded with --build-arg FETCH_ASSETS=1, never sent from the host
|
||||||
public/assets
|
public/assets
|
||||||
# generated from node_modules inside the image
|
# generated from node_modules inside the image
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
# 卫戍协议:盟约 · production image (server + static client). Docs: docs/DEPLOY.md「Docker」.
|
# 卫戍协议:盟约 · production image (server + static client). Docs: docs/DEPLOY.md「Docker」.
|
||||||
#
|
#
|
||||||
# Game art/audio is © Hypergryph and never part of the repository. Two ways to get it into a container:
|
# Code: GPL-3.0-or-later (LICENSE). Game art/audio is © Hypergryph / Yostar, not covered by the GPL, non-commercial use
|
||||||
|
# only (NOTICE.md), and never part of the repository. Two ways to get it into a container:
|
||||||
# A) download it while building (~250 MB, needs internet during the build):
|
# A) download it while building (~250 MB, needs internet during the build):
|
||||||
# docker build -t stronghold-protocol --build-arg FETCH_ASSETS=1 .
|
# docker build -t stronghold-protocol --build-arg FETCH_ASSETS=1 .
|
||||||
# B) build without it and mount the host's copy (prepared with `node tools/setup.mjs` on the host):
|
# B) build without it and mount the host's copy (prepared with `node tools/setup.mjs` on the host):
|
||||||
|
|||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. 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
|
||||||
|
them 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 prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. 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.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey 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;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If 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 convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU 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 that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
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.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
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
|
||||||
|
state 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program 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, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU 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. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# 版权与使用声明(NOTICE)
|
||||||
|
|
||||||
|
**卫戍协议:盟约 · Stronghold Protocol** 是《明日方舟》限时玩法「卫戍协议:盟约」的**非官方同人复刻**,与上海鹰角网络科技有限公司(Hypergryph)、Yostar 及其关联方**没有任何关联**,也未获得其授权或认可。
|
||||||
|
|
||||||
|
## 1. 代码许可证:GPL-3.0-or-later
|
||||||
|
|
||||||
|
Copyright (C) 2026 Stronghold-Protocol contributors
|
||||||
|
|
||||||
|
本项目自己编写的源代码与文档文字(`server/`、`shared/`、`public/` 下的 JS / CSS / HTML、`tools/`、`scripts/`、`test/`、`docs/` 等)以 **GNU 通用公共许可证第 3 版或(由你选择)任何更新版本**(GPL-3.0-or-later)发布,全文见 [LICENSE](LICENSE)。你可以在该许可证的条件下使用、修改和再分发这些代码。
|
||||||
|
|
||||||
|
例外:
|
||||||
|
|
||||||
|
- `tools/local-extract/aklz4.py` 来自 [isHarryh/Ark-Unpacker](https://github.com/isHarryh/Ark-Unpacker),保持 BSD-3-Clause 许可(见 `tools/local-extract/LICENSE-Ark-Unpacker.txt`)。
|
||||||
|
- 通过 npm 安装的第三方库(PixiJS、pixi-spine、Preact、htm、three.js、ws 等)和字体各自保留原许可证,见 [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md)。
|
||||||
|
|
||||||
|
**附加许可(GPL-3.0 第 7 条)** — Additional permission under GNU GPL version 3 section 7:
|
||||||
|
|
||||||
|
> If you modify this Program, or any covered work, by linking or combining it with the Spine Runtimes (as shipped in
|
||||||
|
> pixi-spine, or a modified version of them), containing parts covered by the terms of the Spine Runtimes License
|
||||||
|
> Agreement, the licensors of this Program grant you additional permission to convey the resulting work.
|
||||||
|
> Corresponding Source for a non-source form of such a combination shall include the source code for the parts of
|
||||||
|
> the Spine Runtimes used as well as that of the covered work.
|
||||||
|
|
||||||
|
(大意:允许把本项目与 pixi-spine 中的 Spine Runtimes 组合后再分发;Spine Runtimes 本身仍受其自己的许可证约束。)
|
||||||
|
|
||||||
|
## 2. 不属于本项目、不受 GPL 约束的内容
|
||||||
|
|
||||||
|
《明日方舟》及「卫戍协议」相关的全部**名称、角色、美术、Spine 模型、界面图、音乐音效、文本与游戏数据**,版权归上海鹰角网络科技有限公司及其授权方(Yostar 等)所有。具体包括:
|
||||||
|
|
||||||
|
- Release 完整包中的 `public/assets/**`(含从官方客户端本地提取的 3D 棋盘模型与贴图 `public/assets/local/**`)和 `public/fonts/**`(字体归各自作者);
|
||||||
|
- 由官方数据表生成的 `data/*.json`,以及含有或派生自游戏数据的 `docs/research/*.json`、`test/fixtures/official-waves.json`、`public/dev/recordings/*.json`;
|
||||||
|
- `docs/img/` 中的游戏截图;
|
||||||
|
- `docs/` 中引用的 PRTS、BWIKI、NGA、巴哈姆特等社区页面的文字(仍按其来源的许可,维基文本为 CC BY-NC-SA)。
|
||||||
|
|
||||||
|
这些内容**不在 GPL-3.0 授权范围内**,本项目也无权就它们向任何人授予任何权利。
|
||||||
|
|
||||||
|
## 3. 仅限非商业用途
|
||||||
|
|
||||||
|
- 本项目仅供**学习、研究和个人非商业娱乐**。
|
||||||
|
- 游戏素材与数据的权利人没有授权本项目或其使用者进行任何商业使用,因此包含或依赖这些素材的一切内容——Release 完整包、架设的服务器、截图、录像与直播等——都**不得用于任何形式的盈利**。包括但不限于:
|
||||||
|
- 出售或付费分发;
|
||||||
|
- 收费开服、付费房间或会员;
|
||||||
|
- 植入广告;
|
||||||
|
- 与本项目挂钩的打赏、赞助或众筹;
|
||||||
|
- 打包进任何收费产品或服务。
|
||||||
|
- 再分发完整包时,请保留本声明、[LICENSE](LICENSE) 和 [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md),并同样注明非官方、非商业。
|
||||||
|
- GPL 本身允许商业使用**代码**,上述限制针对的是不属于本项目的游戏素材与数据。
|
||||||
|
|
||||||
|
## 4. 权利人通知与删除
|
||||||
|
|
||||||
|
如果你是相关权利人,认为本项目的任何内容不妥,请在本仓库提交 Issue(或通过 GitHub 联系仓库所有者),我们会尽快删除相关内容,或下架完整包乃至整个仓库。
|
||||||
|
|
||||||
|
## 5. 免责声明
|
||||||
|
|
||||||
|
- 本项目按「原样」提供,**不附带任何明示或暗示的担保**(见 LICENSE 第 15、16 条)。
|
||||||
|
- 使用、架设或公开本项目的风险,包括网络安全、第三方联机工具与服务、当地法律法规,由使用者自行承担。
|
||||||
|
- 本项目不需要也不会索取任何游戏账号;可选的本地提取只读取你本机已安装的客户端文件。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**English summary.** Unofficial, non-commercial fan remake; not affiliated with or endorsed by Hypergryph or Yostar.
|
||||||
|
The project's own code is GPL-3.0-or-later (with the Spine Runtimes linking permission above). All Arknights names,
|
||||||
|
art, models, audio and data — including everything under `public/assets/` in the release bundle — are © Hypergryph /
|
||||||
|
Yostar and their licensors, are **not** covered by the GPL, and may be used for study and personal non-commercial
|
||||||
|
purposes only: no selling, paid distribution, paid hosting, ads, donations or any other monetisation. Rights holders
|
||||||
|
can request removal through a GitHub issue and the content will be taken down. No warranty of any kind.
|
||||||
@@ -1,9 +1,22 @@
|
|||||||
# 卫戍协议:盟约 · Stronghold Protocol: Covenant
|
# 卫戍协议:盟约 · Stronghold Protocol: Covenant
|
||||||
|
|
||||||
《明日方舟》季节性自走棋塔防玩法「卫戍协议:盟约」的**同人联机网页复刻**。浏览器即开即玩:独立模拟(单人)与同盟模拟(1–4 人合作,可用 AI 队友补位),局域网 / 公网联机,一台小主机就能开服。
|
《明日方舟》季节性自走棋塔防玩法「卫戍协议:盟约」的**非官方同人复刻**:浏览器即开即玩,单人或 1–4 人联机合作。
|
||||||
|
|
||||||
> 非官方同人项目,仅供学习交流,**禁止商用**。游戏素材版权归上海鹰角网络 / Yostar,**不包含在本仓库中**(在你自己的电脑上下载或提取;`docs/img/` 里只有几张说明用的游戏截图)。详见 [致谢与声明](#致谢与声明)。
|

|
||||||
> English summary: [below](#english).
|

|
||||||
|

|
||||||
|
|
||||||
|
## 声明
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> - 本项目是玩家自制的**非官方同人作品**,与上海鹰角网络科技有限公司(Hypergryph)、Yostar 及其关联方**没有任何关系**,未获其授权或认可。
|
||||||
|
> - 《明日方舟》及「卫戍协议」相关的名称、角色、美术、音乐、音效、文本与数据等素材,版权归原权利人所有。这些素材**不适用**本项目的 GPL-3.0 许可证;GPL 只覆盖本项目自己编写的代码。
|
||||||
|
> - 仅供学习交流与个人非商业使用。**严禁任何形式的盈利**,包括但不限于:售卖本项目或整合包、付费下载或付费分发、收费服务器或收费代开、广告 / 打赏 / 会员等变现方式,以及其他任何商业用途。
|
||||||
|
> - 仓库源码不包含游戏的美术与音频素材(只有由官方数据表生成的数据和几张游戏截图,同样不适用 GPL);[Releases](../../releases/latest) 中的整合包为了方便玩家附带了素材,下载即视为同意本声明。请勿将素材用于本项目以外的用途或单独再分发。完整条款见 [NOTICE.md](NOTICE.md)。
|
||||||
|
> - 权利人如认为本项目侵犯其权益,请通过 Issue 联系,我们会**立即删除**相关内容。
|
||||||
|
> - 本项目按「现状」提供,**不提供任何担保**,使用风险自负。
|
||||||
|
|
||||||
|
English summary: [below](#english).
|
||||||
|
|
||||||
| 同盟房间 | 策略轮选 | 休整期(商店 / 盟约) |
|
| 同盟房间 | 策略轮选 | 休整期(商店 / 盟约) |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
@@ -11,115 +24,168 @@
|
|||||||
| **部署方向轮盘** | **作战** | **最终攻势** |
|
| **部署方向轮盘** | **作战** | **最终攻势** |
|
||||||
|  |  |  |
|
|  |  |  |
|
||||||
|
|
||||||
## 特性
|
## 目录
|
||||||
|
|
||||||
- 完整的一局流程:确认本局信息 → 策略轮选(40 种策略)→ 14 回合(+ 隐秘核心)→ 结算称号。
|
- [声明](#声明) · [简介](#简介) · [功能一览](#功能一览)
|
||||||
- 4 种难度(标准 / 险境 / 绝境 / 终极),独立与同盟两套参数,数据来自官方表。
|
- [快速开始](#快速开始):[整合包](#方式一整合包推荐) · [从源码运行](#方式二从源码运行) · [系统要求](#系统要求) · [端口与配置](#端口与配置) · [局域网联机](#和朋友一起玩局域网)
|
||||||
- 112 名可招募干员(+ 精锐)及技能天赋、23 个盟约与层数、特质、装备与法术、机变、10 个敌方领袖、地形装置。
|
- [联机方式](#联机方式) · [操作](#操作) · [文档](#文档) · [开发与测试](#开发与测试) · [项目结构](#项目结构)
|
||||||
- **干员调配**(大厅 / 房间 / 本局信息确认时):和官方一样不能调整等阶,但可为每名干员选择携带的技能(283 个技能全部手工实现)与精锐的模组(或不装备)。
|
- [许可证](#许可证) · [致谢与数据来源](#致谢与数据来源) · [贡献](#贡献)
|
||||||
- 联防、最终攻势(两人共享战场与领袖血池)、隐秘核心;同盟模拟断线 10 分钟内可重连(掉线期间按原阵容自动作战,也可「暂离」交给 AI 托管),独立模拟 24 小时内可回来继续。
|
|
||||||
- 真实 Spine 小人、官方 BGM / 音效、表情(6 套 × 6 个);可选的官方 3D 棋盘(需从本机客户端提取贴图)。
|
## 简介
|
||||||
- 作战特效:狙击曳光弹与枪口火光、法术 / 治疗 / 敌方光球、抛物线炮弹与爆炸、回环射手的回旋镖(飞出再飞回)、蕾缪安 3 技能的锁定与逐发炮击、近战斩击弧光、技能光柱与脚下光环;低画质只保留必要特效。
|
|
||||||
- 漏怪时顶栏的目标生命值实时减少(结算时确定);点选、拖放和配发装备都按地上的方格:点哪个方格就选中那个方格上的干员,拖动时模型始终在指针 / 手指下。
|
「卫戍协议:盟约」是自走棋 + 塔防:休整期在调度中心招募干员、摆阵、配装备,作战期干员自动部署,迎击从红门涌来的敌人,漏过去的敌人扣目标生命值。本项目在浏览器里复刻了这一玩法,规则和数值尽量对照官方数据表与 PRTS 核对。
|
||||||
- 被击倒的干员留在原地并显示再部署倒计时圈(联防开始时已倒地的干员同样倒地倒计时),敌我单位显示官方样式的元素损伤图标(含爆发冷却);干员详情显示实时数值(作战中的当前数值 / 休整期的开战数值)。
|
|
||||||
- 战斗规则对照官方数据与 PRTS 核对:敌人索敌顺序、按接触半径阻挡(阻挡者倒下时由接触的干员接替)、近地悬浮敌人算空中单位、巨型领袖约 5×3 格的受击范围、元素损伤与无来源的元素爆发。
|
- **独立模拟**(单人)与**同盟模拟**(1–4 人**合作**,没有 PvP;空位可以加 AI 队友)。
|
||||||
- 只有一名玩家时(独立模拟,或同盟模拟只带 AI 队友)除作战外不计时;选策略每人 30 秒、只有一个倒计时;机变选卡和购买一样需要二次确认。
|
- 服务器是一个 Node.js 程序,**战斗在各玩家的浏览器里模拟**(和官方一样),服务器只管经济与回合,一台低功耗小主机就能开服。
|
||||||
- **战斗在各玩家浏览器里模拟**(和官方一样),服务器只管经济与回合:一台低功耗 Windows 小主机即可开服。
|
- 这是第一个公开版本(0.1.0)。仍有少数规则按推断实现,与官方不一致的地方欢迎在 Issue 里反馈。
|
||||||
|
|
||||||
|
## 功能一览
|
||||||
|
|
||||||
|
- **完整的一局**:确认本局信息 → 策略轮选(40 名策略)→ 14 回合 → 结算称号;险境及以上满足条件时进入第 15 回合「隐秘核心」。
|
||||||
|
- **4 种难度**:标准 / 险境 / 绝境 / 终极,独立与同盟各一套参数,均取自官方数据。
|
||||||
|
- **休整期**:招募、刷新、冻结、升级调度中心;整备区与临时整备区;从整备区拖到棋盘部署,用**方向轮盘**选择朝向。同盟模拟的卡池共用。
|
||||||
|
- **晋升精锐**:3 名同名干员自动合成精锐,并获得一次高一阶的免费招募。
|
||||||
|
- **干员与调配**:112 名可招募干员(+ 精锐)及其技能、天赋和特质;开局前可以为每名干员选择携带的技能(283 个技能全部手工实现)和精锐的模组。
|
||||||
|
- **盟约与层数**:23 个盟约(8 个势力核心盟约 + 附加盟约),层数整局保留,每个盟约最多 999 层。
|
||||||
|
- **装备与机变**:装备与法术,同名装备合成、特定组合赋予盟约效果;已配发的装备锁定在干员身上。部分回合开始前有机变选卡(装备、资金、干员、层数、悬赏等)。
|
||||||
|
- **自动作战**:技能按官方「技能策略」自动释放;按接触半径阻挡,阻挡者倒下时由接触的干员接替;元素损伤与元素爆发;召唤物由玩家手动摆放;推开 / 拉拽按力度与重量计算;被击倒的干员留在原地显示再部署倒计时。
|
||||||
|
- **地形与敌人**:阻隔工事、射击台、源石流吹风机、沼泽、排气格栅、涨潮等地形装置;空中与近地悬浮敌人、悬赏敌人。
|
||||||
|
- **联防**:有人漏怪、又有人完美作战时,完美作战的队友带着阵容帮忙拦截漏掉的敌人。
|
||||||
|
- **最终攻势与隐秘核心**:两人共享一个战场,全队共同削减同一条领袖血条;10 个敌方领袖,巨型领袖约 5×3 格的受击范围,以及官方的限伤规则。
|
||||||
|
- **结算称号**:卫戍之星、不朽盟约、坚若磐石等 6 个称号。
|
||||||
|
- **断线重连**:同盟模拟断线后 10 分钟内重新打开页面即可回到原座位,掉线期间按原阵容自动作战,也可以「暂离」交给 AI 托管;独立模拟 24 小时内可以回来继续(同一个浏览器)。
|
||||||
|
- **交互细节**:漏怪时顶栏的目标生命值实时减少(结算时确定);点选、拖放和配发装备都按地上的方格;购买、升级和机变选卡都需要点两次确认;只有一名玩家时除作战外不计时。
|
||||||
|
- **画面与声音**:真实 Spine 小人、官方 BGM 与音效、表情(6 套 × 6 个)、作战特效;可选的官方 3D 棋盘(需要从本机客户端提取贴图)。
|
||||||
|
- **手机与电脑**:触摸拖拽、长按查看详情,推荐横屏;设置里可以调低画质。
|
||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
|
||||||
需要 **Node.js 18+**(推荐 22 或 24 LTS)和约 **400 MB** 磁盘空间。第一次启动会自动安装依赖并下载约 250 MB 素材(可中断,再次启动会续传)。
|
### 方式一:整合包(推荐)
|
||||||
|
|
||||||
### Windows
|
整合包里已经包含代码、运行依赖和全部美术 / 音频(含官方 3D 棋盘贴图),解压就能玩,不需要再下载任何东西。
|
||||||
|
|
||||||
1. 安装 Node.js:在 PowerShell 里运行 `winget install OpenJS.NodeJS.LTS`,或到 <https://nodejs.org/zh-cn/download> 下载安装包。
|
1. **安装 Node.js 22 或 24(LTS)**
|
||||||
2. 获取代码:`git clone <本仓库地址>`,或在 GitHub 页面 *Code → Download ZIP* 后解压。
|
- Windows:在 PowerShell 里运行 `winget install OpenJS.NodeJS.LTS`,或到 <https://nodejs.org/zh-cn/download> 下载安装包。
|
||||||
3. 双击 **`scripts\start-windows.bat`**(ZIP 下载的若弹出「安全警告」,点「运行」)。准备完成后会自动打开浏览器,窗口里会列出朋友可用的局域网地址。
|
- macOS:`brew install node@22`,或到官网下载安装包。
|
||||||
|
- Linux:发行版的包管理器、nvm 或 fnm。
|
||||||
|
2. **下载**:在 [Releases](../../releases/latest) 页面下载 v0.1.0 的整合包(zip),解压到一个路径较短的文件夹(Windows 上建议不要放在 OneDrive 同步的目录里)。
|
||||||
|
3. **启动**
|
||||||
|
- Windows:双击 **`scripts\start-windows.bat`**。如果弹出「安全警告」,点「运行」;Windows 防火墙弹窗请勾选「专用网络」并允许。
|
||||||
|
- macOS / Linux:在解压出的文件夹里运行 `./scripts/start.sh`(或 `bash scripts/start.sh`)。
|
||||||
|
4. 浏览器会自动打开 `http://localhost:3000`。窗口里列出的局域网地址可以直接发给同一网络的朋友。关闭窗口(或按 `Ctrl+C`)即停止服务器。
|
||||||
|
|
||||||
也可以用 PowerShell:`powershell -ExecutionPolicy Bypass -File scripts\start-windows.ps1`(没有 Node.js 时会提示用 winget 安装)。
|
### 方式二:从源码运行
|
||||||
|
|
||||||
开机自动在后台运行、防火墙设置、固定 IP 等见 **[docs/DEPLOY.md](docs/DEPLOY.md)**。
|
|
||||||
|
|
||||||
### macOS / Linux
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone <本仓库地址> Stronghold-Protocol && cd Stronghold-Protocol
|
git clone https://github.com/sganggs/Stronghold-Protocol.git
|
||||||
scripts/start.sh # 首次:npm ci + 下载素材;然后启动服务器并打开浏览器
|
cd Stronghold-Protocol
|
||||||
|
npm install # 安装依赖(postinstall 会把 pixi / preact / three 复制到 public/vendor)
|
||||||
|
npm run setup # 检查环境,并从公开镜像下载约 250 MB 美术 / 音频(可中断,再次运行会续传)
|
||||||
|
npm start # 启动服务器:http://localhost:3000
|
||||||
```
|
```
|
||||||
|
|
||||||
### 手动(任何系统)
|
也可以直接运行启动脚本(Windows `scripts\start-windows.bat`,macOS / Linux `scripts/start.sh`):首次会自动安装依赖、下载素材,然后启动服务器并打开浏览器。
|
||||||
|
|
||||||
```bash
|
- **官方 3D 棋盘**需要从本机的《明日方舟》PC 客户端提取贴图(Windows 原生客户端、macOS 的 CrossOver 或 PlayCover)。`npm run setup` 检测到客户端时会询问是否提取(需要 Python 3.8+,依赖装在项目内的 `.venv-extract`,不影响系统);之后可以用 `node tools/setup.mjs --local` 重新提取,或用 `--game "<…/StreamingAssets/AB/Windows>"` 指定路径。没有客户端时自动使用 2D 棋盘,其他功能不受影响。
|
||||||
npm ci # 安装依赖(postinstall 会把 pixi / preact / three 复制到 public/vendor)
|
- 素材下载优先使用 GitHub,失败时自动改用 jsDelivr 镜像。
|
||||||
node tools/setup.mjs # 检查环境、下载/补全素材、(可选)从本机客户端提取官方贴图
|
- `npm run doctor`(即 `node tools/doctor.mjs`)可以随时诊断:Node 版本、素材是否完整、端口占用、局域网地址和防火墙。
|
||||||
npm start # http://localhost:3000
|
|
||||||
```
|
|
||||||
|
|
||||||
`node tools/doctor.mjs` 可随时诊断:Node 版本、素材是否完整、端口占用、局域网地址、防火墙提示。
|
### 系统要求
|
||||||
|
|
||||||
## 和朋友一起玩
|
| 项目 | 要求 |
|
||||||
|
|---|---|
|
||||||
|
| 开服的电脑 | Windows / macOS / Linux,Node.js 22 或 24(LTS);磁盘约 400–500 MB(素材、依赖与可选的本地提取贴图);内存空闲约 100 MB,每局再加几 MB |
|
||||||
|
| 玩家 | 支持 WebGL 的现代浏览器(Chrome / Edge / Firefox / Safari 最新版),电脑、手机或平板(横屏) |
|
||||||
|
| 网络 | 首次进入游戏时,每位玩家要从开服的电脑下载几十 MB 素材(之后走浏览器缓存);对局中流量很小 |
|
||||||
|
|
||||||
1. 打开页面 → 输入昵称 → **同盟模拟** → 创建房间。房主选择难度,可添加 / 移除 AI 队友。
|
显卡较弱时可以在「设置」里调低画质,或在网址后加 `?board=2d`(强制 2D 棋盘)/ `?render=fallback`(不用 WebGL 的简化画面)。
|
||||||
2. 把 4 位字母的**同盟密钥**,或「复制链接」得到的 `http://<地址>:3000/?room=密钥` 发给朋友。
|
|
||||||
3. 所有人点「准备就绪」后房主开始。刷新页面 / 断线后 10 分钟内重新打开即可回到原座位(独立模拟:24 小时内,用同一个浏览器)。
|
|
||||||
|
|
||||||
**局域网**:服务器启动时会打印 `LAN: http://192.168.x.x:3000`,同一 Wi-Fi / 路由器下的朋友直接打开。打不开时多半是防火墙:Windows 首次启动时在弹窗中允许「专用网络」,或运行 `node tools/doctor.mjs` 查看具体命令。
|
### 端口与配置
|
||||||
|
|
||||||
**公网**(朋友不在同一个网络):
|
默认监听 **TCP 3000**。换端口:启动脚本加 `--port 3001`,或设置环境变量 `PORT`。
|
||||||
|
|
||||||
| 方式 | 适合 | 做法 |
|
| 环境变量 | 默认 | 说明 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| **Tailscale / ZeroTier**(推荐) | 家里常开的小主机、固定几个朋友 | 主机和朋友都安装并加入同一个网络,朋友打开 `http://<主机的 100.x / ZeroTier IP>:3000`。无需公网 IP、不暴露到互联网、延迟低。 |
|
| `PORT` | `3000` | 监听端口 |
|
||||||
| **cloudflared 临时隧道** | 临时开一局,朋友什么都不用装 | `cloudflared tunnel --url http://localhost:3000`,把输出的 `https://xxxx.trycloudflare.com` 发给朋友。页面会自动使用 `wss://`。每次启动地址都会变。 |
|
| `HOST` | `0.0.0.0` | 监听地址(`127.0.0.1` = 只允许本机,放在反向代理后面时使用) |
|
||||||
| **路由器端口转发** | 有公网 IPv4 | 把路由器的 TCP 3000 转发到主机的局域网 IP,朋友访问 `http://<公网 IP>:3000`。注意安全(见 DEPLOY)。 |
|
| `SP_COMBAT` | `client` | `client`:各玩家浏览器模拟自己的战斗(服务器负载极低);`server`:由服务器模拟并推流 |
|
||||||
|
| `SP_VERIFY` | `off` | 服务器复算客户端上报的战斗结果:`off` / `sample`(约 1/8 抽查)/ `all`(全部复算,更耗 CPU) |
|
||||||
|
| `TRUST_PROXY` | `auto` | 是否信任 `X-Forwarded-For` 等转发头:`auto` 只信任来自本机 / 内网的代理;`1` 总是;`0` 从不 |
|
||||||
|
| `DEBUG` | 空 | 设为任意值输出详细日志 |
|
||||||
|
| `SP_NO_BROWSER` | 空 | 设为 `1` 时启动脚本不自动打开浏览器 |
|
||||||
|
|
||||||
详细步骤(含 Nginx / Caddy 反向代理与 HTTPS)见 [docs/DEPLOY.md](docs/DEPLOY.md)。玩法说明见 **[docs/PLAYING.md](docs/PLAYING.md)**(游戏内也有「玩法说明」)。
|
设置方式:macOS / Linux `PORT=8080 npm start`;PowerShell `$env:PORT=8080; npm start`;cmd `set "PORT=8080" && npm start`。健康检查:`GET /healthz`。
|
||||||
|
|
||||||
|
### 和朋友一起玩(局域网)
|
||||||
|
|
||||||
|
1. 打开页面 → 输入昵称 → **同盟模拟** → 创建房间。房主选择难度,可以添加 / 移除 AI 队友。
|
||||||
|
2. 把 4 位字母的**同盟密钥**,或「复制链接」得到的 `http://<地址>:3000/?room=密钥` 发给朋友。
|
||||||
|
3. 所有人点「准备就绪」后房主开始。
|
||||||
|
4. 同一 Wi-Fi / 路由器下的朋友打开启动窗口里列出的地址(形如 `http://192.168.x.x:3000`)即可。打不开时多半是防火墙:Windows 首次启动时在弹窗中允许「专用网络」,或运行 `npm run doctor` 查看具体命令;访客 Wi-Fi 常开启「AP 隔离」,也会导致连不上。
|
||||||
|
|
||||||
|
刷新页面或断线后,同盟模拟 10 分钟内、独立模拟 24 小时内重新打开即可回到原座位。服务器把房间和对局都保存在内存里,**重启服务器会结束所有对局**。
|
||||||
|
|
||||||
|
## 联机方式
|
||||||
|
|
||||||
|
朋友不在同一个局域网时,下面是几类常见做法,按自己的情况选一种即可。这里只做简单介绍,提到的工具和服务只是举例,本项目与它们没有任何关系,也不做推荐;具体的安装、费用和使用规则请以各自的官方说明为准。部署细节(防火墙、开机自启、反向代理与 HTTPS、Docker)见 **[docs/DEPLOY.md](docs/DEPLOY.md)**。
|
||||||
|
|
||||||
|
| 方式 | 怎么做 | 适合 |
|
||||||
|
|---|---|---|
|
||||||
|
| **同一局域网直连** | 把启动窗口里的局域网地址发给朋友 | 同一个家、宿舍或网吧 |
|
||||||
|
| **组网工具(虚拟局域网)** | 例如 Tailscale、ZeroTier、EasyTier、蒲公英:开服的人和朋友都安装同一个工具并加入同一个网络,朋友用开服电脑的虚拟 IP 访问 `http://<虚拟 IP>:3000` | 固定的几个熟人;不暴露到公网。朋友也要装客户端,部分工具需要注册账号;跨地区时可能走中继而变慢 |
|
||||||
|
| **内网穿透 / 隧道** | 只有开服的人运行客户端,朋友直接打开网址。例如自建的 frp(需要一台有公网 IP 的服务器)、Cloudflare 的 `cloudflared tunnel --url http://localhost:3000`(临时地址,每次启动都会变;国内访问延迟可能较高)、国内的樱花 frp 一类公共穿透服务(通常需要实名,大陆节点承载网页可能有备案要求) | 不想改路由器、没有公网 IP;免费线路带宽小时,首次加载素材会慢一些 |
|
||||||
|
| **云服务器 / VPS 直接部署** | 在 VPS 上运行整合包,或用仓库自带的 `Dockerfile`;用 Caddy / Nginx 加上 HTTPS。选离玩家近、线路好的地区(面向大陆玩家时,境外机房要关注回程线路,否则晚高峰延迟可能很高;大陆服务器绑定域名需要 ICP 备案) | 想长期开服、玩家分布在不同地区 |
|
||||||
|
|
||||||
|
通用注意事项:
|
||||||
|
|
||||||
|
- 游戏是**单个常驻 Node.js 进程 + WebSocket**(路径 `/ws`),只能跑一个实例,必须部署在域名根路径;Vercel 之类的 Serverless 平台和 GitHub Pages 之类的静态托管都不适用。反向代理要转发 WebSocket 升级。
|
||||||
|
- 游戏没有账号系统,**知道地址的人都能进来**。请只把地址发给朋友,不要公开发布,也不要搭建公开大厅;这同时能降低素材版权方面的风险。
|
||||||
|
- 有公网 IPv4 时也可以在路由器上做端口转发,但这会把家里的电脑直接暴露在公网上,优先考虑上面的方式。
|
||||||
|
|
||||||
## 操作
|
## 操作
|
||||||
|
|
||||||
| 操作 | 方法 |
|
| 操作 | 方法 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 购买 / 升级调度中心 / 机变选卡 | 点一次选中,再点一次确认(`D` 升级) |
|
| 购买 / 升级调度中心 / 机变选卡 | 点一次选中,再点一次确认(`D` 升级) |
|
||||||
| 部署 / 移动干员 | 从整备区拖到棋盘格 → 出现方向轮盘 → 往上/右/下/左滑动选择朝向后松手;松在中心或点「✕ 点击取消」取消。拖动时模型在指针 / 手指下,指针所在的格子就是落点 |
|
| 部署 / 移动干员 | 从整备区拖到棋盘格 → 出现方向轮盘 → 往上 / 右 / 下 / 左滑动选择朝向后松手;松在中心或点「✕ 点击取消」取消。拖动时模型在指针 / 手指下,指针所在的格子就是落点 |
|
||||||
| 调整朝向 | 把干员拖回它自己的格子,再选方向 |
|
| 调整朝向 | 把干员拖回它自己的格子,再选方向 |
|
||||||
| 出售 / 撤退 / 销毁装备 | 点击单位所在的格子 → 底部按钮「出售 +1」「撤退」;整备区里的装备与法术只能「销毁」,已配发的装备锁定在干员身上(干员出售或合成精锐时退回整备区)。也可以把棋盘上的干员拖回整备区撤退 |
|
| 出售 / 撤退 / 销毁装备 | 点击单位所在的格子 → 底部按钮「出售 +1」「撤退」;也可以把棋盘上的干员拖回整备区撤退。整备区里的装备与法术只能「销毁」,已配发的装备锁定在干员身上(干员出售或合成精锐时退回整备区) |
|
||||||
| 装备 | 把装备拖到干员所在的格子上(配发给该格子上的干员,格子会高亮;每人 2 件;满了会弹出替换窗口,选择要替换的一件——它会被销毁);法术拖到地块上并选方向 |
|
| 装备 | 把装备拖到干员所在的格子上(每人 2 件;满了会弹出替换窗口,被替换的一件会被销毁);法术拖到地块上并选方向 |
|
||||||
| 查看详情 | 右键或长按单位 / 卡牌(干员的特质显示在最上方;属性为实时数值,高于基础值为绿色、低于为红色) |
|
| 查看详情 | 右键或长按单位 / 卡牌(属性为实时数值,高于基础值为绿色、低于为红色) |
|
||||||
| 快捷键 | `R` 刷新 · `F` 冻结 · `D` 升级 · `Space` 准备就绪 · `Esc` 取消 / 关闭 |
|
| 快捷键 | `R` 刷新 · `F` 冻结 · `D` 升级 · `Space` 准备就绪 · `Esc` 取消 / 关闭 |
|
||||||
| 方向轮盘键盘操作 | 方向键预览 · `Enter` 确认 · `Esc` 取消 |
|
| 方向轮盘键盘操作 | 方向键预览 · `Enter` 确认 · `Esc` 取消 |
|
||||||
| 暂停(独立模拟) | 作战中(含最终攻势 / 隐秘核心)点顶栏的「暂停」或按 `Space`,再点「继续作战」(或 `Space`)继续;同盟模拟的作战不能暂停 |
|
| 暂停(独立模拟) | 作战中(含最终攻势 / 隐秘核心)点顶栏的「暂停」或按 `Space`,再点「继续作战」(或 `Space`)继续;同盟模拟的作战不能暂停 |
|
||||||
| 表情 | 左下角「交流」,左右滑动(或方向键)换主题,冷却 1 秒 |
|
| 表情 | 左下角「交流」,左右滑动(或方向键)换主题,冷却 1 秒 |
|
||||||
| 观战 | 自己的作战结束后(或休整期)点左侧队友头像 →「前往查看」 |
|
| 观战 | 自己的作战结束后(或休整期)点左侧队友头像 →「前往查看」 |
|
||||||
|
|
||||||
手机和平板也能玩(触摸拖拽、长按查看),推荐横屏(细长屏幕上休整期镜头会自动微调,整备区不会被购买栏挡住);电脑推荐 Chrome / Edge / Firefox / Safari 最新版。显卡较弱时可在「设置」里调低画质,或在网址后加 `?board=2d`(强制 2D 棋盘)/ `?render=fallback`(不用 WebGL 的简化 DOM 画面)。
|
完整的规则、数值和小技巧见 **[docs/PLAYING.md](docs/PLAYING.md)**(游戏内左下角也有「玩法说明」)。
|
||||||
|
|
||||||
## 配置
|
## 文档
|
||||||
|
|
||||||
| 环境变量 | 默认 | 说明 |
|
| 文档 | 内容 |
|
||||||
|---|---|---|
|
|---|---|
|
||||||
| `PORT` | `3000` | 监听端口 |
|
| [docs/PLAYING.md](docs/PLAYING.md) | 玩法指南:流程、经济、招募与晋升、摆阵、联防、盟约、最终攻势、结算称号 |
|
||||||
| `HOST` | `0.0.0.0` | 监听地址(`127.0.0.1` = 只允许本机,放在反向代理后面时使用) |
|
| [docs/DEPLOY.md](docs/DEPLOY.md) | 部署指南:Windows 开服与开机自启、防火墙、组网 / 隧道、反向代理与 HTTPS、Docker、systemd、排错 |
|
||||||
| `SP_COMBAT` | `client` | `client`:各玩家浏览器模拟自己的战斗(官方模式,服务器负载极低);`server`:旧的服务器模拟 + 推流模式 |
|
| [docs/DESIGN.md](docs/DESIGN.md) | 架构与契约(英文):技术栈、目录分工、网络协议、渲染与 UI、各次试玩后的规则修订 |
|
||||||
| `SP_VERIFY` | `off` | 服务器复算客户端上报的战斗结果:`off` / `sample`(约 1/8 抽查并记录)/ `all`(全部复算,不一致时以服务器为准,更耗 CPU) |
|
| [docs/SIM.md](docs/SIM.md) | 战斗模拟引擎参考(英文):钩子、技能描述格式、职业默认行为 |
|
||||||
| `TRUST_PROXY` | `auto` | 是否信任 `X-Forwarded-For` 等转发头:`auto` 只信任来自本机/内网的代理(如 cloudflared、Nginx);`1` 总是;`0` 从不 |
|
| [docs/META.md](docs/META.md) | 对局与经济引擎(英文):回合流程、商店、联防、最终攻势的实现细节 |
|
||||||
| `DEBUG` | 空 | 设为任意值输出详细日志 |
|
| [docs/DATA.md](docs/DATA.md) | 由官方数据表生成的游戏数据(英文) |
|
||||||
| `SP_NO_BROWSER` | 空 | 设为 `1` 时启动脚本不自动打开浏览器 |
|
| [docs/ASSETS.md](docs/ASSETS.md) | 素材来源、目录结构与清单(英文) |
|
||||||
|
| [docs/BALANCE.md](docs/BALANCE.md) | 难度模型与测量(英文) |
|
||||||
|
| [docs/research/](docs/research/00-INDEX.md) | 官方规则、数据与界面的调研记录 |
|
||||||
|
|
||||||
设置方式:macOS / Linux `PORT=8080 npm start`;PowerShell `$env:PORT=8080; npm start`;cmd `set "PORT=8080" && npm start`;启动脚本也接受 `--port 8080`。健康检查:`GET /healthz`。
|
## 开发与测试
|
||||||
|
|
||||||
## 可选:从本机客户端提取官方贴图
|
|
||||||
|
|
||||||
如果这台电脑装有《明日方舟》PC 客户端(Windows 原生、macOS CrossOver 或 PlayCover),`node tools/setup.mjs` 会检测到并询问是否提取官方棋盘贴图、UI、表情、模组类型图标和教程图(需要 Python 3.8+,依赖安装在项目内的 `.venv-extract`,不影响系统)。之后可随时 `node tools/setup.mjs --local` 重新提取,或 `--game "<…\StreamingAssets\AB\Windows>"` 指定路径。提取结果只在本机(`public/assets/local/`、`data/local-assets.json`,均已被 git 忽略);没有它游戏一样能玩,只是棋盘为 2D、部分 UI 用替代图(模组类型图标改为文字)。
|
|
||||||
|
|
||||||
## 测试
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node --test # 单元 + 集成测试(约 2840 项;缺少素材 / 浏览器的用例会自动跳过)
|
npm run dev # node --watch:改动服务器代码后自动重启
|
||||||
SP_E2E=1 node --test test/ui/mock.e2e.test.js # 需要本机 Chrome(CHROME_PATH 可指定路径)
|
node --test # 单元 + 集成测试(约 2880 项;缺少素材 / 浏览器的用例会自动跳过)
|
||||||
SP_REAL_E2E=1 node --test test/ui/real.e2e.test.js # 需要 Chrome + 已下载素材
|
SP_E2E=1 node --test test/ui/mock.e2e.test.js # 浏览器端到端测试,需要本机 Chrome(CHROME_PATH 可指定路径)
|
||||||
|
SP_REAL_E2E=1 node --test test/ui/real.e2e.test.js # 需要 Chrome + 已下载的素材
|
||||||
|
RENDER_E2E=1 node --test 'test/render/*.browser.test.js' # 渲染测试,部分需要本地提取的棋盘贴图
|
||||||
```
|
```
|
||||||
|
|
||||||
GitHub Actions([.github/workflows/ci.yml](.github/workflows/ci.yml))在 Ubuntu 与 Windows 上运行 `npm ci`、`node --test` 和服务器冒烟测试。
|
- 游戏数据由 `npm run build-data`(`tools/build-data.mjs`)从官方数据表生成,不要手工修改 `data/*.json`。
|
||||||
|
- GitHub Actions([.github/workflows/ci.yml](.github/workflows/ci.yml))在 Ubuntu 与 Windows、Node 22 / 24 上运行 `npm ci`、`node --test` 和服务器冒烟测试。
|
||||||
|
|
||||||
## 项目结构
|
## 项目结构
|
||||||
|
|
||||||
@@ -128,29 +194,44 @@ GitHub Actions([.github/workflows/ci.yml](.github/workflows/ci.yml))在 Ubun
|
|||||||
| `server/` | Node HTTP 静态服务 + WebSocket(`/ws`)、大厅、对局引擎(`match/`)、战斗模拟(`sim/`,浏览器与服务器共用) |
|
| `server/` | Node HTTP 静态服务 + WebSocket(`/ws`)、大厅、对局引擎(`match/`)、战斗模拟(`sim/`,浏览器与服务器共用) |
|
||||||
| `shared/` | 前后端共用的常量与网络协议 |
|
| `shared/` | 前后端共用的常量与网络协议 |
|
||||||
| `public/` | 浏览器客户端(原生 ES 模块,PixiJS + pixi-spine、three.js 3D 棋盘、Preact + htm UI) |
|
| `public/` | 浏览器客户端(原生 ES 模块,PixiJS + pixi-spine、three.js 3D 棋盘、Preact + htm UI) |
|
||||||
| `data/` | 由官方数据表生成的游戏数据(`tools/build-data.mjs`)与素材清单 `assets.json` |
|
| `data/` | 由官方数据表生成的游戏数据与素材清单 `assets.json` |
|
||||||
| `tools/` | `setup.mjs` / `doctor.mjs`、素材下载 `fetch-assets.mjs`、数据构建、本地提取 `local-extract/` |
|
| `tools/` | `setup.mjs` / `doctor.mjs`、素材下载 `fetch-assets.mjs`、数据构建、本地提取 `local-extract/` |
|
||||||
| `scripts/` | 启动脚本(Windows / macOS / Linux)、Windows 开机自启 |
|
| `scripts/` | 启动脚本(Windows / macOS / Linux)、Windows 开机自启 |
|
||||||
| `docs/` | [DESIGN](docs/DESIGN.md)(架构与契约)· [DEPLOY](docs/DEPLOY.md) · [PLAYING](docs/PLAYING.md) · [ASSETS](docs/ASSETS.md) · [DATA](docs/DATA.md) · `research/` |
|
| `docs/` | 文档与调研 |
|
||||||
| `test/` | `node:test` 测试 |
|
| `test/` | `node:test` 测试 |
|
||||||
|
|
||||||
## 致谢与声明
|
## 许可证
|
||||||
|
|
||||||
|
- **代码**:本项目自己编写的代码以 **GPL-3.0-or-later** 发布,全文见 [LICENSE](LICENSE);另附一条 GPL 第 7 条的附加许可,允许与 pixi-spine 中的 Spine Runtimes 组合分发(见 [NOTICE.md](NOTICE.md))。
|
||||||
|
- **游戏素材不在许可范围内**:《明日方舟》相关的美术、音乐、音效、文本与数据等版权归原权利人所有,不适用 GPL,使用限制见上方的[声明](#声明)和 [NOTICE.md](NOTICE.md)。
|
||||||
|
- **第三方组件**各自遵循其许可证:通过 npm 安装的库(整合包的 `node_modules` 中附带各自的许可证文件)、`tools/local-extract/aklz4.py` 的算法(BSD-3-Clause),以及字体等,清单与许可证全文见 [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md)。
|
||||||
|
|
||||||
|
## 致谢与数据来源
|
||||||
|
|
||||||
- 《明日方舟》及「卫戍协议」相关的全部名称、角色、美术、音频与数据版权归 **上海鹰角网络科技有限公司(Hypergryph)** 及其授权方(Yostar 等)所有。本项目为非官方、非商业的爱好者作品,与官方无任何关联;如有侵权请联系删除。
|
|
||||||
- **本仓库不包含游戏素材文件**(`docs/img/` 中的几张游戏截图仅用于说明):美术 / 音频 / 字体由 `tools/fetch-assets.mjs` 在使用者本机下载,本地客户端贴图由使用者自行提取,均被 `.gitignore` 排除。请勿把 `public/assets/` 等目录上传或再分发。
|
|
||||||
- 游戏数据:[Kengxxiao/ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData)。
|
- 游戏数据:[Kengxxiao/ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData)。
|
||||||
- 素材来源:[yuanyan3060/ArknightsGameResource](https://github.com/yuanyan3060/ArknightsGameResource)、[fexli/ArknightsResource](https://github.com/fexli/ArknightsResource)、[isHarryh/Ark-Models](https://github.com/isHarryh/Ark-Models)、[ArknightsAssets/ArknightsAssets2](https://github.com/ArknightsAssets/ArknightsAssets2);字体来自 [TimWangZi/The-font-of-Arknights](https://github.com/TimWangZi/The-font-of-Arknights) 与 Google Fonts(Noto Sans SC)。详见 [docs/ASSETS.md](docs/ASSETS.md)。
|
- 素材来源:[yuanyan3060/ArknightsGameResource](https://github.com/yuanyan3060/ArknightsGameResource)、[fexli/ArknightsResource](https://github.com/fexli/ArknightsResource)、[isHarryh/Ark-Models](https://github.com/isHarryh/Ark-Models)、[ArknightsAssets/ArknightsAssets2](https://github.com/ArknightsAssets/ArknightsAssets2);字体来自 [TimWangZi/The-font-of-Arknights](https://github.com/TimWangZi/The-font-of-Arknights) 与 Google Fonts(Noto Sans SC)。详见 [docs/ASSETS.md](docs/ASSETS.md)。
|
||||||
|
- 规则核对参考:[PRTS 明日方舟中文 Wiki](https://prts.wiki/)。
|
||||||
- LZ4AK 解包:`tools/local-extract/aklz4.py` 的算法来自 [isHarryh/Ark-Unpacker](https://github.com/isHarryh/Ark-Unpacker)(BSD-3-Clause,经 MooncellWiki/UnityPy);解析 Unity 资源使用 [UnityPy](https://github.com/K0lb3/UnityPy)(MIT)。
|
- LZ4AK 解包:`tools/local-extract/aklz4.py` 的算法来自 [isHarryh/Ark-Unpacker](https://github.com/isHarryh/Ark-Unpacker)(BSD-3-Clause,经 MooncellWiki/UnityPy);解析 Unity 资源使用 [UnityPy](https://github.com/K0lb3/UnityPy)(MIT)。
|
||||||
- 库:[PixiJS](https://pixijs.com/)(MIT)、[pixi-spine](https://github.com/pixijs/spine)(MIT;其中包含的 Spine Runtime 代码另受 [Spine Runtimes License](https://esotericsoftware.com/spine-runtimes-license) 约束,其中有关于 Spine 编辑器授权的条款,公开发布前请自行阅读)、[three.js](https://threejs.org/)(MIT)、[Preact](https://preactjs.com/) + [htm](https://github.com/developit/htm)(MIT)、[ws](https://github.com/websockets/ws)(MIT)。这些库通过 npm 安装,不随仓库提交。
|
- 库:[PixiJS](https://pixijs.com/)(MIT)、[pixi-spine](https://github.com/pixijs/spine)(MIT;其中包含的 Spine Runtime 另受 [Spine Runtimes License](https://esotericsoftware.com/spine-runtimes-license) 约束)、[three.js](https://threejs.org/)(MIT)、[Preact](https://preactjs.com/) + [htm](https://github.com/developit/htm)(MIT)、[ws](https://github.com/websockets/ws)(MIT)。
|
||||||
- **代码许可证:TODO(由仓库所有者选择,例如 MIT / GPL-3.0;在此之前仓库中的代码保留所有权利)。** 无论选择哪种,上面的游戏素材与第三方内容都不在其范围内。
|
|
||||||
|
感谢以上项目的作者与维护者,以及鹰角网络带来的这款游戏。
|
||||||
|
|
||||||
|
## 贡献
|
||||||
|
|
||||||
|
欢迎提 Issue 反馈 bug、与官方规则不一致的地方或改进建议,也欢迎提交 Pull Request:
|
||||||
|
|
||||||
|
- 提交前请运行 `node --test`,并同步更新相关文档;文档使用简体中文,代码与注释使用英文。
|
||||||
|
- 提交的代码将以 GPL-3.0-or-later 发布。
|
||||||
|
- 请不要提交任何游戏素材文件(`public/assets/` 等目录已被 `.gitignore` 排除)。
|
||||||
|
- 本项目坚持非商业:请不要提交广告、付费、打赏等任何形式的变现功能。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## English
|
## English
|
||||||
|
|
||||||
A fan-made, online co-op browser remake of Arknights' seasonal auto-chess tower-defense mode *Stronghold Protocol: Covenant*. Solo and 1–4 player co-op (AI teammates fill seats), played over LAN or the internet. Combat is simulated in each player's browser (like the official client), so a low-power mini PC can host.
|
An **unofficial, non-commercial fan remake** of Arknights' seasonal auto-chess tower-defense mode *Stronghold Protocol: Covenant*, played in the browser: solo, or 1–4 player co-op (AI teammates can fill seats). Combat is simulated in each player's browser, so a low-power PC can host.
|
||||||
|
|
||||||
- **Run:** Node.js 18+ (22 or 24 LTS recommended). Windows: double-click `scripts\start-windows.bat`. macOS/Linux: `scripts/start.sh`. Manual: `npm ci && node tools/setup.mjs && npm start` → <http://localhost:3000>. First start downloads ~250 MB of game art (resumable). `node tools/doctor.mjs` diagnoses ports, assets, LAN addresses and firewall.
|
- **Run:** download the all-in-one bundle from [Releases](../../releases/latest), install Node.js 22 or 24, then double-click `scripts\start-windows.bat` (Windows) or run `./scripts/start.sh` (macOS / Linux) and open <http://localhost:3000>. From source: `npm install && npm run setup && npm start` (setup downloads ~250 MB of art from public mirrors; the official 3D board needs a local Arknights client to extract, otherwise the 2D board is used).
|
||||||
- **Friends:** create a co-op room and share the 4-letter code or the `?room=CODE` link. A dropped player can rejoin within 10 minutes (co-op) or resume a solo run within 24 hours (same browser; the server keeps everything in memory, so a restart ends all runs). LAN: use the printed `LAN:` URL. Internet: Tailscale/ZeroTier (recommended), `cloudflared tunnel --url http://localhost:3000` (wss handled automatically) or port forwarding — see [docs/DEPLOY.md](docs/DEPLOY.md).
|
- **Play with friends:** create a co-op room and share the 4-letter key or the `?room=KEY` link. On a LAN, use the address printed at start; otherwise use a virtual-LAN tool, a tunnel or a VPS — see [docs/DEPLOY.md](docs/DEPLOY.md).
|
||||||
- **Env:** `PORT`, `HOST`, `SP_COMBAT=client|server`, `SP_VERIFY=off|sample|all`, `TRUST_PROXY=auto|1|0`, `DEBUG`.
|
- **Disclaimer:** not affiliated with or endorsed by Hypergryph or Yostar. All Arknights names, art, audio, text and data are © their respective owners and are **not** covered by this project's GPL licence. For study and personal non-commercial use only — no selling, paid distribution, paid servers or monetisation of any kind. Content will be removed on request of the rights holders. Provided "as is", without warranty.
|
||||||
- **Disclaimer:** unofficial and non-commercial. Game names, art, audio and data © Hypergryph / Yostar; **no game art/audio/font files are in this repository** (only a few screenshots in `docs/img/`) — they are downloaded or extracted locally and git-ignored. Code licence: TODO (owner to choose).
|
- **License:** code GPL-3.0-or-later ([LICENSE](LICENSE)); game assets excluded.
|
||||||
@@ -0,0 +1,456 @@
|
|||||||
|
# Third-party notices(第三方组件声明)
|
||||||
|
|
||||||
|
Stronghold Protocol's own code is licensed under **GPL-3.0-or-later** (see [LICENSE](LICENSE) and [NOTICE.md](NOTICE.md)).
|
||||||
|
The components below are **not** part of that grant: each stays under its own licence, reproduced at the end of this
|
||||||
|
file. Nothing here is committed to the repository except `tools/local-extract/aklz4.py`; the client libraries are
|
||||||
|
installed by npm and copied into `public/vendor/` by `tools/vendor.mjs` (postinstall), and the release bundle carries
|
||||||
|
them (with `node_modules/`, which keeps each package's own licence file).
|
||||||
|
|
||||||
|
本项目自己的代码采用 GPL-3.0-or-later;下列第三方组件各自保留原许可证,不受 GPL 约束。
|
||||||
|
|
||||||
|
## Software
|
||||||
|
|
||||||
|
| Component | Version | Licence | Where it is used | In the repository | In the release bundle |
|
||||||
|
|---|---|---|---|---|---|
|
||||||
|
| [PixiJS](https://github.com/pixijs/pixijs) | 7.4.2 | MIT | browser renderer — `public/vendor/pixi.min.js` | no (npm) | yes |
|
||||||
|
| [pixi-spine](https://github.com/pixijs/spine) | 4.0.6 | MIT banner; contains the **Spine Runtimes**, under the **Spine Runtimes License Agreement** (package licence "SEE SPINE-LICENSE") | Spine model playback — `public/vendor/pixi-spine.js` | no (npm) | yes |
|
||||||
|
| [Preact](https://github.com/preactjs/preact) | 10.29.8 | MIT | UI — `public/vendor/preact.module.js`, `hooks.module.js` | no (npm) | yes |
|
||||||
|
| [htm](https://github.com/developit/htm) | 3.1.1 | Apache-2.0 | UI templates — `public/vendor/htm.module.js` | no (npm) | yes |
|
||||||
|
| [three.js](https://github.com/mrdoob/three.js) | 0.186.1 | MIT | official 3D board — `public/vendor/three.core.js`, `three.module.js` | no (npm) | yes |
|
||||||
|
| [ws](https://github.com/websockets/ws) | 8.22.0 | MIT | WebSocket server (`server/`) | no (npm) | yes (`node_modules/`) |
|
||||||
|
| [puppeteer-core](https://github.com/puppeteer/puppeteer) | 23.11.1 | Apache-2.0 | optional browser tests (dev dependency) | no (npm) | no |
|
||||||
|
| [Ark-Unpacker](https://github.com/isHarryh/Ark-Unpacker) LZ4AK decoder | — | BSD-3-Clause | `tools/local-extract/aklz4.py` (optional local extraction) | **yes** — keeps its notice; full text also in `tools/local-extract/LICENSE-Ark-Unpacker.txt` | yes |
|
||||||
|
| [UnityPy](https://github.com/K0lb3/UnityPy) (via MooncellWiki/UnityPy), [lz4](https://github.com/python-lz4/python-lz4), [Pillow](https://github.com/python-pillow/Pillow) | see `tools/local-extract/requirements.txt` | MIT / BSD-3-Clause / MIT-CMU | optional local extraction; installed by pip into `.venv-extract` only when the host opts in | no | no |
|
||||||
|
|
||||||
|
The Spine Runtimes License requires, among other things, that redistributions include its licence and copyright notice
|
||||||
|
(reproduced below) and that "each user of the Products must obtain their own Spine Editor license" unless the
|
||||||
|
integration is covered by the Spine Editor License Agreement — read it before redistributing. To allow the combination
|
||||||
|
at all, this project grants an additional permission under GPL-3.0 section 7 for linking with the Spine Runtimes (see
|
||||||
|
[NOTICE.md](NOTICE.md)).
|
||||||
|
|
||||||
|
## Fonts
|
||||||
|
|
||||||
|
| Font | Licence | How it gets here |
|
||||||
|
|---|---|---|
|
||||||
|
| Bender (Jovanny Lemonad / Oleg Zhuravlev, Gladkikh Ivan) | the authors' free-font terms (not GPL) | downloaded by `tools/fetch-assets.mjs` from [TimWangZi/The-font-of-Arknights](https://github.com/TimWangZi/The-font-of-Arknights) into `public/fonts/` (included in the release bundle) |
|
||||||
|
| Novecento Wide (Jan Tonellato / Synthview) | the authors' free-font terms (not GPL) | as above |
|
||||||
|
| Noto Sans SC, Oxanium, Rajdhani | SIL Open Font License 1.1 | loaded by the browser from Google Fonts at runtime; not distributed |
|
||||||
|
|
||||||
|
## Game data, art and audio
|
||||||
|
|
||||||
|
All names, characters, artwork, Spine models, UI graphics, music, sound effects and game data of *Arknights* /
|
||||||
|
「卫戍协议:盟约」 are © Shanghai Hypergryph Network Technology Co., Ltd. (上海鹰角网络科技有限公司) and its licensors
|
||||||
|
(Yostar and others). They are **not** licensed under the GPL and this project grants no rights to them; see
|
||||||
|
[NOTICE.md](NOTICE.md) for the non-commercial terms. Community mirrors used by `tools/fetch-assets.mjs` /
|
||||||
|
`tools/build-data.mjs`: [Kengxxiao/ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData),
|
||||||
|
[yuanyan3060/ArknightsGameResource](https://github.com/yuanyan3060/ArknightsGameResource),
|
||||||
|
[fexli/ArknightsResource](https://github.com/fexli/ArknightsResource),
|
||||||
|
[isHarryh/Ark-Models](https://github.com/isHarryh/Ark-Models),
|
||||||
|
[ArknightsAssets/ArknightsAssets2](https://github.com/ArknightsAssets/ArknightsAssets2) — thanks to their maintainers.
|
||||||
|
Quotations of PRTS Wiki, BWIKI, NGA, 巴哈姆特 and other community pages in `docs/` stay under the terms of their
|
||||||
|
sources (the wikis' texts are CC BY-NC-SA).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Licence texts
|
||||||
|
|
||||||
|
### PixiJS — MIT
|
||||||
|
|
||||||
|
```text
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2013-2023 Mathew Groves, Chad Engler
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### pixi-spine — Spine Runtimes License Agreement (node_modules/pixi-spine/SPINE-LICENSE)
|
||||||
|
|
||||||
|
```text
|
||||||
|
Spine Runtimes License Agreement
|
||||||
|
Last updated January 1, 2020. Replaces all prior versions.
|
||||||
|
|
||||||
|
Copyright (c) 2013-2020, Esoteric Software LLC
|
||||||
|
|
||||||
|
Integration of the Spine Runtimes into software or otherwise creating
|
||||||
|
derivative works of the Spine Runtimes is permitted under the terms and
|
||||||
|
conditions of Section 2 of the Spine Editor License Agreement:
|
||||||
|
http://esotericsoftware.com/spine-editor-license
|
||||||
|
|
||||||
|
Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||||
|
or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||||
|
"Products"), provided that each user of the Products must obtain their own
|
||||||
|
Spine Editor license and redistribution of the Products in any form must
|
||||||
|
include this license and copyright notice.
|
||||||
|
|
||||||
|
THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||||
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||||
|
BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Preact — MIT
|
||||||
|
|
||||||
|
```text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015-present Jason Miller
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### three.js — MIT
|
||||||
|
|
||||||
|
```text
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright © 2010-2026 three.js authors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### ws — MIT
|
||||||
|
|
||||||
|
```text
|
||||||
|
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
||||||
|
Copyright (c) 2013 Arnout Kazemier and contributors
|
||||||
|
Copyright (c) 2016 Luigi Pinca and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ark-Unpacker (tools/local-extract/aklz4.py) — BSD-3-Clause
|
||||||
|
|
||||||
|
```text
|
||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2022, Harry Huang
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### UnityPy (MooncellWiki/UnityPy) — MIT
|
||||||
|
|
||||||
|
```text
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019-2021 K0lb3
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
```
|
||||||
|
|
||||||
|
### htm (and puppeteer-core) — Apache License 2.0
|
||||||
|
|
||||||
|
```text
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright 2018 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
```
|
||||||
+4
-2
@@ -251,9 +251,11 @@ The 2026-09-27 verification pass also checked:
|
|||||||
|
|
||||||
## Licensing and credits
|
## Licensing and credits
|
||||||
|
|
||||||
|
The project's code is GPL-3.0-or-later (`LICENSE`); none of the items below is covered by it. Details: `NOTICE.md` (scope, non-commercial terms) and `THIRD-PARTY-NOTICES.md` (libraries, fonts, licence texts).
|
||||||
|
|
||||||
- **Game assets.** All images, Spine models, audio and game data are © **Hypergryph (上海鹰角网络)**. The overseas publisher is **Yostar**.
|
- **Game assets.** All images, Spine models, audio and game data are © **Hypergryph (上海鹰角网络)**. The overseas publisher is **Yostar**.
|
||||||
- This is an **unofficial, non-commercial fan project**: no ads, donations or paywall.
|
- This is an **unofficial, non-commercial fan project**: no ads, donations or paywall.
|
||||||
- Assets are fetched from public community dumps at install time and are not redistributed in this repository.
|
- Assets are fetched from public community dumps at install time and are not redistributed in this repository. The plug-and-play bundle attached to a GitHub release does carry them (with the local-client art) under the same non-commercial terms, with `NOTICE.md` inside.
|
||||||
- Assets will be removed on request from the rights holders.
|
- Assets will be removed on request from the rights holders.
|
||||||
- The client must show a credits screen: "Arknights © Hypergryph / Yostar. This is an unofficial fan project; all game assets belong to their owners."
|
- The client must show a credits screen: "Arknights © Hypergryph / Yostar. This is an unofficial fan project; all game assets belong to their owners."
|
||||||
- **Asset dumps and tools.** Credit to:
|
- **Asset dumps and tools.** Credit to:
|
||||||
@@ -262,7 +264,7 @@ The 2026-09-27 verification pass also checked:
|
|||||||
- [isHarryh/Ark-Models](https://github.com/isHarryh/Ark-Models) (ArkUnpacker). Not for commercial use.
|
- [isHarryh/Ark-Models](https://github.com/isHarryh/Ark-Models) (ArkUnpacker). Not for commercial use.
|
||||||
- [ArknightsAssets/ArknightsAssets2](https://github.com/ArknightsAssets/ArknightsAssets2) (ArknightsStudio)
|
- [ArknightsAssets/ArknightsAssets2](https://github.com/ArknightsAssets/ArknightsAssets2) (ArknightsStudio)
|
||||||
- [Kengxxiao/ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData)
|
- [Kengxxiao/ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData)
|
||||||
- **Spine runtime.** pixi-spine is MIT-licensed. It embeds Spine Runtime code under the [Spine Runtimes License](http://esotericsoftware.com/spine-runtimes-license), which formally expects a Spine Editor licence. This is commonly tolerated for non-commercial fan tools, and the Spine Runtimes License must be credited.
|
- **Spine runtime.** pixi-spine is MIT-licensed. It embeds Spine Runtime code under the [Spine Runtimes License](http://esotericsoftware.com/spine-runtimes-license), which formally expects a Spine Editor licence. This is commonly tolerated for non-commercial fan tools, and the Spine Runtimes License must be credited (`THIRD-PARTY-NOTICES.md`). The project's GPL carries an additional permission (section 7) to combine it with the Spine Runtimes (`NOTICE.md`).
|
||||||
- **Fonts.**
|
- **Fonts.**
|
||||||
- **Bender:** © Jovanny Lemonad (Oleg Zhuravlev, Ivan Gladkikh). Free for personal and commercial use.
|
- **Bender:** © Jovanny Lemonad (Oleg Zhuravlev, Ivan Gladkikh). Free for personal and commercial use.
|
||||||
- **Novecento Wide:** © Jan Tonellato / Synthview. Free licence.
|
- **Novecento Wide:** © Jan Tonellato / Synthview. Free licence.
|
||||||
|
|||||||
+9
-7
@@ -19,17 +19,19 @@
|
|||||||
|
|
||||||
### 1.1 安装与首次启动
|
### 1.1 安装与首次启动
|
||||||
|
|
||||||
1. 安装 Node.js 22 LTS 和 Git(在 PowerShell 或「终端」里):
|
1. 安装 Node.js 22 LTS 和 Git(在 PowerShell 或「终端」里;用下面的完整包时不需要 Git):
|
||||||
```powershell
|
```powershell
|
||||||
winget install OpenJS.NodeJS.LTS
|
winget install OpenJS.NodeJS.LTS
|
||||||
winget install Git.Git
|
winget install Git.Git
|
||||||
```
|
```
|
||||||
装完**关闭并重新打开**终端,`node -v` 应显示 v22 或更高(winget 的 LTS 目前是 v24.x,同样可用)。没有 winget 时从 <https://nodejs.org/zh-cn/download> 和 <https://git-scm.com/download/win> 下载安装。
|
装完**关闭并重新打开**终端,`node -v` 应显示 v22 或更高(winget 的 LTS 目前是 v24.x,同样可用)。没有 winget 时从 <https://nodejs.org/zh-cn/download> 和 <https://git-scm.com/download/win> 下载安装。
|
||||||
2. 下载代码,建议放在一个固定、短、**不在 OneDrive 同步范围内**的目录,例如:
|
2. 下载,二选一。建议放在一个固定、短、**不在 OneDrive 同步范围内**的目录,例如 `C:\Stronghold-Protocol`:
|
||||||
```powershell
|
- **完整包(推荐)**:在仓库的 [Releases](https://github.com/sganggs/Stronghold-Protocol/releases) 页面下载最新版本(当前为 v0.1.0)的完整包 zip(已含依赖、前端库和全部素材,包括官方 3D 棋盘),解压后把里面的 `Stronghold-Protocol` 文件夹放到上述位置。不需要 Git,首次启动也不用再下载素材。素材版权归上海鹰角网络 / Yostar,仅限非商业使用,见 [NOTICE.md](../NOTICE.md)。
|
||||||
git clone <本仓库地址> C:\Stronghold-Protocol
|
- **源码**:
|
||||||
```
|
```powershell
|
||||||
3. 双击 `C:\Stronghold-Protocol\scripts\start-windows.bat`。首次会:安装依赖(`npm ci`)→ 复制前端库 → 下载约 250 MB 素材(显示进度,中断后再次启动会续传)→ 若检测到本机的明日方舟客户端,询问是否提取官方贴图(可跳过)→ 启动服务器并打开浏览器。
|
git clone https://github.com/sganggs/Stronghold-Protocol.git C:\Stronghold-Protocol
|
||||||
|
```
|
||||||
|
3. 双击 `C:\Stronghold-Protocol\scripts\start-windows.bat`。首次会:安装依赖(`npm ci`;完整包已含,跳过)→ 复制前端库 → 下载约 250 MB 素材(完整包已含,跳过;显示进度,中断后再次启动会续传)→ 若检测到本机的明日方舟客户端,询问是否提取官方贴图(可跳过)→ 启动服务器并打开浏览器。
|
||||||
4. 窗口里会打印朋友可用的地址,例如 `http://192.168.1.23:3000`。用另一台设备打开它确认能进入。关闭窗口即停止服务器。
|
4. 窗口里会打印朋友可用的地址,例如 `http://192.168.1.23:3000`。用另一台设备打开它确认能进入。关闭窗口即停止服务器。
|
||||||
|
|
||||||
等价的手动命令:`npm ci`、`node tools/setup.mjs`、`npm start`。
|
等价的手动命令:`npm ci`、`node tools/setup.mjs`、`npm start`。
|
||||||
@@ -100,7 +102,7 @@ node tools/setup.mjs # 补下载新增的素材(已有文件会
|
|||||||
powershell -ExecutionPolicy Bypass -File scripts\install-service-windows.ps1 -Restart
|
powershell -ExecutionPolicy Bypass -File scripts\install-service-windows.ps1 -Restart
|
||||||
```
|
```
|
||||||
|
|
||||||
没装开机自启的话,最后一步改成重新双击 `start-windows.bat`。用 ZIP 下载的:解压新版本后,把旧目录里的 `public\assets`、`public\fonts`、`.cache` 和 `data\local-assets.json`(若有)复制过去,可避免重新下载。
|
没装开机自启的话,最后一步改成重新双击 `start-windows.bat`。用 Releases 完整包的:停止服务器,把新版本的完整包解压到新目录后从那里启动即可(素材已包含;装了开机自启的,在新目录重新运行一次 `install-service-windows.ps1`)。用 GitHub「Download ZIP」源码包的:解压新版本后,把旧目录里的 `public\assets`、`public\fonts`、`.cache` 和 `data\local-assets.json`(若有)复制过去,可避免重新下载。
|
||||||
|
|
||||||
## 2. 让不在同一网络的朋友加入
|
## 2. 让不在同一网络的朋友加入
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -4,6 +4,8 @@ This is the **single source of truth** for every implementer. Research lives in
|
|||||||
|
|
||||||
Language: all player-facing text is **Simplified Chinese** (names/descriptions come from official data). Code, comments and identifiers are English.
|
Language: all player-facing text is **Simplified Chinese** (names/descriptions come from official data). Code, comments and identifiers are English.
|
||||||
|
|
||||||
|
Versions: the first public release is **0.1.0** (`package.json`, `shared/constants.js APP_VERSION`) — the state described by this document, §20.15 included. The labels v1 / v2 / v2.1–v2.5.2 in §0, §14–§20 and in the BALANCE / SIM comparisons name the design generations and the private playtest builds that came before it; they are kept as history.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 0. Product scope (v1)
|
## 0. Product scope (v1)
|
||||||
@@ -112,6 +114,8 @@ tools/
|
|||||||
test/ node:test suites; test/e2e/ browser + bot tests
|
test/ node:test suites; test/e2e/ browser + bot tests
|
||||||
docs/ DESIGN.md (this), DATA.md, SIM.md, META.md, ASSETS.md, BALANCE.md, DEPLOY.md, PLAYING.md, research/
|
docs/ DESIGN.md (this), DATA.md, SIM.md, META.md, ASSETS.md, BALANCE.md, DEPLOY.md, PLAYING.md, research/
|
||||||
(the wire protocol is normative in shared/protocol.js itself)
|
(the wire protocol is normative in shared/protocol.js itself)
|
||||||
|
LICENSE GPL-3.0-or-later (the project's code); NOTICE.md: scope, non-commercial game assets, the Spine
|
||||||
|
Runtimes linking permission; THIRD-PARTY-NOTICES.md: libraries, fonts, data sources
|
||||||
```
|
```
|
||||||
|
|
||||||
Ownership rule for parallel agents: **only edit files assigned to you**; if you need a change in someone else's file, write it in your final report instead (the integrator applies it). Shared files (`shared/*`, `docs/DESIGN.md`) are owned by the architect.
|
Ownership rule for parallel agents: **only edit files assigned to you**; if you need a change in someone else's file, write it in your final report instead (the integrator applies it). Shared files (`shared/*`, `docs/DESIGN.md`) are owned by the architect.
|
||||||
@@ -951,6 +955,8 @@ Official since the follow-up — read from the client binary (research 11, §20.
|
|||||||
|
|
||||||
Settled by the user ("保持固定血量"): the co-op leader pool does not shrink when players are eliminated — `config bossHpScale.aliveScaling` is **false** (pool = bloodPoint whatever the number of alive players; one community note, 巴哈姆特 12294, said otherwise) (§20.10); flip: `aliveScaling: true` (× alive / 4).
|
Settled by the user ("保持固定血量"): the co-op leader pool does not shrink when players are eliminated — `config bossHpScale.aliveScaling` is **false** (pool = bloodPoint whatever the number of alive players; one community note, 巴哈姆特 12294, said otherwise) (§20.10); flip: `aliveScaling: true` (× alive / 4).
|
||||||
|
|
||||||
|
Settled by the user (2026-10-02, after v2.5.2: "共享阵地按你说的规则就行"): on a shared field (联防, Final Assault / Hidden Core) the bond strip follows the player of the half the ‹ › pill points at; on 全景 or an empty half it shows your own bonds when you fight there, else the teammate picked with 前往查看 or the field's first player — never your own (§20.15); rule: `public/js/ui/watchBonds.js bondOwnerId`.
|
||||||
|
|
||||||
Still [ASSUMED] (each in its section): the class rows covering every MANUAL skill (§20.2); skill-summon redeploys free and never while the owner is away (§20.1); the 1-HP pool floor and the server-order verdict (§20.5); a short promotion tier topping up from below and “神秘顾客” keeping the band bounties (§20.6); the 弹道 column for unclassified pushes and the other displacement details (§20.3); 枯朽战车's skill firing on its blocker at 100 % and content enemy skills keeping a point radius (§20.4); the gauge's refill colour and placement (§20.8); the 机变 card's phone sizes (§20.7); the elite's tile among several deployed copies (the first in deploy order), a transformed carrier's tile and the elite's fresh summon stack (§20.11); "strongest" rather than "latest" for same-named debuffs, which "最大生命值" the 胄 drone link reads (the pool), the 剑 / 锤 dive hits passing on, the springs' split and the solo pool × 0.25 (§20.10); the scene server clamping prep gains like the client, a cancelled hit showing nothing, a passed-on loss being one hit and the order blocks → 限伤 → HP shields (§20.12); 胄's unread `max_hp` 0.5, the untargetable 初始模式 and a replacement copy inheriting only the HP (§20.13); talent debuffs keyed per source unit (two copies of one operator each apply theirs, §20.14).
|
Still [ASSUMED] (each in its section): the class rows covering every MANUAL skill (§20.2); skill-summon redeploys free and never while the owner is away (§20.1); the 1-HP pool floor and the server-order verdict (§20.5); a short promotion tier topping up from below and “神秘顾客” keeping the band bounties (§20.6); the 弹道 column for unclassified pushes and the other displacement details (§20.3); 枯朽战车's skill firing on its blocker at 100 % and content enemy skills keeping a point radius (§20.4); the gauge's refill colour and placement (§20.8); the 机变 card's phone sizes (§20.7); the elite's tile among several deployed copies (the first in deploy order), a transformed carrier's tile and the elite's fresh summon stack (§20.11); "strongest" rather than "latest" for same-named debuffs, which "最大生命值" the 胄 drone link reads (the pool), the 剑 / 锤 dive hits passing on, the springs' split and the solo pool × 0.25 (§20.10); the scene server clamping prep gains like the client, a cancelled hit showing nothing, a passed-on loss being one hit and the order blocks → 限伤 → HP shields (§20.12); 胄's unread `max_hp` 0.5, the untargetable 初始模式 and a replacement copy inheriting only the HP (§20.13); talent debuffs keyed per source unit (two copies of one operator each apply theirs, §20.14).
|
||||||
|
|
||||||
### 20.10 Final Assault leader HP and damage (user report after playtest #6, 2026-10-01) — `server/sim/constants.js DIRECT_BONUS_STACKING`, `content/support directMods`, `sim/Battle.js applyStrongest / loseHp sourceless`, content bonds / bands / items / choices / garrisons / kits tier4, `content/bosses.js PART_TRANSFER / DRONE_LINK_BASE`, `match/gamedata.js bossPoolHp / bossPoolShare`, `match/finalAssault.js`, `data/config.json bossHpScale`
|
### 20.10 Final Assault leader HP and damage (user report after playtest #6, 2026-10-01) — `server/sim/constants.js DIRECT_BONUS_STACKING`, `content/support directMods`, `sim/Battle.js applyStrongest / loseHp sourceless`, content bonds / bands / items / choices / garrisons / kits tier4, `content/bosses.js PART_TRANSFER / DRONE_LINK_BASE`, `match/gamedata.js bossPoolHp / bossPoolShare`, `match/finalAssault.js`, `data/config.json bossHpScale`
|
||||||
@@ -1040,7 +1046,7 @@ In SETTLE it is the field the last battle left on screen. In prep without watchi
|
|||||||
- a teammate's battle watched after the own one;
|
- a teammate's battle watched after the own one;
|
||||||
- the field an eliminated player auto-observes;
|
- the field an eliminated player auto-observes;
|
||||||
- a field picked in the legacy view switcher.
|
- a field picked in the legacy view switcher.
|
||||||
- **A shared field** (联防 `'u'`, boss / hidden `'b1'` / `'b2'`) **[ASSUMED — no source shows the strip there]**:
|
- **A shared field** (联防 `'u'`, boss / hidden `'b1'` / `'b2'`) — **settled by the user** (2026-10-02: "共享阵地按你说的规则就行"; no official source shows the strip there):
|
||||||
1. If the ‹ › pill points at a half that a player holds → that player. The pill's "你自己" means yours; "👁 name" means theirs.
|
1. If the ‹ › pill points at a half that a player holds → that player. The pill's "你自己" means yours; "👁 name" means theirs.
|
||||||
2. Else (全景, an empty half "无人在家", or no pill), if you fight on that field → yours.
|
2. Else (全景, an empty half "无人在家", or no pill), if you fight on that field → yours.
|
||||||
3. Else (you are not on the field: a 联防 leaker, an eliminated spectator) → never your own. The strip shows the teammate you picked with 前往查看 if they are on that field, else the field's first listed player (helper 1 / the pair's first seat).
|
3. Else (you are not on the field: a 联防 leaker, an eliminated spectator) → never your own. The strip shows the teammate you picked with 前往查看 if they are on that field, else the field's first listed player (helper 1 / the pair's first seat).
|
||||||
|
|||||||
Generated
+1
@@ -8,6 +8,7 @@
|
|||||||
"name": "stronghold-protocol-covenant",
|
"name": "stronghold-protocol-covenant",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"htm": "^3.1.1",
|
"htm": "^3.1.1",
|
||||||
"pixi-spine": "^4.0.6",
|
"pixi-spine": "^4.0.6",
|
||||||
|
|||||||
+18
-1
@@ -2,7 +2,24 @@
|
|||||||
"name": "stronghold-protocol-covenant",
|
"name": "stronghold-protocol-covenant",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "明日方舟「卫戍协议:盟约」同人联机网页复刻",
|
"description": "明日方舟「卫戍协议:盟约」非官方同人联机网页复刻(1–4 人合作,Node.js 服务器 + 浏览器客户端)",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"homepage": "https://github.com/sganggs/Stronghold-Protocol#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/sganggs/Stronghold-Protocol.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sganggs/Stronghold-Protocol/issues"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"arknights",
|
||||||
|
"auto-chess",
|
||||||
|
"tower-defense",
|
||||||
|
"co-op",
|
||||||
|
"browser-game",
|
||||||
|
"fan-game"
|
||||||
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
// pure CSS/SVG (radar, ridgelines, glow), so it never issues a request that can 404.
|
// pure CSS/SVG (radar, ridgelines, glow), so it never issues a request that can 404.
|
||||||
|
|
||||||
import { useMemo, useState } from '../../vendor/hooks.module.js';
|
import { useMemo, useState } from '../../vendor/hooks.module.js';
|
||||||
import { NAME_MAX_LEN } from '../../../shared/constants.js';
|
import { NAME_MAX_LEN, APP_VERSION } from '../../../shared/constants.js';
|
||||||
import { html, Button, Icon, MicroLabel, TextField, PingPill } from '../ui/components.js';
|
import { html, Button, Icon, MicroLabel, TextField, PingPill } from '../ui/components.js';
|
||||||
import { GuideButton } from '../ui/guide.js';
|
import { GuideButton } from '../ui/guide.js';
|
||||||
import { toast } from '../ui/toasts.js';
|
import { toast } from '../ui/toasts.js';
|
||||||
@@ -265,7 +265,7 @@ export function TitleScreen() {
|
|||||||
|
|
||||||
<footer class="title-foot">
|
<footer class="title-foot">
|
||||||
<span>非官方同人复刻 · 游戏素材版权归 上海鹰角网络 / Yostar 所有</span>
|
<span>非官方同人复刻 · 游戏素材版权归 上海鹰角网络 / Yostar 所有</span>
|
||||||
<${MicroLabel}>PROTOCOL v1 · WEB SIMULATION<//>
|
<${MicroLabel}>v${APP_VERSION} · WEB SIMULATION<//>
|
||||||
</footer>
|
</footer>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
// * a teammate's board in prep (前往查看, research 09 §3.1 "their board, read-only, including their pen and bonds"), a
|
// * a teammate's board in prep (前往查看, research 09 §3.1 "their board, read-only, including their pen and bonds"), a
|
||||||
// teammate's battle watched after the own one ended, the field an eliminated player auto-observes → THAT player's
|
// teammate's battle watched after the own one ended, the field an eliminated player auto-observes → THAT player's
|
||||||
// bonds (m.public players[].bonds);
|
// bonds (m.public players[].bonds);
|
||||||
// * a shared field (联防 'u', the Final Assault / Hidden Core pair 'b1' / 'b2') [ASSUMED — no source shows the strip
|
// * a shared field (联防 'u', the Final Assault / Hidden Core pair 'b1' / 'b2') — no source shows the strip there; this
|
||||||
// there]: the player holding the half the ‹ › pill points at ("你自己" → yours, "👁 name" → theirs). On 全景 (or an
|
// rule was settled by the user (DESIGN §20.15): the player holding the half the ‹ › pill points at ("你自己" → yours, "👁 name" → theirs). On 全景 (or an
|
||||||
// empty half, "无人在家"): yourself when you fight on that field; a viewer who does not (a 联防 leaker, an eliminated
|
// empty half, "无人在家"): yourself when you fight on that field; a viewer who does not (a 联防 leaker, an eliminated
|
||||||
// spectator) never sees their own bonds there — the teammate they picked with 前往查看 (official observing targets a
|
// spectator) never sees their own bonds there — the teammate they picked with 前往查看 (official observing targets a
|
||||||
// player: ObserveUp / DeadAutoObDn { obIndex }), else the field's first player (helper 1 / the pair's first seat;
|
// player: ObserveUp / DeadAutoObDn { obIndex }), else the field's first player (helper 1 / the pair's first seat;
|
||||||
|
|||||||
+4
-4
@@ -13,7 +13,7 @@
|
|||||||
// compressed once and cached in memory); strong ETag + Last-Modified with 304s; Cache-Control
|
// compressed once and cached in memory); strong ETag + Last-Modified with 304s; Cache-Control
|
||||||
// (html & code/data: no-cache + revalidate; public/assets|fonts|vendor: 1 day; any `?v=` URL: immutable);
|
// (html & code/data: no-cache + revalidate; public/assets|fonts|vendor: 1 day; any `?v=` URL: immutable);
|
||||||
// single byte-range requests (206/416, used by <audio>); traversal & dotfile protection; 404 page.
|
// single byte-range requests (206/416, used by <audio>); traversal & dotfile protection; 404 page.
|
||||||
// * GET /healthz → JSON status (rooms, matches, sessions, sockets).
|
// * GET /healthz → JSON status (protocol `version`, release `app`, rooms, matches, sessions, sockets).
|
||||||
// * WebSocket (ws) at /ws, maxPayload 64 KB → server/net.js Network → server/lobby.js Lobby.
|
// * WebSocket (ws) at /ws, maxPayload 64 KB → server/net.js Network → server/lobby.js Lobby.
|
||||||
// * Env: PORT (default 3000), HOST (default 0.0.0.0), TRUST_PROXY ('auto' default: honour CF-Connecting-IP /
|
// * Env: PORT (default 3000), HOST (default 0.0.0.0), TRUST_PROXY ('auto' default: honour CF-Connecting-IP /
|
||||||
// X-Real-IP / X-Forwarded-For only from loopback/private peers such as a local cloudflared; '1' always; '0' never).
|
// X-Real-IP / X-Forwarded-For only from loopback/private peers such as a local cloudflared; '1' always; '0' never).
|
||||||
@@ -38,7 +38,7 @@ import { WebSocketServer } from 'ws';
|
|||||||
import { Network, SessionRegistry, NET_DEFAULTS } from './net.js';
|
import { Network, SessionRegistry, NET_DEFAULTS } from './net.js';
|
||||||
import { Lobby } from './lobby.js';
|
import { Lobby } from './lobby.js';
|
||||||
import { getData, loadData } from './data.js';
|
import { getData, loadData } from './data.js';
|
||||||
import { PROTOCOL_VERSION } from '../shared/constants.js';
|
import { PROTOCOL_VERSION, APP_VERSION } from '../shared/constants.js';
|
||||||
|
|
||||||
/** Repository root. */
|
/** Repository root. */
|
||||||
export const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
export const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||||
@@ -540,7 +540,7 @@ export async function startServer(opts = {}) {
|
|||||||
}
|
}
|
||||||
if (parts.rawPath === '/healthz') {
|
if (parts.rawPath === '/healthz') {
|
||||||
sendJson(req, res, 200, {
|
sendJson(req, res, 200, {
|
||||||
ok: true, version: PROTOCOL_VERSION, uptimeSec: Math.round((Date.now() - startedAt) / 1000),
|
ok: true, version: PROTOCOL_VERSION, app: APP_VERSION, uptimeSec: Math.round((Date.now() - startedAt) / 1000),
|
||||||
sockets: network.connectionCount, sessions: registry.size, ...lobby.stats(),
|
sockets: network.connectionCount, sessions: registry.size, ...lobby.stats(),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -639,7 +639,7 @@ async function main() {
|
|||||||
else console.error('[boot] failed to start', e);
|
else console.error('[boot] failed to start', e);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
console.log('\n 卫戍协议:盟约 · Stronghold Protocol: Covenant');
|
console.log(`\n 卫戍协议:盟约 · Stronghold Protocol: Covenant v${APP_VERSION}`);
|
||||||
console.log(` Local: ${srv.url}`);
|
console.log(` Local: ${srv.url}`);
|
||||||
if (srv.host === '0.0.0.0' || srv.host === '::') {
|
if (srv.host === '0.0.0.0' || srv.host === '::') {
|
||||||
for (const u of lanUrls(srv.port)) console.log(` LAN: ${u}`);
|
for (const u of lanUrls(srv.port)) console.log(` LAN: ${u}`);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Shared enums & constants (server + browser). Pure ESM, no Node APIs.
|
// Shared enums & constants (server + browser). Pure ESM, no Node APIs.
|
||||||
|
|
||||||
export const PROTOCOL_VERSION = 1;
|
export const PROTOCOL_VERSION = 1;
|
||||||
|
/** Release version shown to players (title screen, server banner, /healthz). Kept equal to package.json "version"
|
||||||
|
* (test/version.test.js); PROTOCOL_VERSION above is the separate wire-format number. */
|
||||||
|
export const APP_VERSION = '0.1.0';
|
||||||
|
|
||||||
export const MAX_SEATS = 4;
|
export const MAX_SEATS = 4;
|
||||||
export const ROOM_CODE_LEN = 4;
|
export const ROOM_CODE_LEN = 4;
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
// Release metadata: one version everywhere (package.json, package-lock.json, shared/constants.js APP_VERSION shown on
|
||||||
|
// the title screen, the server banner and /healthz), the GPL-3.0-or-later licence (LICENSE, package.json, lockfile) and
|
||||||
|
// the notice files the README and the release bundle point at.
|
||||||
|
import { test } from 'node:test';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { readFileSync, existsSync } from 'node:fs';
|
||||||
|
import { join, dirname } from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
import { APP_VERSION, PROTOCOL_VERSION } from '../shared/constants.js';
|
||||||
|
|
||||||
|
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
||||||
|
const read = (p) => readFileSync(join(ROOT, p), 'utf8');
|
||||||
|
const pkg = JSON.parse(read('package.json'));
|
||||||
|
const lock = JSON.parse(read('package-lock.json'));
|
||||||
|
|
||||||
|
test('one release version: package.json, package-lock.json and APP_VERSION', () => {
|
||||||
|
assert.match(APP_VERSION, /^\d+\.\d+\.\d+$/);
|
||||||
|
assert.equal(pkg.version, APP_VERSION);
|
||||||
|
assert.equal(lock.version, APP_VERSION);
|
||||||
|
assert.equal(lock.packages[''].version, APP_VERSION);
|
||||||
|
assert.equal(PROTOCOL_VERSION, 1, 'the wire protocol number is separate from the release version');
|
||||||
|
assert.equal(pkg.private, true, 'never published to npm');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the release version is what players see', () => {
|
||||||
|
assert.match(read('public/js/screens/title.js'), /v\$\{APP_VERSION\}/, 'title screen footer');
|
||||||
|
assert.ok(!/PROTOCOL v1/.test(read('public/js/screens/title.js')), 'no protocol number posing as a version');
|
||||||
|
const server = read('server/index.js');
|
||||||
|
assert.match(server, /Stronghold Protocol: Covenant v\$\{APP_VERSION\}/, 'boot banner');
|
||||||
|
assert.match(server, /app: APP_VERSION/, '/healthz');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('GPL-3.0-or-later: LICENSE, package metadata and notices', () => {
|
||||||
|
const license = read('LICENSE');
|
||||||
|
assert.match(license.slice(0, 200), /GNU GENERAL PUBLIC LICENSE\s+Version 3, 29 June 2007/);
|
||||||
|
assert.match(license, /END OF TERMS AND CONDITIONS/);
|
||||||
|
assert.equal(pkg.license, 'GPL-3.0-or-later');
|
||||||
|
assert.equal(lock.packages[''].license, 'GPL-3.0-or-later');
|
||||||
|
assert.match(pkg.repository.url, /github\.com\/sganggs\/Stronghold-Protocol/);
|
||||||
|
for (const f of ['NOTICE.md', 'THIRD-PARTY-NOTICES.md', 'tools/local-extract/LICENSE-Ark-Unpacker.txt']) {
|
||||||
|
assert.ok(existsSync(join(ROOT, f)), f);
|
||||||
|
}
|
||||||
|
const notice = read('NOTICE.md');
|
||||||
|
assert.match(notice, /GPL-3\.0-or-later/);
|
||||||
|
assert.match(notice, /非商业/);
|
||||||
|
assert.match(notice, /section 7/, 'the Spine Runtimes linking permission');
|
||||||
|
const aklz4 = read('tools/local-extract/aklz4.py');
|
||||||
|
assert.match(aklz4, /SPDX-License-Identifier: BSD-3-Clause/);
|
||||||
|
assert.match(aklz4, /Copyright \(c\) 2022, Harry Huang/);
|
||||||
|
});
|
||||||
+1
-1
@@ -194,7 +194,7 @@ async function main() {
|
|||||||
const port = await probePort(opts.port, opts.host);
|
const port = await probePort(opts.port, opts.host);
|
||||||
if (port.state === 'ours') {
|
if (port.state === 'ours') {
|
||||||
const h = port.health;
|
const h = port.health;
|
||||||
row('ok', `端口 ${opts.port}`, `服务器正在运行:运行 ${h.uptimeSec}s · 房间 ${h.rooms ?? '?'} · 对局 ${h.matches ?? '?'} · 连接 ${h.sockets ?? '?'}`);
|
row('ok', `端口 ${opts.port}`, `服务器正在运行${h.app ? `(v${h.app})` : ''}:运行 ${h.uptimeSec}s · 房间 ${h.rooms ?? '?'} · 对局 ${h.matches ?? '?'} · 连接 ${h.sockets ?? '?'}`);
|
||||||
} else if (port.state === 'free') row('ok', `端口 ${opts.port}`, '空闲(服务器未运行;npm start 启动)');
|
} else if (port.state === 'free') row('ok', `端口 ${opts.port}`, '空闲(服务器未运行;npm start 启动)');
|
||||||
else if (port.state === 'denied') row('err', `端口 ${opts.port}`, '没有权限监听(Linux 上 < 1024 的端口需要 root)→ 换一个 PORT');
|
else if (port.state === 'denied') row('err', `端口 ${opts.port}`, '没有权限监听(Linux 上 < 1024 的端口需要 root)→ 换一个 PORT');
|
||||||
else row('err', `端口 ${opts.port}`, `被其他程序占用(${port.code})→ 关闭它或换端口:${IS_WIN ? '$env:PORT=3001; npm start' : 'PORT=3001 npm start'}`);
|
else row('err', `端口 ${opts.port}`, `被其他程序占用(${port.code})→ 关闭它或换端口:${IS_WIN ? '$env:PORT=3001; npm start' : 'PORT=3001 npm start'}`);
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
tools/local-extract/aklz4.py implements the LZ4AK block decoding of isHarryh/Ark-Unpacker
|
||||||
|
(https://github.com/isHarryh/Ark-Unpacker), as carried by MooncellWiki/UnityPy, and is distributed
|
||||||
|
under the following licence (not under the GPL of the rest of this project):
|
||||||
|
|
||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2022, Harry Huang
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
# LZ4AK decompressor for Arknights bundles (algorithm from isHarryh/Ark-Unpacker, BSD-3, via MooncellWiki/UnityPy)
|
# LZ4AK decompressor for Arknights bundles (algorithm from isHarryh/Ark-Unpacker, BSD-3, via MooncellWiki/UnityPy)
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# Copyright (c) 2022, Harry Huang (isHarryh/Ark-Unpacker). Unlike the rest of this project (GPL-3.0-or-later), this
|
||||||
|
# file is distributed under the BSD 3-Clause License of Ark-Unpacker: tools/local-extract/LICENSE-Ark-Unpacker.txt
|
||||||
|
# (UnityPy, which it plugs into, is MIT; see THIRD-PARTY-NOTICES.md).
|
||||||
import lz4.block
|
import lz4.block
|
||||||
from UnityPy.helpers import CompressionHelper
|
from UnityPy.helpers import CompressionHelper
|
||||||
from UnityPy.enums.BundleFile import CompressionFlags
|
from UnityPy.enums.BundleFile import CompressionFlags
|
||||||
|
|||||||
Reference in new issue
Block a user