├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── router-request.md │ └── shitpost.md ├── .gitignore ├── COPYING ├── README.md ├── bundles ├── bundle.properties ├── bundle_pt_BR.properties └── bundle_uk_UA.properties ├── content ├── blocks │ ├── defense │ │ ├── combat-router.json │ │ └── multirouter.json │ ├── distribution │ │ ├── alien-router.json │ │ ├── clear-router.json │ │ ├── colossus.json │ │ ├── double-router.json │ │ ├── explosive-router.json │ │ ├── incinerouter.json │ │ ├── inverted-router.json │ │ ├── lobotorout.json │ │ ├── op-router.json │ │ ├── plasma-router.json │ │ ├── rainbow-router.json │ │ ├── routergeist.json │ │ ├── titanium-double-router.json │ │ └── xmas-router.json │ ├── logic │ │ ├── holorouter.json │ │ └── vulcan-router.json │ ├── payloads │ │ ├── payload-conduit.json │ │ ├── routoid-assembler.json │ │ └── routoid-liquefactor.json │ ├── power │ │ ├── arc-router.json │ │ ├── electric-router.json │ │ ├── fusion-router.json │ │ ├── magnet-router.json │ │ ├── moderouter.json │ │ ├── phase-router.json │ │ └── solar-router.json │ ├── production │ │ ├── routerfruit.json │ │ ├── sprouter.json │ │ └── ubuntium-router.json │ └── units │ │ └── router-chainer.json ├── items │ ├── beryllium.json │ └── neutron-router.json ├── liquids │ └── liquid-router.json ├── units │ ├── reverout.json │ ├── routerpede.json │ └── sexy-router.json └── zones │ └── lavaflow.json ├── icon.png ├── manuals └── Routorio │ ├── Arc Reoucter │ ├── Electric Router │ └── Speed ├── maps └── lavaflow.msav ├── mod.json ├── preview.png ├── schems.mk ├── scripts ├── combat │ ├── combat.js │ └── multirouter.js ├── items │ ├── beryllium.js │ ├── liquid.js │ └── neutron.js ├── lib │ ├── connected.js │ ├── dirs.js │ ├── network.js │ ├── register.js │ └── routoid.js ├── main.js ├── misc │ ├── icon.js │ └── manual.js ├── payloads │ ├── payload-conduit.js │ ├── routoid-assembler.js │ └── routoid-liquefactor.js ├── routers │ ├── alien.js │ ├── arc.js │ ├── clear.js │ ├── double.js │ ├── electric.js │ ├── explosive.js │ ├── fusion.js │ ├── half.js │ ├── holorouter.js │ ├── inverted.js │ ├── lobotorout.js │ ├── magnet.js │ ├── op.js │ ├── phase.js │ ├── plasma.js │ ├── rainbow.js │ ├── solar.js │ ├── sprouter.js │ ├── ubuntium.js │ ├── vulcan.js │ └── xmas.js └── units │ ├── reverout.js │ ├── router-chainer.js │ ├── routerpede.js │ └── sexy-router.js ├── sprites-override └── distributor.png └── sprites ├── blocks ├── distribution │ ├── alien-router.png │ ├── clear-router-bottom.png │ ├── clear-router-top.png │ ├── clear-router.kra │ ├── clear-router.png │ ├── colossus.png │ ├── distributor.png │ ├── double-router.png │ ├── double-router_0.png │ ├── double-router_1.png │ ├── explosive-router.png │ ├── incinerouter.png │ ├── inverted-router.png │ ├── lobotorout-edge.png │ ├── lobotorout.png │ ├── op-router.png │ ├── op-router_0.png │ ├── op-router_1.png │ ├── op-router_2.png │ ├── op-router_3.png │ ├── plasma-router.png │ ├── rainbow-router.png │ ├── titanium-double-router.png │ ├── titanium-double-router_0.png │ ├── titanium-double-router_1.png │ └── xmas │ │ ├── xmas-router_1.png │ │ ├── xmas-router_2.png │ │ ├── xmas-router_3.png │ │ ├── xmas-router_4.png │ │ ├── xmas-router_5.png │ │ └── xmas-router_6.png ├── logic │ ├── holorouter.png │ └── vulcan-router.png ├── payloads │ ├── payload-conduit-edge.png │ ├── payload-conduit-glass.png │ ├── payload-conduit-icon.png │ ├── payload-conduit-top.png │ ├── payload-conduit.png │ ├── routoid-assembler-out.png │ ├── routoid-assembler-top.png │ └── routoid-assembler.png ├── power │ ├── arc-router.png │ ├── electric-router.png │ ├── fusion-router-corner_0.png │ ├── fusion-router-corner_1.png │ ├── fusion-router-corner_2.png │ ├── fusion-router-corner_3.png │ ├── fusion-router-edge_0.png │ ├── fusion-router-edge_1.png │ ├── fusion-router-icorner_0.png │ ├── fusion-router-icorner_1.png │ ├── fusion-router-icorner_2.png │ ├── fusion-router-icorner_3.png │ ├── fusion-router-top.png │ ├── fusion-router.png │ ├── magnet-router.png │ ├── moderouter.png │ ├── phase-router-base.png │ ├── phase-router-corner_0.png │ ├── phase-router-corner_1.png │ ├── phase-router-corner_2.png │ ├── phase-router-corner_3.png │ ├── phase-router-edge_0.png │ ├── phase-router-edge_1.png │ ├── phase-router-icorner_0.png │ ├── phase-router-icorner_1.png │ ├── phase-router-icorner_2.png │ ├── phase-router-icorner_3.png │ ├── phase-router.png │ └── solar-router.png ├── production │ ├── routerfruit.png │ ├── sprouter-plant.png │ ├── sprouter.png │ └── ubuntium-router.png ├── turrets │ ├── combat-router.png │ └── totally-4-distributors.png └── units │ ├── router-chainer-base.png │ └── router-chainer.png ├── items ├── beryllium.png ├── liquid-router.png └── neutron-router.png ├── ui ├── button-buffer.png ├── button-equals.png ├── button-greater.png ├── button-less.png ├── button-not.png ├── button-rate.png ├── god.png └── white-router.png ├── units ├── reverout.png ├── routerpede-leg.png ├── routerpede.png ├── sexy-router-base.png ├── sexy-router-leg.png ├── sexy-router.png └── weapons │ ├── reverout-weapon-outline.png │ └── reverout-weapon.png └── zones └── lavaflow-zone.png /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report a bug 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Platform**: 11 | Debian sid amd64 12 | 13 | **Mindustry Version**: 14 | stable 105 15 | 16 | **Routorio Version**: *the number please* 17 | "latest" 18 | 19 | **Describe the issue**: 20 | routorio have router 21 | 22 | **Steps to reproduce, including save file if non trivial** 23 | 1. routorio 24 | 2. router! 25 | 26 | **(Crash) logs, if relevant** 27 | no 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/router-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Router request 3 | about: Suggest a new router 4 | title: router 5 | labels: router 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Name**: 11 | Rout from Rout and Sorty 12 | 13 | **Description/Background**: 14 | Crazy scientist router that is also addicted to ketamine router 15 | 16 | **Mechanics**: 17 | Sometimes turn himself into pickle router 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/shitpost.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: shitpost 3 | about: aaa 4 | title: wtk bjrnyhnvrgjg 5 | labels: invalid 6 | assignees: '' 7 | 8 | --- 9 | 10 | # h 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | schems 2 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Routorio 2 | Reality-shatterring router expansion mod for Mindustry. 3 | 4 | Also check out [ReVision](https://github.com/Slava0135/reVision) 5 | 6 | **Deprecated, see [v7 version](https://github.com/deltanedas/routorio).** 7 | 8 | # Schematics 9 | Schematics of every block can be created with `make -f schems.mk`. 10 | On Linux-based operating systems you can then `make -f schems.mk install`. 11 | Requires [pictoschem](https://bitbucket.org/DeltaNedas/pictoschem). 12 | 13 | # License 14 | All of routorio is licensed under the GNU GPLv3, available in [COPYING](/COPYING). 15 | -------------------------------------------------------------------------------- /bundles/bundle.properties: -------------------------------------------------------------------------------- 1 | block.distributor.name = big router 2 | block.distributor.details = it big 3 | block.routorio-op-router.name = mini distribute 4 | block.routorio-op-router.details = means of production 5 | block.routorio-double-router.name = HALF ROUTER 6 | block.routorio-double-router.details = [[ [red]LEAVE DROP POINT IMMEDIATELY[] ]\n[accent]annihilation immininent 7 | block.routorio-inverted-router.name = invert router 8 | block.routorio-inverted-router.description = a conveyor, but a router 9 | block.routorio-clear-router.name = Clear router 10 | block.routorio-clear-router.description = does what it says on the router 11 | block.routorio-titanium-double-router.name = Titanium Double Router (TM) 12 | block.routorio-titanium-double-router.description = Wide router that must be used in a chain. 13 | block.routorio-titanium-double-router.details = Please call 1-800-ROUTER to register your copy of the fully semi-automatic double router, complete with the speed of a titanium conveyor! 14 | block.routorio-explosive-router.name = explode router 15 | block.routorio-explosive-router.description = this router does not like snek... 16 | block.routorio-combat-router.name = combat router 17 | block.routorio-combat-router.details = you cant see him 18 | block.routorio-incinerouter.name = Incinerouter 19 | block.routorio-incinerouter.description = A mini portal to [red]brazil[] that requires no power. [red]Praise the cat.[] 20 | block.routorio-electric-router.name = Electric Router 21 | block.routorio-electric-router.description = Advanced router that can be programmed to react to changes in the power network.\nRead the manual page. 22 | block.routorio-colossus.name = Colossus 23 | block.routorio-colossus.details = Router, router, on the wall. Who's the biggest router of them all? 24 | block.routorio-solar-router.name = Solar Router 25 | block.routorio-solar-router.description = Basic router that doubles as a solar panel when moving items. 26 | block.routorio-solar-router.details = Foundation of motovoltaics. 27 | block.routorio-alien-router.name = Alien Router 28 | block.routorio-alien-router.description = This one seems to be alive. Perhaps you could feed it [pink]items[]? 29 | block.routorio-alien-router.details = Alien Router vs Predouter 30 | block.routorio-phase-router.name = Phase Router 31 | block.routorio-phase-router.description = Evenly distributes items along the connected network of phase routers.\nRequires power and looks cool. 32 | block.routorio-phase-router.details = It's not a router chain if there's just one router shapeshifting. 33 | block.routorio-rainbow-router.name = Rainbow Router 34 | block.routorio-rainbow-router.description = Only connects to adjacent Rainbow Routers if they have the same colour. Safe alternative to explosive router. 35 | block.routorio-lobotorout.name = Lobotorout 36 | block.routorio-lobotorout.description = T-shaped router.\n[red]Capable of routation. 37 | block.routorio-lobotorout.details = Lobotorout had a lobotomy and now can't route to one side. 38 | block.routorio-multirouter.name = Multirouter 39 | block.routorio-multirouter.description = Sends nearby polys to brazil. 40 | block.routorio-multirouter.details = Yes! Yes!! That's right, isn't it?! I knew it. I've always known it. I should've killed every last one of them! I should've turned their sector into a graveyard the likes of which serpulo had never seen! I should've killed them all. 41 | block.routorio-xmas-router.name = Christmas Router 42 | block.routorio-xmas-router.description.early = Give yourself or a friend a surprise router for Christmas. 43 | block.routorio-xmas-router.description.ready = Go on, open it! 44 | 45 | # Farming 46 | 47 | block.routorio-sprouter.name = Sprouter 48 | block.routorio-sprouter.description = Grows all natural routerfruit.\n[stat]Eats items to speed up routersynthesis. 49 | block.routorio-sprouter.details = The first serious plant life known to sharded intelligence. 50 | 51 | block.routorio-routerfruit.name = Routerfruit [green][[HARVEST] 52 | block.routorio-routerfruit.description = yum 53 | 54 | # Logic 55 | 56 | block.routorio-vulcan-router.name = Vulcan router 57 | block.routorio-vulcan-router.description = Programmable router of pure logic that uses a processor to determine output direction.\nHas several built-in variables, accessible with the [stat]Vulcan Router[] instruction. 58 | block.routorio-vulcan-router.details = Live long and router. 59 | 60 | block.routorio-holorouter.name = Holorouter 61 | block.routorio-holorouter.description = Advanced router that can project any texture above itself. Configurable by logic processors. 62 | block.routorio-holorouter.details = Welcome to the 24th routery. 63 | 64 | # Arc Reoucter 65 | 66 | block.routorio-arc-router.name = Arc Router 67 | block.routorio-arc-router.description = Fuel cell of the Arc Reoucter. Uses modified Arc and Solar Router tech to generate current when materials pass through. Occasionally [stat]consumes items and [red]creates lightning[][].\n[stat]See the Arc Reoucter manual page.[] 68 | 69 | block.routorio-ubuntium-router.name = Ubuntium Router 70 | block.routorio-ubuntium-router.description = Uses ancient tribal magic to transform some routed items into Beryllium. 71 | block.routorio-ubuntium-router.details = Powered by AWS. 72 | block.routorio-moderouter.name = Moderouter 73 | block.routorio-moderouter.description = Channels electric arcs into inner conductors to increase efficiency of adjacent Arc Router.\nIncreases [red]Arcing Chance[] and multiplies [stat]Power Output[]. 74 | 75 | stat.arcchance = Arcing Chance 76 | stat.fuelburnup = Fuel Burnup 77 | 78 | bar.arc-chance = Arcing Chance: {0}% 79 | bar.fuel-burnup = Fuel Burnup: {0}% 80 | 81 | warmup = Warmup 82 | 83 | # Payload stuff 84 | 85 | block.routorio-payload-conduit.name = Payload Conduit 86 | block.routorio-payload-conduit.description = Pressurized version of the payload conveyor. Significantly faster due to lack of air. Great for transporting routoids. 87 | 88 | block.routorio-routoid-assembler.name = Routoid Assembler 89 | block.routorio-routoid-assembler.description = Constructs special routers for use in manufacturing.\nTransported with Payload Conveyors 90 | block.routorio-routoid-liquefactor.name = Routoid Liquefactor 91 | block.routorio-routoid-liquefactor.description = Melts routoids into easily transportable Liquid Router. 92 | block.routorio-routoid-liquefactor.details = [crimson]Requires souls of children to operoute.[] 93 | 94 | # Fusion Reoucter 95 | 96 | block.routorio-fusion-router.name = Fusion Router 97 | block.routorio-fusion-router.description = Fuses Liquid Router into incredibly dense Neutron Routers, generating a large amount of power.\nRequires a great kickstart of power and lightning. 98 | block.routorio-fusion-router.details = Dr. Routheim's life was devoted to the development of the Fusion Router. 99 | # TODO 100 | block.routorio-plasma-router.name = Plasma Router 101 | block.routorio-plasma-router.description = Incredibly dangerous router that destroys everything in its path.\nEventually destroyed by enough matter. 102 | 103 | block.routorio-magnet-router.name = Magnet Router 104 | block.routorio-magnet-router.description = Extremely strong electromagnet router used to contain highly dangerous plasma. 105 | 106 | liquid.routorio-liquid-router.name = Liquid Router 107 | liquid.routorio-liquid-router.description = Volatile, molten form of the router. Atoms are in a state of flux which allows for extrastellar [red]router fusion[]. 108 | liquid.routorio-liquid-router.details = The screams, the screams. The souls of the router children cannot stop screaming. 109 | 110 | # Units 111 | 112 | unit.routorio-reverout.name = Reverout 113 | unit.routorio-reverout.description = Deadly attack drone, router counterpart of the Zenith. 114 | unit.routorio-reverout.details = Routates 4 routors at almost Mach-3 to generate enough lift to stay airborne. 115 | 116 | unit.routorio-sexy-router.name = [#ff00ff]Sexy Router[] 117 | unit.routorio-sexy-router.description = Motherly router that starts the router unit tree. 118 | unit.routorio-sexy-router.details = h... 119 | 120 | unit.routorio-routerpede.name = Routerpede 121 | unit.routorio-routerpede.description = The forbidden product of a crawler, dagger and dead router. Strength in numbers, they pool health when chained. 122 | unit.routorio-routerpede.details = A chimera dagger-router.\n[stat]When a mummy router and a daddy router [pink]love eachother very much[], they can merge to form a chain.[] 123 | 124 | block.routorio-router-chainer.name = Router Chainer 125 | block.routorio-router-chainer.description = Cursed arcane machinery, produces router units. 126 | 127 | # Items 128 | 129 | item.routorio-beryllium.name = Beryllium 130 | item.routorio-beryllium.description = Simple material that can moderate neutrons in a fission reactor, but also channel arcs into conductors to increase the efficiency of an Arc Reouctor. 131 | 132 | item.routorio-neutron-router.name = Neutron Router 133 | item.routorio-neutron-router.description = Impossibly dense router created as a byproduct of fusion. 134 | -------------------------------------------------------------------------------- /bundles/bundle_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # get in, routorio is going to brazil. 2 | block.distributor.name = Roteador grande 3 | block.distributor.description = É grande 4 | block.routorio-op-router.name = Mini distribuidor 5 | block.routorio-op-router.description = Meio de produção 6 | # todo translate to half router 7 | block.routorio-double-router.name = ROTEADOR DUPLO 8 | block.routorio-double-router.description = [[ [red]SAIA DA ZONA DE IMPACTO IMEDIATAMENTE[] ]\n[accent]aniquilação iminente 9 | block.routorio-inverted-router.name = Roteador invertido 10 | block.routorio-inverted-router.description = Uma esteira, mas um roteador 11 | block.routorio-clear-router.name = Roteador transparente 12 | block.routorio-clear-router.description = Faz o que um roteador faz 13 | block.routorio-titanium-double-router.name = Roteador duplo de titânio (TM) 14 | block.routorio-titanium-double-router.description = Por favor ligue 1-800-ROUTER para registrar sua copia do semi-automatico roteador duplo de titânio, completo com a velocidade de uma esteira de titânio! 15 | block.routorio-explosive-router.name = Roteador explosivo 16 | block.routorio-explosive-router.description = Esse roteador não gosta da cobra... 17 | block.routorio-combat-router.name = Roteador de combate 18 | block.routorio-combat-router.description = Você não pode vê-lo 19 | -------------------------------------------------------------------------------- /bundles/bundle_uk_UA.properties: -------------------------------------------------------------------------------- 1 | block.distributor.name = великий маршрутизатор 2 | block.distributor.description = великий 3 | block.routorio-op-router.name = мінірозподілювач 4 | block.routorio-op-router.description = засоби виробництва 5 | block.routorio-double-router.name = ПОДВІЙНИЙ маршрутизатор 6 | block.routorio-double-router.description = [[ [red]ЗАЛИШТЕ ЗОНУ ВИСАДКИ НЕГАЙНО[] ]\n[accent]анігіляція неминуча 7 | block.routorio-inverted-router.name = Інвертований маршрутизатор 8 | block.routorio-inverted-router.description = я конвеєр, але я й маршрутизатор 9 | block.routorio-clear-router.name = Очисний маршрутизатор 10 | block.routorio-clear-router.description = хіба не це повинний робити СПРАВЖНІЙ маршрутизатор 11 | block.routorio-titanium-double-router.name = Подвійний титановий маршрутизатор (TM) 12 | block.routorio-titanium-double-router.description = Будь ласка, зателефонуйте за номером +380-МАРШРУТИЗАТОР, щоб зареєструвати вашу копію повністю напівавтоматичного подвійного маршртизатора. Також ви дадатково отримаєте ШВИДКІСТЬ [blue]ТИТАНОВОГО[] КОНВЕЄРА! 13 | block.routorio-explosive-router.name = Вибуховий маршрутизатор 14 | block.routorio-explosive-router.description = цей маршрутизатор не любить інших маршрутизаторів, що стоять поряд... 15 | block.routorio-combat-router.name = Бойовий маршрутизатор 16 | block.routorio-combat-router.description = ти не можеш його бачити 17 | block.routorio-incinerouter.name = Спалювальний маршрутизатор 18 | block.routorio-incinerouter.description = Мініпортал до пекла, що не потребує енергії. [red]Слава Анюку![] 19 | block.routorio-electric-router.name = Електричний маршрутизатор 20 | block.routorio-electric-router.description = Поліпшений маршрутизатор, який можна запрограмувати на дії в електричній мережі.\nЧитайте посібник. 21 | block.routorio-colossus.name = Колос 22 | block.routorio-colossus.description = Маршрутизаторе, скажи мені, хто найгарніший роутер на Землі? 23 | block.routorio-solar-router.name = Сонячний маршрутизатор 24 | block.routorio-solar-router.description = Основний маршрутизатор, який одночасно є сонячною панеллю при переміщенні предметів.\nОснова фотовольтаїки. 25 | block.routorio-alien-router.name = Чужоземний маршрутизатор 26 | block.routorio-alien-router.description = Цей, здається, живий. Можливо, ви могли б нагодувати його [pink]предметами[]? 27 | block.routorio-phase-router.name = Фазовий маршрутизатор 28 | block.routorio-phase-router.description = Це не маршрутизаторний ланцюг, якщо тільки один маршрутизатор у формі.\nПотребує енергії, та й виглядає круто. 29 | block.routorio-rainbow-router.name = Райдужний маршрутизатор 30 | block.routorio-rainbow-router.description = Підключається до сусідніх райдужних маршрутизаторів лише якщо вони мають однаковий колір. Безпечна альтернатива вибухонебезпечному маршрутизатору. 31 | block.routorio-lobotorout.name = Лоботозатор 32 | block.routorio-lobotorout.description = -подібний маршрутизатор, мав лоботомію і тепер не може прокласти шлях в один бік.\n [red] Здатний до маршрутизації. 33 | block.routorio-multirouter.name = Мультимаршрутизатор 34 | block.routorio-multirouter.description = Так! Так!! Правильно, чи не так?! Трясця твоїй матері! Я це знав. Я це завжди знав. Мені слід було вбити кожного останнього з них! Я повинен був перетворити їхній сектор на кладовище, якого Серпуло ніколи не бачив! Я повинен був їх усіх вбити. 35 | 36 | # Farming 37 | 38 | block.routorio-sprouter.name = Проросток 39 | block.routorio-sprouter.description =Перше серйозне рослинне життя, відоме помаранчовому інтелекту. Вирощує всі натуральні фрукти.\n[stat]Їсть продукти, щоб пришвидшити синтез маршрутизаторів. 40 | 41 | block.routorio-routerfruit.name = Садовина маршрутизаторна 42 | block.routorio-routerfruit.description = ням 43 | 44 | # Logic 45 | 46 | block.routorio-vulcan-router.name = Вулканічний маршрутизатор 47 | block.routorio-vulcan-router.description = Виключно логічний. Програмований маршрутизатор, який використовує процесор для визначення напрямку виводу.\nМає кілька вбудованих змінних, доступних у посібника під назвою[stat]Vulcan Router[].\nЖивіть довго і маршрутизайте! 48 | 49 | block.routorio-holorouter.name = Голографічний маршрутизатор 50 | block.routorio-holorouter.description = Поліпшений марщрутизатор, що може проєктувати будь-яку текстуру поверх себе. Налаштовується логічними процесорами.\nЛаскаво просимо до 24 маршрутизаторного Всесвіту! 51 | 52 | # Arc Reoucter 53 | 54 | block.routorio-arc-router.name = Дуговий маршрутизатор 55 | block.routorio-arc-router.description = Паливний елемент Дугового маршрутизаторного реактора. Використовує модифіковані технології Дуги та Сонячного маршрутизатора для формування струму при проходженні матеріалів. Іноді [stat]споживає предмети і [red] створює блискавку[][].\n[stat] Див. сторінку посібника з назвою Arc Reoucter.[] 56 | 57 | block.routorio-ubuntium-router.name = Убунтувий маршрутизатор 58 | block.routorio-ubuntium-router.description = Використовує стародавню племінну магію, щоб перетворити деякі руйновані предмети в берилій.\nПід керуванням Amazon Web Service. 59 | block.routorio-moderouter.name = Модерутизатор 60 | block.routorio-moderouter.description = Направляє електричні дуги на внутрішні провідники, щоб збільшити ефективність сусіднього дугового маршрутизатора.\nЗбільшує [red]шанс появи дуги[] і збільшує [stat]вихідну потужність[]. 61 | 62 | item.routorio-beryllium.name = Берилій 63 | item.routorio-beryllium.description = Простий матеріал, який може керувати нейтронами в реакторі розщіплення. Також направляє дуги в провідники для підвищення ефективності Дугового маршрутизаторного реактора. 64 | 65 | stat.arcchance = Шанс появи дуги 66 | stat.fuelburnup = Випалення палива 67 | 68 | bar.arc-chance = Шанс появи дуги: @ 69 | bar.fuel-burnup = Випалення палива: @ 70 | 71 | warmup =Розминка 72 | 73 | # Payload stuff 74 | 75 | block.routorio-payload-conduit.name = Розвантажувальне перехрестя 76 | block.routorio-payload-conduit.description = Герметичний варіант конвеєра корисного навантаження. Значно швидше через брак повітря. Чудово підходить для транспортування рутоїдів. 77 | 78 | block.routorio-routoid-assembler.name = Маршрутизаторний монтажник 79 | block.routorio-routoid-assembler.description = Конструює спеціальні маршрутизатори для використання у виробництві.\nТранспортується за допомогою конвеєрів вантажних конвеєрів 80 | block.routorio-routoid-liquefactor.name = Маршрутизаторний розріджувач 81 | block.routorio-routoid-liquefactor.description = Розплавляє маршрутизаторний монтажник у легкотранспортований рідинний маршрутизатор. [red]Потрібні душі дітей для дітей.[] 82 | 83 | # Fusion Reoucter 84 | 85 | block.routorio-fusion-router.name = Плавовий маршрутизатор 86 | block.routorio-fusion-router.description = Життя доктора Роутгейма було присвячене розробці Маршрутизаторного реактора злиття. Зливає рідинний маршрутизатор у неймовірно щільні нейтронні маршрутизатори задля генерування великої кількості енергії.\nПотребує великої кількості енергії на початку та блискавок. [red]Не блискіток! 87 | block.routorio-plasma-router.name = Плазматичний маршрутизатор 88 | block.routorio-plasma-router.description = Неймовірно небезпечний маршрутизатор, який руйнує все на своєму шляху.\nВрешті-решт знищений достатньою кількістю речовини. 89 | block.routorio-fusion-port.name = Порту для злиття 90 | block.routorio-fusion-port.description = Діє як вхідний отвір для рідинного маршрутизатора або вихідний для нейтронних маршрутизаторів. 91 | liquid.routorio-liquid-router.name = Рідинний маршрутизатор 92 | liquid.routorio-liquid-router.description = Крики, зойки. Душі проклятих не можуть перестати кричати. 93 | 94 | # Units 95 | 96 | unit.routorio-reverout.name = Обертовий маршрутизатор 97 | unit.routorio-reverout.description = Беспілотник-камікадзе, аналог Зеніта. 98 | block.routorio-reverout-factory.name = Завод «МаршрутиЗеніт» 99 | block.routorio-reverout-factory.description = Ви були так зосереджені на тому, як могли, ніколи не зупинялися, щоб подумати, чи потрібно. 100 | 101 | unit.routorio-sexy-router.name = [#ff00ff]Сексуальний маршрутизатор[] 102 | unit.routorio-sexy-router.description = А ти теж сексі 103 | 104 | unit.routorio-routerpede.name = Маршрутизаторопод 105 | unit.routorio-routerpede.description = Заборонений виріб з плазуна, кинджала і мертвого маршрутизатор.\n[red]Сила в цифрах[] Об’єднання здоров’я в ланцюгу. 106 | block.routorio-router-chainer.name = Ланцюговий маршрутизатор 107 | block.routorio-router-chainer.description = Прокляте секретне устаткування виробляє химерний кинджальний маршрутизатор.\n[stat]Коли мамця-маршрутизатор і татко-маршрутизатор [pink]кохаються один з одним[], то вони можуть утворити ланцюг.[] 108 | 109 | # Zones 110 | zone.routorio-lavaflow.name = Потоки лави 111 | zone.routorio-lavaflow.description = У науковій експедиції, біля вулкана, вашу заставу атакували доволі сильні вороги, які мають просунуті маршрутизатори. Вивчіть їхню технологію та реплікуйте її.\nУтримуйте натиск, поки дослідження не буде передано до штабу. 112 | -------------------------------------------------------------------------------- /content/blocks/defense/combat-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "health": 640, 3 | "size": 4, 4 | "reload": 45, 5 | "range": 200, 6 | "rotateSpeed": 10, 7 | "maxAmmo": 10, 8 | "shoot": { 9 | "type": "ShootSpread", 10 | "shots": 6, 11 | "spread": 5 12 | }, 13 | "inaccuracy": 5, 14 | "xRand": 6, 15 | "ammoTypes": { 16 | "copper": { 17 | "type": "BasicBulletType", 18 | "speed": 10, 19 | "damage": 10, 20 | "width": 8, 21 | "height": 8, 22 | "hitEffect": "blastExplosion", 23 | "shootEffect": "shootSmall", 24 | "smokeEffect": "coreLandDust", 25 | "ammoMultiplier": 1, 26 | "knockback": 0.15, 27 | "hitShake": 0.25, 28 | "drag": -0.01, 29 | "sprite": "router", 30 | "frontColor": "#ffffff" 31 | } 32 | }, 33 | "requirements": [ 34 | "copper/30", 35 | "lead/30", 36 | "silicon/125" 37 | ], 38 | "category": "turret", 39 | "research": "salvo" 40 | } 41 | -------------------------------------------------------------------------------- /content/blocks/defense/multirouter.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "turret", 3 | "research": "poly", 4 | "requirements": [ 5 | "copper/10", 6 | "lead/20", 7 | "sand/500", 8 | "metaglass/10" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /content/blocks/distribution/alien-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "health": 230, 3 | "research": "ubuntium-router", 4 | "category": "distribution", 5 | "requirements": [ 6 | "thorium/12", 7 | "copper/6", 8 | "metaglass/3" 9 | ], 10 | 11 | "itemCapacity": 3 12 | } 13 | -------------------------------------------------------------------------------- /content/blocks/distribution/clear-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "health": 25, 3 | "requirements": ["copper/3", "metaglass/1"], 4 | "research": "op-router", 5 | "category": "distribution" 6 | } 7 | -------------------------------------------------------------------------------- /content/blocks/distribution/colossus.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Router", 3 | "size": 4, 4 | "health": 10000, 5 | "research": "double-router", 6 | "category": "distribution", 7 | "requirements": [ 8 | "copper/80", 9 | "lead/50", 10 | "thorium/100" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /content/blocks/distribution/double-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "distribution", 3 | "research": "clear-router" 4 | "requirements": ["copper/3"], 5 | } 6 | -------------------------------------------------------------------------------- /content/blocks/distribution/explosive-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "requirements": ["copper/6", "graphite/3"], 3 | "category": "distribution", 4 | "research": "shock-mine", 5 | "health": 60 6 | } 7 | -------------------------------------------------------------------------------- /content/blocks/distribution/incinerouter.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ItemVoid", 3 | "requirements": [ 4 | "lead/20", 5 | "graphite/5", 6 | "silicon/5" 7 | ], 8 | "health": 90, 9 | "category": "distribution", 10 | "research": "incinerator" 11 | } 12 | -------------------------------------------------------------------------------- /content/blocks/distribution/inverted-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCostMultiplier": 2, 3 | "health": 45, 4 | "speed": 0.08, 5 | "displayedSpeed": 10, 6 | "requirements": ["copper/3"], 7 | "category": "distribution", 8 | "research": "clear-router" 9 | } 10 | -------------------------------------------------------------------------------- /content/blocks/distribution/lobotorout.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "distribution", 3 | "research": "double-router", 4 | "requirements": [ 5 | "copper/5", 6 | "lead/3" 7 | ], 8 | 9 | "rotate": true 10 | } 11 | -------------------------------------------------------------------------------- /content/blocks/distribution/op-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "requirements": ["copper/10"], 3 | "category": "distribution", 4 | "research": "router" 5 | } 6 | -------------------------------------------------------------------------------- /content/blocks/distribution/plasma-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "distribution", 3 | "alwaysReplace": false, 4 | "solid": true, 5 | "update": true, 6 | "breakable": false, 7 | "rebuildable": false, 8 | "destructible": false, 9 | "replaceable": false 10 | } 11 | -------------------------------------------------------------------------------- /content/blocks/distribution/rainbow-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "research": "electric-router", 3 | "category": "distribution", 4 | "requirements": [ 5 | "copper/10", 6 | "graphite/8", 7 | "silicon/6" 8 | ], 9 | 10 | "configurable": true, 11 | "saveConfig": true 12 | } 13 | -------------------------------------------------------------------------------- /content/blocks/distribution/routergeist.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Router", 3 | "category": "distribution", 4 | "buildVisibility": "hidden", 5 | "speed": 0 6 | } 7 | -------------------------------------------------------------------------------- /content/blocks/distribution/titanium-double-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "requirements": ["copper/3", "lead/3", "titanium/3"], 3 | "category": "distribution", 4 | "research": "double-router" 5 | } 6 | -------------------------------------------------------------------------------- /content/blocks/distribution/xmas-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "distribution", 3 | "research": "router", 4 | "requirements": [ 5 | "graphite/10", 6 | "copper/5" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /content/blocks/logic/holorouter.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "logic", 3 | "research": "clear-router", 4 | "requirements": [ 5 | "titanium/15", 6 | "metaglass/10", 7 | "silicon/10" 8 | ], 9 | 10 | "enableDrawStatus": false, 11 | "configurable": true, 12 | "hasPower": true, 13 | "consumes": { 14 | "power": 0.25 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /content/blocks/logic/vulcan-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "logic", 3 | "research": "rainbow-router", 4 | "requirements": [ 5 | "copper/30", 6 | "silicon/20", 7 | "graphite/15", 8 | "titanium/10", 9 | ], 10 | 11 | "hasPower": true, 12 | "consumes": { 13 | "power": 0.3 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /content/blocks/payloads/payload-conduit.json: -------------------------------------------------------------------------------- 1 | { 2 | "health": 300, 3 | "category": "units" 4 | "research": "payload-conveyor", 5 | "requirements": [ 6 | "titanium/25", 7 | "plastanium/15", 8 | "metaglass/10" 9 | ], 10 | 11 | "canOverdrive": false, 12 | "moveTime": 15, 13 | "moveForce": 800 14 | } 15 | -------------------------------------------------------------------------------- /content/blocks/payloads/routoid-assembler.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "production", 3 | "research": "payload-conveyor", 4 | "requirements": [ 5 | "copper/200", 6 | "titanium/130", 7 | "plastanium/130", 8 | "silicon/80" 9 | ], 10 | 11 | "size": 3, 12 | "health": 300, 13 | 14 | "update": true, 15 | "solid": true, 16 | "hasPower": true, 17 | "hasItems": true, 18 | "rotate": true, 19 | "outputsPayload": true, 20 | "consumes": { 21 | "power": 3, 22 | "items": { 23 | "items": ["copper/6", "graphite/3"] 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /content/blocks/payloads/routoid-liquefactor.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "production", 3 | "research": "liquid-router", 4 | "requirements": [ 5 | "titanium/250", 6 | "silicon/200", 7 | "graphite/180", 8 | "surge-alloy/120" 9 | ], 10 | 11 | "size": 3, 12 | "health": 1200, 13 | "liquidCapacity": 10, 14 | 15 | "hasPower": true, 16 | "hasLiquids": true, 17 | "outputsLiquid": true, 18 | "consumes": { 19 | "power": 10 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /content/blocks/power/arc-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "power", 3 | "research": "arc", 4 | "requirements": [ 5 | "copper/20", 6 | "lead/30", 7 | "titanium/15" 8 | "silicon/15" 9 | ], 10 | "health": 430, 11 | "sync": true, 12 | "hasPower": true, 13 | "outputsPower": true, 14 | "consumesPower": false, 15 | "baseExplosiveness": 5, 16 | "itemCapacity": 3 17 | } 18 | -------------------------------------------------------------------------------- /content/blocks/power/electric-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "power", 3 | "research": "solar-router" 4 | "requirements": [ 5 | "copper/10", 6 | "lead/15", 7 | "silicon/10" 8 | ], 9 | 10 | "hasPower": true, 11 | "consumesPower": true, 12 | "outputsPower": true, 13 | "configurable": true 14 | } 15 | -------------------------------------------------------------------------------- /content/blocks/power/fusion-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "health": 400, 3 | "category": "power", 4 | "research": "arc-router", 5 | "requirements": [ 6 | "surge-alloy/300", 7 | "titanium/300", 8 | "metaglass/200", 9 | "beryllium/145", 10 | "phase-fabric/80" 11 | ], 12 | 13 | "hasShadow": false, 14 | "unloadable": false, 15 | "noUpdateDisabled": true, 16 | "hasItems": true, 17 | "itemCapacity": 1 18 | "liquidCapacity": 15, 19 | "hasPower": true, 20 | "outputsPower": true, 21 | "consumes": { 22 | "power": 6, 23 | "liquid": { 24 | "liquid": "liquid-router", 25 | "amount": 0.0166666667 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /content/blocks/power/magnet-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "power", 3 | "health": 600, 4 | "requirements": [ 5 | "silicon/4", 6 | "surge-alloy/3" 7 | ], 8 | "research": "electric-router", 9 | 10 | "consumes": { 11 | "power": 0.25 12 | }, 13 | "buildCostMultiplier": 4, 14 | "hasPower": true, 15 | "outputsPower": true 16 | } 17 | -------------------------------------------------------------------------------- /content/blocks/power/moderouter.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "power", 3 | "health": 180, 4 | "requirements": [ 5 | "titanium/20", 6 | "copper/32", 7 | "beryllium/10" 8 | ], 9 | "research": "arc-router" 10 | } 11 | -------------------------------------------------------------------------------- /content/blocks/power/phase-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "distribution", 3 | "health": 600, 4 | "research": "surge-router", 5 | "requirements": [ 6 | "copper/6", 7 | "silicon/4", 8 | "phase-fabric/8" 9 | ], 10 | 11 | "enableDrawStatus": false, 12 | "itemCapacity": 0, 13 | "instantTransfer": true, 14 | "hasPower": true, 15 | "outputsPower": true, 16 | "consumes": { 17 | "power": 0.5 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /content/blocks/power/solar-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "power", 3 | "research": "ubuntium-router", 4 | "requirements": [ 5 | "copper/10", 6 | "lead/3", 7 | "silicon/12" 8 | ], 9 | 10 | "hasPower": true, 11 | "outputsPower": true, 12 | "consumesPower": false 13 | } 14 | -------------------------------------------------------------------------------- /content/blocks/production/routerfruit.json: -------------------------------------------------------------------------------- 1 | { 2 | "requirements": [ 3 | "graphite/20", 4 | "copper/20", 5 | "titanium/10" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /content/blocks/production/sprouter.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "production", 3 | "research": "clear-router", 4 | "requirements": [ 5 | "copper/10", 6 | "lead/8" 7 | ], 8 | 9 | "health": 10, 10 | "hasShadow": false 11 | } 12 | -------------------------------------------------------------------------------- /content/blocks/production/ubuntium-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "health": 150, 3 | "requirements": [ 4 | "graphite/20", 5 | "titanium/12", 6 | "copper/30" 7 | ], 8 | "category": "crafting", 9 | "research": "inverted-router" 10 | } 11 | -------------------------------------------------------------------------------- /content/blocks/units/router-chainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "size": 4, 3 | "consumes": { 4 | "power": 2 5 | }, 6 | "requirements": [ 7 | "graphite/50", 8 | "silicon/50", 9 | "lead/30" 10 | ], 11 | "category": "units", 12 | "research": "ground-factory" 13 | } 14 | -------------------------------------------------------------------------------- /content/items/beryllium.json: -------------------------------------------------------------------------------- 1 | { 2 | "research": { 3 | "parent": "titanium", 4 | "requirements": [ 5 | "copper/10000", 6 | "graphite/7000", 7 | "titanium/4500", 8 | "silicon/3000" 9 | ] 10 | }, 11 | "color": "#c3d6c7" 12 | } 13 | -------------------------------------------------------------------------------- /content/items/neutron-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#d1e5ed", 3 | "explosiveness": 1000 4 | } 5 | -------------------------------------------------------------------------------- /content/liquids/liquid-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": "#6e7080", 3 | "heatCapacity": 0.1, 4 | "temperature": 1.1, 5 | "viscosity": 1, 6 | "research": { 7 | "parent": "routoid-assembler", 8 | "requirements": [ 9 | "copper/11000", 10 | "silicon/5000", 11 | "beryllium/8001" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /content/units/reverout.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "flying", 3 | "research": { 4 | "parent": "routerpede", 5 | "requirements": [ 6 | "titanium/7000", 7 | "silicon/5000", 8 | "graphite/3000" 9 | ] 10 | }, 11 | 12 | "speed": 1.9, 13 | "flying": true, 14 | "health": 1000, 15 | "engineSize": 4, 16 | "engineOffset": 12, 17 | "rotateSpeed": 1, 18 | "baseRotateSpeed": 0.3, 19 | "range": 300, 20 | "weapons": [{ 21 | "name": "reverout-weapon", 22 | "x": 4, 23 | "reload": 20, 24 | "shoot": { 25 | "type": "ShootSpread", 26 | "shots": 3, 27 | "spread": 4 28 | }, 29 | "bullet": { 30 | "type": "BasicBulletType", 31 | "speed": 10, 32 | "damage": 10, 33 | "width": 6, 34 | "height": 6, 35 | "hitEffect": "blastExplosion", 36 | "shootEffect": "shootSmall", 37 | "smokeEffect": "coreLandDust", 38 | "ammoMultiplier": 1, 39 | "homingPower": 3, 40 | "homingRange": 60, 41 | "knockback": 0.15, 42 | "hitShake": 0.25, 43 | "drag": -0.01, 44 | "sprite": "router", 45 | "frontColor": "#ffffff" 46 | } 47 | }] 48 | } 49 | -------------------------------------------------------------------------------- /content/units/routerpede.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "mech", 3 | "research": { 4 | "parent": "sexy-router", 5 | "requirements": [ 6 | "silicon/6000", 7 | "graphite/4000", 8 | "copper/2000" 9 | ] 10 | }, 11 | 12 | "speed": 0.7, 13 | "health": 150 14 | } 15 | -------------------------------------------------------------------------------- /content/units/sexy-router.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "mech", 3 | "research": { 4 | "parent": "router-chainer", 5 | "requirements": [ 6 | "silicon/4000", 7 | "copper/2400" 8 | ] 9 | }, 10 | 11 | "health": 1, 12 | "drawCell": false, 13 | "itemCapacity": 400, 14 | "speed": 0.1 15 | } 16 | -------------------------------------------------------------------------------- /content/zones/lavaflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "loadout": "basicFoundation", 3 | "startingItems": [ 4 | "copper/250", 5 | "lead/150" 6 | ], 7 | "conditionWave": 15, 8 | "launchPeriod": 10, 9 | "resources": [ 10 | "copper", 11 | "lead", 12 | "coal", 13 | "sand", 14 | "titanium", 15 | "thorium" 16 | ], 17 | "requirements": [ 18 | { 19 | "type": "ZoneWave", 20 | "zone": "stainedMountains", 21 | "wave": 25 22 | }, 23 | { 24 | "type": "Unlock", 25 | "block": "clear-router" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/icon.png -------------------------------------------------------------------------------- /manuals/Routorio/Arc Reoucter: -------------------------------------------------------------------------------- 1 | # Power generation 2 | Arc routers generate power only when items move, so a clogged arc router is dead. 3 | This means that they may take some time to fully shut down. 4 | [stat]Hint: you can control item flow with conveyors and electric routers.[] 5 | 6 | # Fuel 7 | [sky]Arc Routers[] will only accept core-storable materials as fuel. 8 | Item conductivity determines [red]lightning arc[] length and count. 9 | Arcs do a lot of damage so make sure to have lots of menders on-site. 10 | 11 | # Bars 12 | [sky]Arc Routers[] display the current [red]Arcing[] and [coral]Fuel burnup[] chances. 13 | 14 | # Affinity guide 15 | [red][[red][] = Arcing chance 16 | [coral][[coral][] = Fuel burnup 17 | [yellow][[yellow][] = Power generation 18 | 19 | [stat]xN = Multiplied by N 20 | +/-N% = Modified by N%[] 21 | 22 | Multiplication is done first. 23 | 24 | # Block affinities 25 | The [sky]Arc Router[]'s stats change when adjacent to these blocks: 26 | Moderouter: [red]+5%[], [yellow]x1.4 + 25%[] 27 | [sky]Arc Router[]: [red]+1%[], [yellow]+50%[], [coral]x1.2[] 28 | 29 | Plastanium: [red]-2%[] 30 | Phase Fabric: [coral]x0.5[] 31 | 32 | Copper: [coral]x1.2[], [yellow]+40%[] 33 | Titanium: [red]+8%[], [coral]x1.1[], [yellow]+60%[] 34 | Surge Alloy: [red]x1.6[], [yellow]+200%[] 35 | 36 | # Item affinities 37 | These items modify arc length (2.5 tiles max each) and amount (by the square root) 38 | Metals have increased maximum power. 39 | 40 | [stat]These should only be used to kickstart fusion routers.[] 41 | Neutron Router: 100x :) 42 | Sand: 10x 43 | Coal: 8x 44 | 45 | [stat]Metals will do, conductors have increased power.[] 46 | Lead: 2x, 1.5x 47 | Copper: 2x, 2x 48 | Scrap: 3x, 1.25x 49 | Beryllium: 2x 50 | Titanium: 3x, 4x 51 | Silicon: 3x, 5x 52 | Surge Alloy: 4x, 8x 53 | 54 | [green]Plastanium: 0.5x (uses RNG to cancel arcs)[] 55 | 56 | Everything else is 1x, and should be used if plastanium is not available. 57 | -------------------------------------------------------------------------------- /manuals/Routorio/Electric Router: -------------------------------------------------------------------------------- 1 | # Configuration 2 | There are 3 parts to an electric router: mode, operation and number. 3 | Mode is simple, it's either power stored in the router (battery) or power rate. (power node) 4 | Operaration is what it sounds like, which mathematical operator to use. 5 | The number at the end is the comparison number. 6 | 7 | The result is a simple expression like "active if storage greater than 4k" 8 | -------------------------------------------------------------------------------- /manuals/Routorio/Speed: -------------------------------------------------------------------------------- 1 | # Speed 2 | Almost all routers in routorio have the same speed. 3 | The notable exception being titanium double router which has double the normal speed. 4 | -------------------------------------------------------------------------------- /maps/lavaflow.msav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/maps/lavaflow.msav -------------------------------------------------------------------------------- /mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "routorio", 3 | "displayName": "[gray]rout[#b8341f]orio", 4 | "author": "deltanedas", 5 | "description": "Reality-shattering [gray]router[] expansion mod.\n[stat]Optionally requires [#00aaff]deltanedas/rtfm[] for manual pages.[]\n10/10 IGN\n - Router\n[coral]Ukranian translation by Prostaчок_ua\nAlso try out Slava1035/reVision!", 6 | "version": "2.37.0", 7 | "minGameVersion": 136, 8 | "repo": "deltanedas/routorio-old" 9 | } 10 | -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/preview.png -------------------------------------------------------------------------------- /schems.mk: -------------------------------------------------------------------------------- 1 | MSCH := pictoschem 2 | SCHEMATICS := $(XDG_DATA_HOME)/Mindustry/schematics 3 | # Android, Termux 4 | PACKAGE := io.anuke.mindustry.be 5 | ifeq ($(shell uname -o),Android) 6 | SCHEMATICS := /sdcard/Android/data/$(PACKAGE)/files/schematics 7 | endif 8 | 9 | # Exclude block portions, unit legs, etc. 10 | 11 | dist := clear-router colossus double-router explosive-router \ 12 | incinerouter inverted-router op-router titanium-double-router \ 13 | alien-router rainbow-router crouter 14 | power := arc-router electric-router moderouter solar-router surge-router \ 15 | phase-router fusion-router 16 | prod := ubuntium-router routerfruit 17 | logic := vulcan-router 18 | 19 | blocks := $(dist:%=distribution/%) $(power:%=power/%)\ 20 | $(prod:%=production/%) $(logic:%=logic/%) \ 21 | units/router-chainer 22 | 23 | units := reverout routerpede sexy-router 24 | 25 | schems := $(blocks:%=blocks/%) $(units:%=units/%) 26 | schems := $(schems:%=schems/%.msch) 27 | 28 | all: $(schems) 29 | 30 | schems/%.msch: sprites/%.png 31 | @mkdir -p `dirname $@` 32 | @printf "MSCH\t%s\n" $@ 33 | @$(MSCH) -o $@ -i $^ 34 | 35 | clean: 36 | rm -rf schems 37 | 38 | install: all 39 | cp -rf $(schems) $(SCHEMATICS)/ 40 | -------------------------------------------------------------------------------- /scripts/combat/combat.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const combat = extend(ItemTurret, "combat-router", { 19 | load() { 20 | this.super$load(); 21 | this.facade = Core.atlas.find("routorio-totally-4-distributors"); 22 | }, 23 | }); 24 | 25 | combat.buildType = () => extend(ItemTurret.ItemTurretBuild, combat, { 26 | draw() { 27 | if (this.team == Vars.player.team()) { 28 | this.super$draw(); 29 | } else { 30 | Draw.rect(combat.facade, this.x, this.y); 31 | } 32 | } 33 | }); 34 | 35 | module.exports = combat; 36 | -------------------------------------------------------------------------------- /scripts/combat/multirouter.js: -------------------------------------------------------------------------------- 1 | const multi = extend(Router, "multirouter", { 2 | load() { 3 | this.super$load(); 4 | this.region = Core.atlas.find("router"); 5 | }, 6 | 7 | drawPlace(x, y, rot, valid) { 8 | const tile = Vars.world.tile(x, y); 9 | if (!tile) return; 10 | this.drawRange(tile); 11 | }, 12 | 13 | drawRange(tile) { 14 | Lines.stroke(1); 15 | Draw.color(Color.coral); 16 | Drawf.circles(tile.drawx(), tile.drawy(), this.range); 17 | Draw.reset(); 18 | }, 19 | 20 | // brazil radius 21 | range: 10 * Vars.tilesize 22 | }); 23 | 24 | multi.buildType = () => extend(Router.RouterBuild, multi, { 25 | draw() { 26 | this.super$draw(); 27 | 28 | Draw.z(Layer.flyingUnit); 29 | for (var i = 0; i < 3; i++) { 30 | var rot = Time.time * 3 + i * 120; 31 | var x = this.x + Angles.trnsx(rot, multi.range); 32 | var y = this.y + Angles.trnsy(rot, multi.range); 33 | Draw.rect(multi.region, x, y, rot + 90); 34 | } 35 | Draw.z(Layer.block); 36 | }, 37 | 38 | drawSelect() { 39 | multi.drawRange(this.tile); 40 | }, 41 | 42 | updateTile() { 43 | this.super$updateTile(); 44 | 45 | Units.nearby(Team.crux, this.x, this.y, multi.range, unit => { 46 | if (unit.type == UnitTypes.poly || unit.type == UnitTypes.mega) { 47 | unit.kill(); 48 | } 49 | }); 50 | } 51 | }); 52 | 53 | module.exports = multi; 54 | -------------------------------------------------------------------------------- /scripts/items/beryllium.js: -------------------------------------------------------------------------------- 1 | module.exports = new Item("beryllium"); 2 | -------------------------------------------------------------------------------- /scripts/items/liquid.js: -------------------------------------------------------------------------------- 1 | // Not an item but h 2 | module.exports = new Liquid("liquid-router"); 3 | -------------------------------------------------------------------------------- /scripts/items/neutron.js: -------------------------------------------------------------------------------- 1 | module.exports = new Item("neutron-router"); 2 | -------------------------------------------------------------------------------- /scripts/lib/connected.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* Connected router textures. 19 | Blendbits are 3 least significant nibbles, edges, outer corners and inner corners. 20 | The fourth nibble is unused. */ 21 | 22 | const diags = [ 23 | [-1, 1], 24 | [1, 1], 25 | [1, -1], 26 | [-1, -1] 27 | ]; 28 | 29 | const all = [ 30 | [-1, 1], [0, 1], [1, 1], 31 | [-1, 0], [1, 0], 32 | [-1, -1], [0, -1], [1, -1] 33 | ]; 34 | 35 | const dirs = require("routorio/lib/dirs"); 36 | 37 | const block = { 38 | loadConnected() { 39 | this.super$load(); 40 | 41 | /* Edges and corners which depend on the placement */ 42 | this.edgeRegions = [ 43 | Core.atlas.find(this.name + "-edge_0"), 44 | Core.atlas.find(this.name + "-edge_1") 45 | ]; 46 | 47 | this.cornerRegions = []; 48 | this.icornerRegions = []; 49 | for (var i = 0; i < 4; i++) { 50 | this.cornerRegions[i] = Core.atlas.find(this.name + "-corner_" + i); 51 | this.icornerRegions[i] = Core.atlas.find(this.name + "-icorner_" + i); 52 | } 53 | } 54 | }; 55 | 56 | const building = block => {return { 57 | draw() { 58 | this.super$draw(); 59 | this.drawEdges(); 60 | this.drawCorners(); 61 | }, 62 | 63 | drawEdges() { 64 | const bits = this.blendBits; 65 | const x = this.x, y = this.y; 66 | 67 | for (var i = 0; i < 4; i++) { 68 | // First nibble has the edges 69 | if ((bits & (1 << i)) == 0) { 70 | Draw.rect(block.edgeRegions[i >> 1], x, y, 90 * -i); 71 | } 72 | } 73 | }, 74 | 75 | drawCorners() { 76 | const bits = this.blendBits; 77 | const x = this.x, y = this.y; 78 | 79 | for (var i = 0; i < 4; i++) { 80 | if ((bits & (256 << i)) != 0) { 81 | // Third nibble has the inner corners, which take priority 82 | Draw.rect(block.icornerRegions[i], x, y); 83 | } else if ((bits & (16 << i)) == 0) { 84 | // Second nibble has the outer corners 85 | Draw.rect(block.cornerRegions[i], x, y); 86 | } 87 | } 88 | }, 89 | 90 | placed() { 91 | this.super$placed(); 92 | 93 | // Server doesn't care about drawing, stop 94 | if (!Vars.ui) return; 95 | 96 | this.reblendAll(); 97 | this.reblend(); 98 | }, 99 | 100 | onRemoved() { 101 | this.super$onRemoved(); 102 | 103 | // Server doesn't care about drawing, stop 104 | if (!Vars.ui) return; 105 | Core.app.post(() => { 106 | this.reblendAll(); 107 | }); 108 | }, 109 | 110 | reblendAll() { 111 | for (var i in all) { 112 | var other = this.tile.nearby(all[i][0], all[i][1]); 113 | if (other && other.block() == block) { 114 | other.build.reblend(); 115 | } 116 | } 117 | }, 118 | 119 | reblend() { 120 | // All edges and outer corners by default 121 | var bits = 0; 122 | 123 | for (var i = 0; i < 4; i++) { 124 | var prev = this.adjacent((i + 3) % 4); 125 | var current = this.adjacent(i); 126 | if (current || prev) { 127 | // Can't be a corner 128 | bits |= 16 << i; 129 | if (current) { 130 | // Can't be a straight edge 131 | bits |= 1 << i; 132 | if (prev && this.interior(i)) { 133 | // It's a bend, show inner corner 134 | bits |= 256 << i; 135 | } 136 | } 137 | } 138 | } 139 | 140 | Fx.placeBlock.at(this.x, this.y); 141 | this.blendBits = bits; 142 | }, 143 | 144 | adjacent(i) { 145 | const other = this.tile.nearby(dirs[i].x, dirs[i].y); 146 | return other && other.block() == block; 147 | }, 148 | 149 | /* Whether a router is a corner of a square or just a bend */ 150 | interior(i) { 151 | const diag = this.tile.nearby(diags[i][0], diags[i][1]); 152 | return diag && diag.block() != this.block; 153 | }, 154 | 155 | read(read, version) { 156 | this.super$read(read, version); 157 | this.blendBits = read.s(); 158 | }, 159 | 160 | write(write) { 161 | this.super$write(write); 162 | write.s(this.blendBits); 163 | } 164 | };}; 165 | 166 | module.exports = { 167 | new(block, name, bdef, edef) { 168 | const ret = extend(block, name, 169 | Object.assign(Object.create(this.block), bdef)); 170 | // Get Router.RouterBuild from just Router 171 | const build = ret.newBuilding().class; 172 | edef = Object.assign(this.building(ret), edef); 173 | 174 | /* The building's variables are stored with the object, 175 | Object.create is used so that they don't share the same variables */ 176 | ret.buildType = () => extend(build, ret, Object.create(edef)); 177 | return ret; 178 | }, 179 | 180 | block: block, 181 | building: building 182 | }; 183 | -------------------------------------------------------------------------------- /scripts/lib/dirs.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | module.exports = [ 19 | {x: 0, y: 1}, 20 | {x: 1, y: 0}, 21 | {x: 0, y: -1}, 22 | {x: -1, y: 0} 23 | ]; 24 | -------------------------------------------------------------------------------- /scripts/lib/network.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const dirs = require("routorio/lib/dirs"); 19 | 20 | var networks; 21 | 22 | const fusionName = "routorio-fusion-router"; 23 | 24 | const FusionNetwork = { 25 | new(entity, id) { 26 | const ret = Object.create(FusionNetwork); 27 | ret.routers = ObjectSet.with(entity); 28 | ret.id = id; 29 | // Linked list nodes 30 | ret.rebuild(entity); 31 | ret.rebuildOutputs(); 32 | return ret; 33 | }, 34 | 35 | read(stream, id) { 36 | const ret = Object.create(FusionNetwork); 37 | ret.id = id; 38 | 39 | ret.heat = stream.readFloat(); 40 | ret.warmup = stream.readFloat(); 41 | 42 | const count = stream.readShort(); 43 | ret.routers = new ObjectSet(count); 44 | for (var i = 0; i < count; i++) { 45 | var pos = stream.readInt(); 46 | ret.routers.add(Vars.world.build(pos)); 47 | } 48 | 49 | ret.rebuildOutputs(); 50 | return ret; 51 | }, 52 | 53 | write(stream) { 54 | stream.writeFloat(this.heat); 55 | stream.writeFloat(this.warmup); 56 | 57 | const routers = this.routers.toSeq(); 58 | stream.writeShort(routers.size); 59 | for (var i = 0; i < routers.size; i++) { 60 | var block = routers.get(i); 61 | stream.writeInt(block.tile.pos()); 62 | } 63 | }, 64 | 65 | combine(other) { 66 | const ours = this.routers.size; 67 | const routers = other.routers.toSeq(); 68 | for (var i = 0; i < routers.size; i++) { 69 | this.routers.add(routers.get(i)); 70 | routers.get(i).networkId = this.id; 71 | } 72 | 73 | const theirs = routers.size; 74 | const total = ours + theirs; 75 | this.warmup = (this.warmup * ours + other.warmup * theirs) / total; 76 | this.heat = (this.heat * ours + other.heat * theirs) / total; 77 | }, 78 | 79 | rename(id) { 80 | this.routers.each(build => { 81 | build.networkId = id 82 | }); 83 | }, 84 | 85 | refresh() { 86 | const routers = this.routers.toSeq(); 87 | if (!routers.size) return; 88 | 89 | for (var i = 0; i < routers.size; i++) { 90 | var ent = routers.get(i); 91 | if (ent.block.name == fusionName) { 92 | ent.networkId = null; 93 | } 94 | } 95 | 96 | ent = routers.peek(); 97 | this.routers.clear(); 98 | this.rebuild(ent); 99 | this.rebuildOutputs(); 100 | 101 | networks.prune(); 102 | }, 103 | 104 | rebuild(root) { 105 | for (var i in dirs) { 106 | var tile = root.tile.nearby(i); 107 | if (!tile) return; 108 | 109 | if (tile.block().name == fusionName) { 110 | var ent = tile.build; 111 | if (this.routers.add(ent)) { 112 | if (ent.networkId !== null) { 113 | if (ent.networkId == this.id) return; 114 | 115 | var other = networks.get(ent.networkId); 116 | this.combine(other); 117 | other.routers.clear(); 118 | } 119 | 120 | ent.networkId = this.id; 121 | this.rebuild(ent); 122 | } 123 | } 124 | } 125 | }, 126 | 127 | rebuildOutputs() { 128 | const routers = this.routers.toSeq(); 129 | 130 | var last, indices = 0; 131 | for (var i = 0; i < routers.size; i++) { 132 | var router = routers.get(i); 133 | // FIXME: have this iterate in a defined order 134 | router.index = indices++; 135 | for (var output of router.outputs) { 136 | var node = { 137 | to: output, 138 | from: router, 139 | prev: node 140 | }; 141 | 142 | if (last) { 143 | last.next = node; 144 | } else { 145 | this.last = this.begin = node; 146 | } 147 | last = node; 148 | } 149 | } 150 | // no outputs 151 | if (!node) return; 152 | 153 | // outputs! 154 | this.end = node; 155 | this.end.next = this.begin; 156 | this.begin.prev = node; 157 | }, 158 | 159 | empty() { 160 | return this.routers.size == 0; 161 | }, 162 | 163 | begin: null, 164 | end: null, 165 | last: null, 166 | 167 | warmup: 0, 168 | heat: 0 169 | }; 170 | 171 | networks = { 172 | // create a new network and return its id 173 | create(build) { 174 | const id = this._next++; 175 | this._map[id] = FusionNetwork.new(build, id); 176 | this._count++; 177 | return id; 178 | }, 179 | 180 | // get a network from its id 181 | get(id) { 182 | return this._map[id]; 183 | }, 184 | 185 | remove(id) { 186 | if (id + 1 == this._next) 187 | this._next--; 188 | 189 | delete this._map[id]; 190 | this._count--; 191 | }, 192 | 193 | rename(old, id) { 194 | if (old == id) 195 | return false; 196 | 197 | const network = this._map[old]; 198 | delete this._map[old]; 199 | network.rename(id); 200 | this._map[id] = network; 201 | return true; 202 | }, 203 | 204 | flatten() { 205 | // this index is guaranteed to either be unused or used by the same network being processed 206 | // so renames never overwrite other networks 207 | var empty = 0; 208 | for (var i = 0; i < this._next; i++) { 209 | if (this._map[i] === undefined) 210 | continue; 211 | 212 | // if the network was renamed this index is guaranteed to be unused now 213 | // if not then the next index is the one being processed next 214 | this.rename(i, empty); 215 | empty++; 216 | } 217 | 218 | // guaranteed to be unused since its flattened 219 | _next = empty; 220 | }, 221 | 222 | clear() { 223 | this._map = {}; 224 | this._count = 0; 225 | this._next = 0; 226 | }, 227 | 228 | prune() { 229 | for (var id in this._map) { 230 | if (this._map[id].empty()) { 231 | this.remove(id); 232 | } 233 | } 234 | }, 235 | 236 | _map: {}, 237 | _count: 0, 238 | _next: 0 239 | }; 240 | 241 | const chunk = extend(SaveFileReader.CustomChunk, { 242 | write(stream) { 243 | stream.writeByte(0); 244 | stream.writeShort(networks._count); 245 | 246 | for (var i = 0; i < networks._count; i++) { 247 | networks._map[i].write(stream); 248 | } 249 | }, 250 | 251 | read(stream) { 252 | // assume its flattened before writing 253 | const version = stream.readByte(); 254 | networks._count = stream.readShort(); 255 | networks._next = networks._count; 256 | 257 | for (var i = 0; i < networks._count; i++) { 258 | networks._map[i] = FusionNetwork.read(stream, i); 259 | } 260 | } 261 | }); 262 | 263 | Events.on(SaveWriteEvent, e => { 264 | // this event is fired before actually writing the data, so flatten beforehand 265 | networks.prune(); 266 | networks.flatten(); 267 | }); 268 | 269 | Events.on(WorldLoadEvent, e => { 270 | networks.clear(); 271 | }); 272 | 273 | var highest = SaveIO.saveWriter.version; 274 | for (var i = 7; i <= highest; i++) { 275 | SaveIO.getSaveWriter(i).addCustomChunk("routorio_networks", chunk); 276 | } 277 | 278 | module.exports = networks; 279 | -------------------------------------------------------------------------------- /scripts/lib/register.js: -------------------------------------------------------------------------------- 1 | /* Registers a unit's class for I/O stuff (saves and net) 2 | Requires unit.constructor.get() to have classId: () => unit.classId */ 3 | module.exports = unit => { 4 | // Register unit's name 5 | EntityMapping.nameMap.put(unit.name, unit.constructor); 6 | 7 | // Find available class id and register it 8 | unit.classId = -1; 9 | for (var i in EntityMapping.idMap) { 10 | if (!EntityMapping.idMap[i]) { 11 | EntityMapping.idMap[i] = unit.constructor; 12 | unit.classId = i; 13 | return; 14 | } 15 | } 16 | 17 | // Incase you used up all 256 class ids; use the same code for ~250 units you idiot. 18 | throw new IllegalArgumentException(unit.name + " has no class ID"); 19 | }; 20 | -------------------------------------------------------------------------------- /scripts/lib/routoid.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const routorio = global.routorio; 19 | 20 | const routoid = { 21 | draw() { 22 | // .x is a function, must use getX() 23 | const x = this.x(), y = this.y(); 24 | Drawf.shadow(x, y, 16); 25 | Draw.rect(this.region, x, y, this.rotation() + 45); 26 | }, 27 | 28 | set(x, y, rotation) { 29 | this._x = x; 30 | this._y = y; 31 | this._rotation = rotation; 32 | }, 33 | 34 | x() { return this._x; }, 35 | y() { return this._y; }, 36 | rotation() { return this._rotation; }, 37 | 38 | init(breed) { 39 | const name = breed ? "routorio-" + breed + "-router" : "router"; 40 | this.breed = breed; 41 | this.region = routorio.holorouter.get(name); 42 | this.set(0, 0, 0); 43 | }, 44 | 45 | fits: () => true, 46 | 47 | isRoutoid: true 48 | }; 49 | 50 | module.exports = routoid; 51 | -------------------------------------------------------------------------------- /scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const routorio = global.routorio = {}; 19 | 20 | const add = (type, names) => { 21 | for (var i in names) { 22 | var name = names[i]; 23 | try { 24 | routorio[name] = require("routorio/" + type + "/" + name); 25 | } catch (e) { 26 | Log.err("Failed to load routorio script @/@.js: @ (@#@)", 27 | type, name, e, e.fileName, 28 | new java.lang.Integer(e.lineNumber)); 29 | routorio[name] = null; 30 | } 31 | } 32 | }; 33 | 34 | /* Items */ 35 | add("items", ["beryllium", "neutron", "liquid"]); 36 | 37 | /* Blocks */ 38 | add("routers", ["op", "half", "double", 39 | "inverted", "clear", "explosive", 40 | "phase", "ubuntium", "electric", 41 | "magnet", "solar", "alien", 42 | "arc", "vulcan", "plasma", 43 | "fusion", "holorouter", "sprouter", 44 | "rainbow", "lobotorout", "xmas"]); 45 | add("payloads", ["payload-conduit", 46 | "routoid-assembler", "routoid-liquefactor"]); 47 | add("combat", ["combat", "multirouter"]); 48 | 49 | /* Units */ 50 | add("units", ["router-chainer", "sexy-router", 51 | "routerpede", "reverout"]); 52 | 53 | /* Misc */ 54 | add("misc", ["manual", "icon"]); 55 | -------------------------------------------------------------------------------- /scripts/misc/icon.js: -------------------------------------------------------------------------------- 1 | // praise the one true cat god 2 | try { 3 | // typeof(Fonts.addIcon) throws an error so h 4 | Fonts.addIcon; 5 | 6 | Events.on(ClientLoadEvent, () => { 7 | Fonts.addIcon("router", "routorio-white-router"); 8 | Fonts.addIcon("anuke", "god"); 9 | }); 10 | } catch (e) {} 11 | -------------------------------------------------------------------------------- /scripts/misc/manual.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | try { 19 | const rtfm = require("rtfm/library"); 20 | 21 | rtfm.addSection("Routorio", [ 22 | "Arc Reoucter", 23 | "$block.routorio-electric-router.name", 24 | "Speed" 25 | ]); 26 | 27 | module.exports = true; 28 | } catch (e) { 29 | if (!Vars.headless) { 30 | Log.warn("Please install [#00aaff]deltanedas/rtfm[] to view routorio's manual pages."); 31 | } 32 | module.exports = false; 33 | } 34 | -------------------------------------------------------------------------------- /scripts/payloads/payload-conduit.js: -------------------------------------------------------------------------------- 1 | /* Faster, more forceful payload conduit */ 2 | 3 | const cond = extend(PayloadConveyor, "payload-conduit", { 4 | load() { 5 | this.super$load(); 6 | this.realEdge = this.edgeRegion; 7 | // Don't draw edge glass under the payload 8 | this.edgeRegion = Core.atlas.find("clear"); 9 | 10 | this.glassRegion = Core.atlas.find(this.name + "-glass"); 11 | }, 12 | 13 | loadIcon() { 14 | this.fullIcon = Core.atlas.find(this.name + "-icon"); 15 | this.uiIcon = this.fullIcon; 16 | }, 17 | 18 | icons: () => [Core.atlas.find(this.name + "-icon")] 19 | }); 20 | 21 | cond.buildType = () => extend(PayloadConveyor.PayloadConveyorBuild, cond, { 22 | draw() { 23 | this.super$draw(); 24 | Draw.rect(cond.glassRegion, this.x, this.y, this.rotation * 90); 25 | 26 | for (var i = 0; i < 4; i++) { 27 | if (!this.blends(i)) { 28 | Draw.rect(cond.realEdge, this.x, this.y, i * 90); 29 | } 30 | } 31 | } 32 | }); 33 | 34 | module.exports = cond; 35 | -------------------------------------------------------------------------------- /scripts/payloads/routoid-assembler.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const routoid = require("routorio/lib/routoid"); 19 | 20 | const asm = extend(PayloadBlock, "routoid-assembler", { 21 | setStats() { 22 | this.super$setStats(); 23 | this.stats.add(Stat.productionTime, this.craftTime / 60, StatUnit.seconds); 24 | }, 25 | 26 | outputsItems: () => false, 27 | // 4 routoids/s 28 | craftTime: 15 29 | }); 30 | 31 | // No breed = vanilla router 32 | asm.breeds = [null, "alien", "surge", 33 | "phase", "electric", "solar", "arc", 34 | "fusion", "inverted", "ubuntium", 35 | "sexy", "clear"]; 36 | 37 | asm.buildType = () => extend(PayloadBlock.PayloadBlockBuild, asm, { 38 | updateTile() { 39 | if (this.efficiency > 0 && !this.payload) { 40 | this.asmProgress += this.edelta(); 41 | } 42 | 43 | if (this.asmProgress >= asm.craftTime) { 44 | this.asmProgress = 0; 45 | this.payload = extend(Payload, Object.create(routoid)); 46 | this.payload.init(asm.breeds[Math.round(Mathf.random(asm.breeds.length))]); 47 | this.payVector.setZero(); 48 | this.consume(); 49 | } 50 | 51 | this.moveOutPayload(); 52 | }, 53 | 54 | draw() { 55 | Draw.rect(asm.region, this.x, this.y); 56 | Draw.rect(asm.outRegion, this.x, this.y, this.rotation * 90); 57 | this.drawPayload(); 58 | Draw.rect(asm.topRegion, this.x, this.y); 59 | }, 60 | 61 | dumpPayload() {}, 62 | 63 | acceptPayload: (s, p) => false, 64 | 65 | asmProgress: 0 66 | }); 67 | 68 | module.exports = asm; 69 | -------------------------------------------------------------------------------- /scripts/payloads/routoid-liquefactor.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const melter = extend(PayloadBlock, "routoid-liquefactor", { 19 | init() { 20 | this.super$init(); 21 | this.liquid = Vars.content.getByName(ContentType.liquid, "routorio-liquid-router"); 22 | }, 23 | 24 | setStats() { 25 | this.super$setStats(); 26 | this.stats.add(Stat.productionTime, this.meltTime / 60, StatUnit.seconds); 27 | // this.stats.add(Stat.output, this.liquid, this.amount, false); 28 | }, 29 | 30 | meltTime: 60 * 12, 31 | liquid: null, 32 | // 12/s 33 | amount: 12 / 60, 34 | 35 | outputsLiquid: true, 36 | solid: true 37 | }); 38 | 39 | melter.buildType = () => extend(PayloadBlock.PayloadBlockBuild, melter, { 40 | updateTile() { 41 | this.dumpLiquid(melter.liquid); 42 | 43 | if (this.efficiency <= 0) 44 | return; 45 | 46 | if (this.valid()) { 47 | var progress = this.edelta(); 48 | this.meltProgress -= progress; 49 | 50 | var space = melter.liquidCapacity - this.liquids.get(melter.liquid); 51 | this.liquids.add(melter.liquid, Math.min(space, progress * melter.amount)); 52 | } else if (this.payload && this.meltProgress < 0.1) { 53 | if (Vars.ui) { 54 | Fx.smeltsmoke.at(this.x + Mathf.range(2), this.y + Mathf.range(2)); 55 | } 56 | 57 | this.payload = null; 58 | this.meltProgress = melter.meltTime; 59 | } 60 | }, 61 | 62 | acceptsPayload(source, payload) { 63 | return !this.payload && payload.isRoutoid 64 | && (this.liquids.total() < melter.liquidCapacity); 65 | }, 66 | 67 | valid() { 68 | return this.meltProgress > 0.1 69 | && this.liquids.get(melter.liquid) < melter.liquidCapacity; 70 | }, 71 | 72 | meltProgress: 0 73 | }); 74 | 75 | module.exports = melter; 76 | -------------------------------------------------------------------------------- /scripts/routers/alien.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const dirs = require("routorio/lib/dirs"); 19 | 20 | const clear = global.routorio.clear; 21 | 22 | const alien = extend(Router, "alien-router", {}); 23 | 24 | alien.buildType = () => extend(Router.RouterBuild, alien, { 25 | updateTile() { 26 | this.super$updateTile(); 27 | if (Vars.net.client()) return; 28 | 29 | const items = this.items; 30 | if (Mathf.chance(alien.spreadChance)) { 31 | const fed = items.get(Items.thorium) > 0; 32 | if (fed) items.take(); 33 | this.spread(fed); 34 | } 35 | }, 36 | 37 | spread(fed) { 38 | for (var i in dirs) { 39 | var dir = Math.round(Mathf.random(0, 3)); 40 | 41 | var other = this.tile.nearby(dir); 42 | if (!other) continue; 43 | 44 | if (other.block() == Blocks.air || 45 | (other.block() instanceof Router 46 | && other.block().id != alien.id)) { 47 | if (fed) { 48 | Core.app.post(() => { 49 | other.setNet(alien, this.team, 0); 50 | }); 51 | } 52 | return; 53 | } 54 | } 55 | 56 | // This alien router couldn't spread and is a failure 57 | Core.app.post(() => { 58 | this.tile.setNet(clear, this.team, 0); 59 | }); 60 | } 61 | }); 62 | 63 | alien.spreadChance = 0.02; 64 | 65 | module.exports = alien; 66 | -------------------------------------------------------------------------------- /scripts/routers/arc.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* This script contains every arc reoucter module */ 19 | 20 | const directions = require("routorio/lib/dirs"); 21 | 22 | const itemMultipliers = { 23 | arc: { 24 | // Bad materials are nukes. 25 | "routorio-neutron-router": 100, 26 | sand: 10, 27 | coal: 8, 28 | 29 | // Metals increase arcs 30 | lead: 2, 31 | copper: 2, 32 | scrap: 3, 33 | "routorio-beryllium": 2, 34 | titanium: 3, 35 | silicon: 3, 36 | "surge-alloy": 4, 37 | // Plastanium reduces arc damage and, randomly, the count 38 | plastanium: 0.5 39 | }, 40 | power: { 41 | // Conductors increase power 42 | lead: 1.5, 43 | copper: 2, 44 | scrap: 1.25, 45 | titanium: 4, 46 | silicon: 5, 47 | "surge-alloy": 8 48 | } 49 | }; 50 | 51 | const getMultiplier = (kind, item) => { 52 | const mul = itemMultipliers[kind][item.name]; 53 | return mul || 1; 54 | }; 55 | 56 | const adjacent = (tile, valid) => { 57 | var adj = 0; 58 | for (var i in directions) { 59 | var near = tile.nearby(i); 60 | if (near && valid(near.block())) adj++; 61 | } 62 | 63 | return adj; 64 | }; 65 | 66 | var mod, arc; 67 | const rates = { 68 | base: { 69 | // entity uses it once 70 | apply: () => 0, 71 | bonuses: { 72 | // 45 power per second 73 | gen: 0.75, 74 | // 3% chance to arc for an item 75 | arc: 0.03, 76 | // 15% chance to consume item 77 | burnup: 0.15 78 | } 79 | }, 80 | // bonuses applied for adjacent Arc Routers 81 | chain: { 82 | apply: tile => adjacent(tile, block => block.id == arc.id), 83 | bonuses: { 84 | // Extra 30/s per tile adjacent for a given router 85 | gen: 0.50, 86 | arc: 0.01 87 | }, 88 | modifiers: { 89 | burnup: 1.2 90 | } 91 | }, 92 | // bonuses applied for adjacent Moderouters 93 | mod: { 94 | apply: tile => adjacent(tile, block => block.id == mod.id), 95 | bonuses: { 96 | arc: 0.05, 97 | gen: 0.25 98 | }, 99 | modifiers: { 100 | gen: 1.4 101 | } 102 | }, 103 | 104 | /* Special walls */ 105 | // decrease arcing 106 | plast: { 107 | apply: tile => adjacent(tile, block => (block.insulated && block instanceof Wall)), 108 | bonuses: { 109 | arc: -0.02 110 | } 111 | }, 112 | // decrease fuel burnup 113 | phase: { 114 | apply: tile => adjacent(tile, block => block.chanceDeflect > 0 115 | || block.id == global.routorio.phase.id), 116 | modifiers: { 117 | burnup: 0.5 118 | } 119 | }, 120 | 121 | /* Metal walls */ 122 | // copper walls are decent conductors 123 | copper: { 124 | apply: tile => adjacent(tile, block => block.name.endsWith("copper-wall")), 125 | bonuses: { 126 | gen: 0.4 127 | }, 128 | modifiers: { 129 | burnup: 1.2 130 | } 131 | }, 132 | // titanium walls are better conductors but are more dangerous 133 | titan: { 134 | apply: tile => adjacent(tile, block => block.name.endsWith("titanium-wall")), 135 | bonuses: { 136 | arc: 0.08, 137 | gen: 0.6 138 | }, 139 | modifiers: { 140 | burnup: 1.1 141 | } 142 | }, 143 | // surge is an excellent conductor, increase arcing and power dramatically 144 | surge: { 145 | apply: tile => adjacent(tile, block => block.lightningChance > 0), 146 | bonuses: { 147 | gen: 2 148 | }, 149 | modifiers: { 150 | arc: 1.6 151 | } 152 | } 153 | }; 154 | 155 | // Moderouters increase power and arc chance but not item burnup 156 | // Just here to make it easy to check for it. 157 | mod = new Router("moderouter"); 158 | 159 | arc = extend(Router, "arc-router", { 160 | setStats() { 161 | this.super$setStats(); 162 | // base stats, see bars for active stats 163 | this.stats.add(Stat.basePowerGeneration, rates.base.bonuses.gen * 60, StatUnit.powerSecond); 164 | this.stats.add(new Stat("arcChance", StatCat.power), rates.base.bonuses.arc * 100, StatUnit.percent); 165 | this.stats.add(new Stat("fuelBurnup", StatCat.items), rates.base.bonuses.burnup * 100, StatUnit.percent); 166 | }, 167 | 168 | setBars() { 169 | this.super$setBars(); 170 | this.addBar("power", entity => new Bar( 171 | () => Core.bundle.format("bar.poweroutput", 172 | Strings.fixed(entity.powerProduction * entity.timeScale * 60, 1)), 173 | () => Pal.powerBar, 174 | () => entity._activity / entity._maxActivity 175 | )); 176 | 177 | this.addBar("arc-chance", entity => new Bar( 178 | () => Core.bundle.format("bar.arc-chance", 179 | Strings.fixed(entity._rates.arc * 100, 1)), 180 | () => Pal.lancerLaser, 181 | () => entity._rates.arc / 0.35 182 | )); 183 | 184 | this.addBar("fuel-burnup", entity => new Bar( 185 | () => Core.bundle.format("bar.fuel-burnup", 186 | Strings.fixed(entity._rates.burnup * 100, 1)), 187 | () => Items.surgeAlloy.color, 188 | () => entity._rates.burnup / 0.31 189 | )); 190 | } 191 | }); 192 | 193 | arc.enableDrawStatus = true; 194 | // FIXME: casts to Enum for some reason instead of BlockFlag 195 | //arc.flags = EnumSet.of(BlockFlag.generator); 196 | arc.minColor = Color.white; 197 | arc.maxColor = new Color(1.35, 1.35, 1.5); 198 | 199 | arc.buildType = () => extend(Router.RouterBuild, arc, { 200 | updateTile() { 201 | this.super$updateTile(); 202 | this.activity = Math.max(this.activity - 0.005 * this.delta(), 0); 203 | }, 204 | 205 | handleItem(source, item) { 206 | if (!this.consumeFuel(item)) { 207 | this.super$handleItem(source, item); 208 | } 209 | }, 210 | 211 | consumeFuel(item) { 212 | const rates = this.rates; 213 | var consumed = false; 214 | 215 | // fractional part is chance the rest is guaranteed arcs 216 | if (Mathf.chance(rates.arc)) { 217 | const mul = getMultiplier("arc", item); 218 | const chance = mul % 1; 219 | 220 | for (var i = 0; i < mul - chance; i++) { 221 | this.arc(item, mul); 222 | } 223 | 224 | if (Mathf.chance(chance)) { 225 | this.arc(item, mul); 226 | } 227 | } 228 | 229 | if (Mathf.chance(rates.burnup)) { 230 | if (Vars.ui) { 231 | Fx.lancerLaserCharge.at(this.x + Mathf.range(2), this.y + Mathf.range(2), 232 | Math.random(0, 360), item.color); 233 | } 234 | this.items.take(); 235 | consumed = true; 236 | } 237 | 238 | // maxActivity uses the latest item so switching between surge and coal will instantly ruin output 239 | this.maxActivity = getMultiplier("power", item); 240 | this.activity = Math.min(this.activity + 0.2, this.maxActivity); 241 | return consumed; 242 | }, 243 | 244 | arc(item, mul) { 245 | const rates = this.rates; 246 | const maxLength = 20 * mul; 247 | const x = this.x, y = this.y; 248 | 249 | Core.app.post(() => { 250 | for (var i = 0; i < Math.sqrt(mul); i++) { 251 | Lightning.create(Team.derelict, item.color, 10, x, y, 252 | Mathf.random(0, 360), Math.round(Mathf.random(5, maxLength))); 253 | } 254 | }); 255 | }, 256 | 257 | calculateRates() { 258 | Object.assign(this.rates, rates.base.bonuses); 259 | 260 | for (var r in rates) { 261 | var rate = rates[r]; 262 | var mul = rate.apply(this.tile); 263 | if (mul == 0) continue; 264 | 265 | // Add first then multiply so moderouters aren't useless 266 | if (rate.bonuses) { 267 | for (var b in rate.bonuses) { 268 | this.rates[b] += rate.bonuses[b] * mul; 269 | } 270 | } 271 | 272 | if (rate.modifiers) { 273 | for (var m in rate.modifiers) { 274 | this.rates[m] *= Math.pow(rate.modifiers[m], mul); 275 | } 276 | } 277 | } 278 | }, 279 | 280 | getPowerProduction() { 281 | return this.rates.gen * this.activity; 282 | }, 283 | 284 | onProximityUpdate() { 285 | this.super$onProximityUpdate(); 286 | if (!Vars.state.editor) this.calculateRates(); 287 | }, 288 | 289 | onDestroyed() { 290 | this.super$onDestroyed(); 291 | // Spawn lots of arcs 292 | var mul = getMultiplier("arc", Items.surgeAlloy); 293 | for (var i = 0; i < 10; i++) { 294 | this.arc(Items.surgeAlloy, mul); 295 | } 296 | }, 297 | 298 | /* Status - Orange */ 299 | shouldConsume() { 300 | return this.activity > 0.5; 301 | }, 302 | /* Status - Red */ 303 | productionValid() { 304 | return this.activity > 0.02; 305 | }, 306 | 307 | /* Public fields */ 308 | get_activity() { return this.activity; }, 309 | get_maxActivity() { return this.maxActivity; }, 310 | get_rates() { return this.rates; }, 311 | 312 | rates: Object.create(rates.base.bonuses), 313 | activity: 0, 314 | maxActivity: 1 315 | }); 316 | 317 | module.exports = { 318 | rates: rates, 319 | moderouter: mod, 320 | arcRouter: arc, 321 | itemMultipliers: itemMultipliers 322 | }; 323 | -------------------------------------------------------------------------------- /scripts/routers/clear.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // How to colour the -top texture 19 | const colour = new Color(1, 1, 1, 0.5); 20 | 21 | const clear = extend(Router, "clear-router", { 22 | load() { 23 | this.super$load(); 24 | this.bottomRegion = Core.atlas.find("routorio-clear-router-bottom"); 25 | this.topRegion = Core.atlas.find("routorio-clear-router-top"); 26 | }, 27 | 28 | drawBase(tile){ 29 | const building = tile.build; 30 | Draw.rect(this.bottomRegion, tile.drawx(), tile.drawy()); 31 | Draw.color(colour); 32 | Draw.rect(this.topRegion, tile.drawx(), tile.drawy()); 33 | Draw.color(); 34 | if (building.items.total() != 0) { 35 | Draw.rect(building.items.first().fullIcon, tile.drawx(), tile.drawy()); 36 | } 37 | } 38 | }); 39 | 40 | module.exports = clear; 41 | -------------------------------------------------------------------------------- /scripts/routers/double.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | var lock = false; 19 | 20 | const double = extend(Router, "titanium-double-router", { 21 | load() { 22 | this.super$load(); 23 | 24 | this.regions = []; 25 | for (var i = 0; i < 2; i++) { 26 | this.regions[i] = Core.atlas.find(this.name + "_" + i); 27 | } 28 | }, 29 | 30 | drawBase(tile) { 31 | Draw.rect(this.regions[tile.x % 2], tile.drawx(), tile.drawy()); 32 | }, 33 | 34 | calcOffset: x => x + ((x % 2) ? -1 : 1), 35 | 36 | canPlaceOn(tile, team){ 37 | const x = this.calcOffset(tile.x); 38 | const other = Vars.world.tile(x, tile.y); 39 | return other.block().id == Blocks.air.id 40 | } 41 | }); 42 | 43 | double.buildType = () => extend(Router.RouterBuild, double, { 44 | placed() { 45 | this.super$placed(); 46 | const x = double.calcOffset(this.tile.x); 47 | Vars.world.tile(x, this.tile.y).setBlock(double, this.team, 0); 48 | }, 49 | 50 | onRemoved() { 51 | this.super$onRemoved(); 52 | const x = double.calcOffset(this.tile.x); 53 | 54 | /* Prevent trying to delete the other half infinitely */ 55 | if (!lock) { 56 | lock = true; 57 | Vars.world.tile(x, this.tile.y).remove(); 58 | lock = false; 59 | } 60 | } 61 | }); 62 | 63 | module.exports = double; 64 | -------------------------------------------------------------------------------- /scripts/routers/electric.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Configurable router, responds to changes in the power grid 19 | 20 | const Short = java.lang.Short; 21 | 22 | const modes = { 23 | buffer: 0, 24 | rate: 1 25 | }; 26 | const modeCount = Object.keys(modes).length; 27 | 28 | const operations = { 29 | equals: 0, 30 | greater: 1, 31 | less: 2, 32 | not: 3 33 | }; 34 | const operationCount = Object.keys(operations).length; 35 | 36 | operations.min = operations.equals; 37 | operations.max = operations.not; 38 | 39 | // Short - mode | operation 40 | const maxNumber = 0xFFF; 41 | 42 | const elec = extend(Router, "electric-router", { 43 | load() { 44 | this.super$load(); 45 | this.background = new TextureRegionDrawable(Core.atlas.find("router")); 46 | 47 | /* Configuration buttons */ 48 | this.buttons = { 49 | modes: [ 50 | "buffer", 51 | "rate" 52 | ], 53 | operations: [ 54 | "equals", 55 | "greater", 56 | "less", 57 | "not" 58 | ] 59 | }; 60 | 61 | var buttons; 62 | for (var b in this.buttons) { 63 | buttons = this.buttons[b]; 64 | for (var i in buttons) { 65 | buttons[i] = new TextureRegionDrawable(Core.atlas.find("routorio-button-" + buttons[i])); 66 | } 67 | } 68 | } 69 | }); 70 | 71 | elec.config(Short, (ent, raw) => { 72 | ent.load(raw); 73 | }); 74 | 75 | elec.buildType = () => extend(Router.RouterBuild, elec, { 76 | updateTile() { 77 | if (this.active()) { 78 | this.super$updateTile(); 79 | } 80 | }, 81 | 82 | buildConfiguration(parent) { 83 | const table = parent.fill(); 84 | table.background(elec.background); 85 | 86 | const modeb = table.button(elec.buttons.modes[this.mode], 87 | Styles.clearTogglei, () => { 88 | // Cycle through modes 89 | this.mode = (this.mode + 1) % modeCount; 90 | this.configure(this.config()); 91 | modeb.style.imageUp = elec.buttons.modes[this.mode] 92 | }).size(40).get(); 93 | 94 | const opb = table.button(elec.buttons.operations[this.operation], 95 | Styles.clearTogglei, () => { 96 | // Cycle through operations 97 | this.operation = (this.operation + 1) % operationCount; 98 | this.configure(this.config()); 99 | opb.style.imageUp = elec.buttons.operations[this.operation] 100 | }).size(40).get(); 101 | 102 | const numberf = table.field(this.number + "", text => { 103 | try { 104 | var set = parseInt(text); 105 | } catch (e) { 106 | set = 0 / 0; 107 | } 108 | if (!isNaN(set)) { 109 | set = Mathf.clamp(set, 0, maxNumber); 110 | numberf.text = set; 111 | this.number = set; 112 | this.configure(this.config()); 113 | } 114 | }).width(120).get(); 115 | }, 116 | 117 | active() { 118 | const number = Math.round(this.powerNum); 119 | 120 | switch (this.operation) { 121 | case operations.equals: 122 | return number == this.number; 123 | case operations.greater: 124 | return number > this.number; 125 | case operations.less: 126 | return number < this.number; 127 | case operations.not: 128 | return number != this.number; 129 | } 130 | return false; 131 | }, 132 | 133 | // Get comparison number from the mode 134 | getPowerNum() { 135 | switch (this.mode) { 136 | case modes.buffer: 137 | return this.power.status * maxNumber; 138 | case modes.rate: 139 | return this.power.graph.powerBalance * 60; 140 | } 141 | return 0; 142 | }, 143 | 144 | config() { 145 | var lhs = this.mode << 14; 146 | lhs |= this.operation << 12; 147 | return java.lang.Short(this.number | lhs); 148 | }, 149 | 150 | load(raw) { 151 | this.mode = raw >> 14 & 0x01; 152 | this.operation = (raw >> 12) & 0x03 153 | this.number = raw & maxNumber; 154 | }, 155 | 156 | write(stream) { 157 | this.super$write(stream); 158 | stream.s(this.config()); 159 | }, 160 | 161 | read(stream, version) { 162 | this.super$read(stream, version); 163 | this.load(stream.s()); 164 | }, 165 | 166 | /* Default configuration */ 167 | mode: modes.buffer, 168 | operation: operations.equals, 169 | number: maxNumber 170 | }); 171 | 172 | elec.consume(new ConsumePower(0, maxNumber, true)); 173 | 174 | module.exports = elec 175 | -------------------------------------------------------------------------------- /scripts/routers/explosive.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const dirs = require("routorio/lib/dirs"); 19 | 20 | const explode = extend(Router, "explosive-router", {}); 21 | 22 | explode.radius = 10; 23 | explode.damage = 100; 24 | 25 | explode.buildType = () => extend(Router.RouterBuild, explode, { 26 | onProximityUpdate() { 27 | this.super$onProximityUpdate(); 28 | 29 | for (var i in dirs) { 30 | var near = this.tile.nearby(i); 31 | if (near && near.block() instanceof Router) { 32 | this.snekDetected(); 33 | // Prevent stack overflow from explosive routers exploding 34 | Core.app.post(() => this.tile.remove()); 35 | } 36 | } 37 | }, 38 | 39 | onDestroyed() { 40 | this.super$onDestroyed(); 41 | this.snekDetected(); 42 | }, 43 | 44 | /* Call when a snek is found and must be eliminated */ 45 | snekDetected() { 46 | const x = this.x, y = this.y; 47 | Core.app.post(() => { 48 | Damage.damage(x, y, explode.radius * Vars.tilesize, explode.damage); 49 | }); 50 | 51 | if (!Vars.ui) return; 52 | 53 | Sounds.explosionbig.at(this.tile); 54 | Effect.shake(40, 16, x, y); 55 | Fx.reactorExplosion.at(x, y); 56 | for (var i = 0; i < 4; i++) { 57 | Time.run(Math.random(40), () => { 58 | Fx.reactorsmoke.at(x + Mathf.range(4), y + Mathf.range(4)); 59 | }); 60 | } 61 | } 62 | }); 63 | 64 | module.exports = explode; 65 | -------------------------------------------------------------------------------- /scripts/routers/fusion.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* Like an impact reactor, but a router. 19 | Blendbits are 3 least significant nibbles, edges, outer corners and inner corners. 20 | The fourth nibble is unused. */ 21 | 22 | var fusion, liquid; 23 | 24 | const networks = require("routorio/lib/network"); 25 | 26 | const connected = require("routorio/lib/connected"); 27 | const magnet = global.routorio.magnet; 28 | const neut = global.routorio.neutron; 29 | const plasma = global.routorio.plasma; 30 | 31 | fusion = connected.new(LiquidRouter, "fusion-router", { 32 | init() { 33 | this.super$init(); 34 | 35 | for (var cons of this.consumers) { 36 | // scale liquid router used with warmup 37 | if (cons instanceof ConsumeLiquid) { 38 | cons.multiplier = build => build.network.heat; 39 | } 40 | } 41 | }, 42 | 43 | load() { 44 | this.super$load(); 45 | // Center dot 46 | this.topRegion = Core.atlas.find(this.name + "-top"); 47 | 48 | /* Edges and corners which depend on the placement */ 49 | this.edgeRegions = [ 50 | Core.atlas.find(this.name + "-edge_0"), 51 | Core.atlas.find(this.name + "-edge_1") 52 | ]; 53 | 54 | this.cornerRegions = []; 55 | this.icornerRegions = []; 56 | for (var i = 0; i < 4; i++) { 57 | this.cornerRegions[i] = Core.atlas.find(this.name + "-corner_" + i); 58 | this.icornerRegions[i] = Core.atlas.find(this.name + "-icorner_" + i); 59 | } 60 | }, 61 | 62 | icons() { 63 | return [Core.atlas.find(this.name)] 64 | }, 65 | 66 | setBars() { 67 | this.super$setBars(); 68 | this.addBar("poweroutput", ent => ent.powerBar()); 69 | this.addBar("warmup", ent => ent.warmupBar()); 70 | }, 71 | 72 | getDependencies(cons) { 73 | this.super$getDependencies(cons); 74 | 75 | liquid = Vars.content.getByName(ContentType.liquid, "routorio-liquid-router"); 76 | cons.get(liquid); 77 | }, 78 | 79 | enableDrawStatus: false, 80 | powerGeneration: 50, 81 | 82 | heatRate: 0.00005, 83 | coolRate: -0.00004, 84 | // rate that warmup is lost at when below fuseHeat 85 | warmdownRate: -0.0001, 86 | shake: 0.5, 87 | 88 | // heat level required to start fusion + keep warmup at 1 89 | fuseHeat: 0.2, 90 | 91 | // 2 mins per router for a neutron router 92 | fuseTime: 120 * 60, 93 | // 1 min for a blocked fusion router to blow 94 | meltdownTime: 60 * 60, 95 | // Make room for plasma 96 | explosionRadius: 5, 97 | explosionDamage: 4000, 98 | // 40% of tiles in the blast radius are ignited 99 | plasmaChance: 0.4, 100 | 101 | plasma1: Color.valueOf("#379af1"), 102 | plasma2: Color.valueOf("#b24de7") 103 | }, { 104 | updateTile() { 105 | this.super$updateTile(); 106 | const delta = this.delta(); 107 | const warmup = this.warmup(); 108 | const network = this.network; 109 | 110 | // intentionally updating the network per-router so each router's failures can have an effect 111 | if (network.heat < fusion.fuseHeat) { 112 | network.warmup = Math.max(warmup + delta * fusion.warmdownRate, 0); 113 | } 114 | 115 | // rapidly cool if there is no fuel 116 | const fuel = this.liquids.currentAmount() / fusion.liquidCapacity; 117 | network.heat -= delta * Math.pow(1 - fuel, 3); 118 | // slowly cool if there is no power or missing safety equipment (magnets) 119 | network.heat = Mathf.clamp(network.heat + delta * (this.fusing() ? fusion.heatRate : fusion.coolRate)); 120 | 121 | if (network.heat >= fusion.fuseHeat) { 122 | this.fuseTime += delta * network.heat; 123 | // Blocking output will violently shake the screen as a warning 124 | Effect.shake(fusion.shake * this.fuseTime / fusion.fuseTime, fusion.shake, this); 125 | if (this.items.total() == 0) { 126 | if (this.fuseTime >= fusion.fuseTime) { 127 | this.items.add(neut, 1); 128 | this.fuseTime -= fusion.fuseTime; 129 | } 130 | } else if (this.fuseTime >= fusion.meltdownTime) { 131 | this.kill(); 132 | } 133 | } 134 | 135 | if (!this.lastItem && this.items.any()) { 136 | this.lastItem = this.items.first(); 137 | } 138 | 139 | this.dumpNet(); 140 | }, 141 | 142 | draw() { 143 | if (this.liquids.currentAmount() > 0.001) { 144 | this.drawLiquid(); 145 | } 146 | 147 | this.drawEdges(); 148 | this.drawCorners(); 149 | Draw.rect(fusion.topRegion, this.x, this.y); 150 | }, 151 | 152 | drawLiquid() { 153 | // TODO: bloom for heat > fuseHeat 154 | const network = this.network; 155 | const heat = network.heat; 156 | const warmup = network.warmup; 157 | const flux = Mathf.absin(Time.time + this.index * 173, 6 - 5 * warmup, warmup); 158 | const base = Tmp.c1.set(liquid.color).lerp(fusion.plasma1, warmup); 159 | Draw.color(base, fusion.plasma2, flux); 160 | var alpha = 0.9 * this.liquids.currentAmount() / fusion.liquidCapacity; 161 | alpha += Math.sin(0.1 * Time.time * Math.pow(warmup + 2, warmup + 1) + flux) / 5; 162 | Draw.alpha(alpha); 163 | Fill.rect(this.x, this.y, Vars.tilesize, Vars.tilesize); 164 | Draw.reset(); 165 | }, 166 | 167 | onDestroyed() { 168 | this.super$onDestroyed(); 169 | 170 | this.meltdown(); 171 | }, 172 | 173 | meltdown() { 174 | const heat = this.network.heat; 175 | if (heat < 0.5 || !Vars.state.rules.reactorExplosions) { 176 | return; 177 | } 178 | 179 | Effect.shake(40, 5, this); 180 | Sounds.explosionbig.at(this.tile); 181 | 182 | // 4-8 shockwaves centered around the reactor 183 | const max = 8 * heat; 184 | for (var i = 0; i < max; i++) { 185 | const x = this.x + Angles.trnsx(360 * i / max, 20); 186 | const y = this.y + Angles.trnsy(360 * i / max, 20); 187 | Fx.reactorExplosion.at(x, y); 188 | } 189 | 190 | const rad = fusion.explosionRadius; 191 | const rad2 = rad * rad; 192 | Damage.damage(this.x, this.y, rad * Vars.tilesize, 193 | fusion.explosionDamage * 4); 194 | 195 | // fill some of the explosion with plasma routers 196 | const cx = this.tileX(), cy = this.tileY(); 197 | const minX = cx - rad, minY = cy - rad; 198 | const maxX = cx + rad, maxY = cy + rad; 199 | for (var y = minY; y < maxY; y++) { 200 | for (var x = minX; x < maxX; x++) { 201 | if (!Mathf.chance(fusion.plasmaChance)) 202 | continue; 203 | 204 | if (Mathf.dst2(x, y, cx, cy) <= rad2) { 205 | Vars.world.tile(x, y).setBlock(plasma, this.team, 0); 206 | } 207 | } 208 | } 209 | }, 210 | 211 | onRemoved() { 212 | this.super$onRemoved(); 213 | 214 | this.meltdown(); 215 | 216 | const network = this.network; 217 | Core.app.post(() => { 218 | if (network) network.refresh(); 219 | 220 | // Server doesn't care about drawing, stop 221 | if (Vars.ui) this.reblendAll(); 222 | }); 223 | }, 224 | 225 | acceptLiquid(source, type) { 226 | return type == liquid && (this.liquids.currentAmount() < fusion.liquidCapacity); 227 | }, 228 | 229 | acceptStack: () => 0, 230 | acceptItem: () => false, 231 | 232 | // Searches reactor outputs instead of prox 233 | dumpNet() { 234 | const network = this.network; 235 | if (!network || !network.last || this.items.total() == 0) return; 236 | 237 | var ended = false; 238 | var node = network.last; 239 | while (!ended) { 240 | var output = node.to, source = node.from; 241 | node = node.next; 242 | if (output.acceptItem(source, neut)) { 243 | network.last = node; 244 | output.handleItem(source, neut); 245 | this.items.take(); 246 | return; 247 | } 248 | 249 | ended = node == network.end; 250 | } 251 | }, 252 | 253 | canDumpLiquid: (to, l) => to.block == fusion, 254 | 255 | /* Check for lightning to ignite */ 256 | collision(b) { 257 | if (b.type.status == StatusEffects.shocked) { 258 | const mul = this.power.status * this.liquids.currentAmount() / fusion.liquidCapacity; 259 | const network = this.network; 260 | network.warmup = Math.min(network.warmup + mul * (b.damage / 250), 1); 261 | if (network.warmup > 0.999) { 262 | // Convert excess warmup into heat, eventually starting fusion 263 | network.heat = Math.min(network.heat + mul * (b.damage / 500), 1); 264 | } 265 | 266 | // More electromagnets = less damage 267 | // 1x1 fusion is completely safe so if you want bigger you need a few menders for the edges 268 | // benefit of bigger is that it will warm up much faster 269 | b.damage *= 1 - (this.magnets / 4); 270 | } 271 | return this.super$collision(b); 272 | }, 273 | 274 | // FIXME: this is ran 6 times for a block place 275 | onProximityUpdate() { 276 | this.super$onProximityUpdate(); 277 | 278 | const network = this.network; 279 | const prox = this.proximity; 280 | // Remove potentially broken tiles 281 | const outputs = []; 282 | this.magnets = 0; 283 | 284 | /* Add back the remaining tiles */ 285 | for (var i = 0; i < prox.size; i++) { 286 | var near = prox.get(i); 287 | if (near.block.hasItems && near.block != fusion) { 288 | if (near.block.id == magnet.id) { 289 | this.magnets++; 290 | } 291 | outputs.push(near); 292 | } 293 | } 294 | this.outputs = outputs; 295 | 296 | // Very slow 297 | if (network) network.rebuildOutputs(); 298 | }, 299 | 300 | read(read, version) { 301 | this.super$read(read, version); 302 | 303 | this.blendBits = read.s(); 304 | if (version < 4) { 305 | read.b(); 306 | read.b(); 307 | 308 | // (Slowly) remerge every network 309 | Core.app.post(() => { 310 | this.network.refresh(); 311 | }); 312 | } else { 313 | this.networkId = read.s(); 314 | if (this.networkId == -1) 315 | this.networkId = null; 316 | } 317 | this.fuseTime = read.f(); 318 | }, 319 | 320 | write(write) { 321 | this.super$write(write); 322 | write.s(this.blendBits); 323 | write.s(this.networkId === undefined ? -1 : this.networkId); 324 | write.f(this.fuseTime); 325 | }, 326 | 327 | version: () => 4, 328 | 329 | getPowerProduction() { 330 | return this.network.heat * fusion.powerGeneration; 331 | }, 332 | 333 | powerBar() { 334 | const base = fusion.consPower.usage; 335 | return new Bar( 336 | () => Core.bundle.format("bar.poweroutput", 337 | Strings.fixed(Math.max(this.powerProduction - base, 0) * 60 * this.timeScale, 1)), 338 | () => fusion.plasma2, 339 | () => this.network.heat); 340 | }, 341 | warmupBar() { 342 | return new Bar( 343 | "warmup", 344 | fusion.plasma1, 345 | () => this.network.warmup); 346 | }, 347 | 348 | fusing() { 349 | // min 2 electromagnets for routorus edges 350 | return this.magnets >= 2 351 | && this.network.warmup > 0.999 352 | && this.liquids.currentAmount() > 1 353 | && this.power.status > 0.9; 354 | }, 355 | 356 | /* Public fields */ 357 | getNetwork() { 358 | if (this._networkId === null) { 359 | this._networkId = networks.create(this); 360 | } 361 | 362 | return networks.get(this._networkId); 363 | }, 364 | getNetworkId() { return this._networkId; }, 365 | setNetworkId(set) { this._networkId = set; }, 366 | getIndex() { return this._index; }, 367 | setIndex(set) { this._index = set; }, 368 | getOutputs() { return this._outputs; }, 369 | setOutputs(set) { this._outputs = set; }, 370 | 371 | _networkId: null, 372 | _index: 0, 373 | _outputs: [], 374 | fuseTime: 0 375 | }); 376 | 377 | module.exports = fusion; 378 | -------------------------------------------------------------------------------- /scripts/routers/half.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const double = extend(Router, "double-router", { 19 | load() { 20 | this.super$load(); 21 | this.regions = [ 22 | Core.atlas.find(this.name + "_0"), 23 | Core.atlas.find(this.name + "_1") 24 | ]; 25 | }, 26 | 27 | drawBase(tile){ 28 | Draw.rect(this.regions[tile.x % 2], tile.drawx(), tile.drawy()); 29 | } 30 | }); 31 | 32 | module.exports = double; 33 | -------------------------------------------------------------------------------- /scripts/routers/holorouter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | var holo; 19 | 20 | const HoloI = { 21 | _(builder, target, name) { 22 | this.target = builder.var(target); 23 | this.name = builder.var(name); 24 | }, 25 | 26 | run(vm) { 27 | const target = vm.building(this.target); 28 | if (!(target && target.block == holo)) { 29 | return; 30 | } 31 | 32 | const name = vm.obj(this.name); 33 | if (!(name instanceof String)) return; 34 | 35 | target.texture(name); 36 | } 37 | }; 38 | 39 | const HoloStatement = { 40 | new: words => { 41 | const st = extend(LStatement, Object.create(HoloStatement)); 42 | st.read(words); 43 | return st; 44 | }, 45 | 46 | read(words) { 47 | this.target = words[1] || "holorouter1"; 48 | this.texture = words[2] || '"god"'; 49 | }, 50 | 51 | build(h) { 52 | if (h instanceof Table) { 53 | return this.buildt(h); 54 | } 55 | 56 | const inst = extend(LExecutor.LInstruction, Object.create(HoloI)); 57 | inst._(h, this.target, this.texture); 58 | return inst; 59 | }, 60 | 61 | buildt(table) { 62 | this.field(table, this.target, text => {this.target = text}); 63 | table.add(" = "); 64 | this.field(table, this.texture, text => {this.texture = text}).width(0).left().growX(); 65 | }, 66 | 67 | write(builder) { 68 | builder.append("holorouter "); 69 | builder.append(this.target); 70 | builder.append(" "); 71 | builder.append(this.texture); 72 | }, 73 | 74 | name: () => "Holorouter", 75 | color: () => Pal.logicBlocks 76 | }; 77 | 78 | /* Mimic @RegisterStatement */ 79 | LAssembler.customParsers.put("holorouter", func(HoloStatement.new)); 80 | 81 | LogicIO.allStatements.add(prov(() => HoloStatement.new([ 82 | "holorouter", 83 | "holorouter1", 84 | '"god"' 85 | ]))); 86 | 87 | holo = extend(Router, "holorouter", { 88 | load() { 89 | this.super$load(); 90 | 91 | var texture, field; 92 | 93 | Events.on(ClientLoadEvent, () => { 94 | this.loadDialog(); 95 | }); 96 | }, 97 | 98 | loadDialog() { 99 | this.dialog = extend(BaseDialog, "$select-hologram", { 100 | pick(ent) { 101 | this.ent = ent; 102 | this.text = ent.config(); 103 | this.show(); 104 | } 105 | }); 106 | 107 | const t = this.dialog.cont; 108 | t.defaults().center(); 109 | this.dialog.ent = null; 110 | 111 | const preview = new TextureRegionDrawable(this.get("router")); 112 | t.image(preview).size(128).fillY(); 113 | t.row(); 114 | 115 | field = t.field("router", text => { 116 | texture = text; 117 | preview.region = this.get(text); 118 | }).growX().pad(32).get(); 119 | t.row(); 120 | 121 | this.dialog.addCloseButton(); 122 | this.dialog.buttons.button("$accept", Icon.save, () => { 123 | this.dialog.ent.texture(texture); 124 | this.dialog.hide(); 125 | }); 126 | }, 127 | 128 | get(name) { 129 | if (this.textureCache[name]) { 130 | return this.textureCache[name]; 131 | } 132 | 133 | const reg = Core.atlas.find(name); 134 | this.textureCache[name] = reg; 135 | return reg; 136 | } 137 | }); 138 | 139 | holo.opacity = 0.75; 140 | holo.textureCache = {}; 141 | holo.dialog = null; 142 | 143 | holo.config(java.lang.String, (ent, str) => { 144 | ent.texture(str); 145 | }); 146 | 147 | holo.buildType = () => extend(Router.RouterBuild, holo, { 148 | /* Drawing */ 149 | draw() { 150 | this.super$draw(); 151 | if (this.power.status > 0.01) { 152 | this.drawHolo(); 153 | } 154 | }, 155 | 156 | drawHolo() { 157 | // Subtle phasing in and out 158 | const phase = (Math.sin(Time.time / 50) / 5) + 0.8; 159 | Draw.alpha(phase * this.power.status * holo.opacity); 160 | Draw.rect(this.region, this.x, this.y + this.offset); 161 | }, 162 | 163 | /* Configuration */ 164 | config() { 165 | return this.name; 166 | }, 167 | 168 | buildConfiguration(t) { 169 | t.button(Icon.pencil, () => { 170 | holo.dialog.pick(this); 171 | }); 172 | }, 173 | 174 | texture(name) { 175 | this.name = name; 176 | this.region = holo.get(name); 177 | this.offset = (this.region.height / 8) + 6; 178 | }, 179 | 180 | /* I/O */ 181 | read(read, version) { 182 | this.super$read(read, version); 183 | this.texture(read.str()); 184 | }, 185 | 186 | write(write) { 187 | this.super$write(write); 188 | write.str(this.name); 189 | }, 190 | 191 | name: "router", 192 | region: Core.atlas.find("router"), 193 | offset: 10 194 | }); 195 | 196 | module.exports = holo; 197 | -------------------------------------------------------------------------------- /scripts/routers/inverted.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const inverted = extend(Conveyor, "inverted-router", { 19 | load() { 20 | this.super$load(); 21 | 22 | this.region = Core.atlas.find(this.name); 23 | }, 24 | 25 | drawPlanRegion(plan, list) { 26 | const scl = Vars.tilesize * plan.animScale; 27 | Draw.rect(this.region, plan.drawx(), plan.drawy(), scl, scl); 28 | }, 29 | 30 | icons() { 31 | return [this.region] 32 | } 33 | }); 34 | 35 | inverted.buildType = () => extend(Conveyor.ConveyorBuild, inverted, { 36 | draw(tile) { 37 | const rot = Time.time * inverted.speed * 8 * this.timeScale; 38 | // Instead of an animated texture, it rotates when active 39 | Draw.rect(this.region, this.x, this.y, rot); 40 | } 41 | }); 42 | 43 | module.exports = inverted; 44 | -------------------------------------------------------------------------------- /scripts/routers/lobotorout.js: -------------------------------------------------------------------------------- 1 | /* Rotatable T-shaped router that doesn't output to one side. */ 2 | 3 | // TODO: Blend like a router, not a conveyor 4 | 5 | const lobo = extend(Router, "lobotorout", { 6 | load() { 7 | this.super$load(); 8 | this.region = Core.atlas.find("router"); 9 | this.edgeRegion = Core.atlas.find(this.name + "-edge"); 10 | } 11 | }); 12 | 13 | lobo.buildType = () => extend(Router.RouterBuild, lobo, { 14 | draw() { 15 | // No rotation 16 | Draw.rect(lobo.region, this.x, this.y); 17 | Draw.rect(lobo.edgeRegion, this.x, this.y, this.rotation * 90 + 90); 18 | }, 19 | 20 | created() { 21 | this.super$created(); 22 | this.target = this.rotation; 23 | }, 24 | 25 | getTileTarget(item, from, set) { 26 | const prox = this.proximity; 27 | const counter = this.target; 28 | for (var i = 0; i < prox.size; i++) { 29 | var other = prox.get((i + counter) % prox.size); 30 | if (this.relativeTo(other) == this.rotation) continue; 31 | 32 | if (set) this.target = (this.target + 1) % prox.size; 33 | if (other.tile == from && from.block() == Blocks.overflowGate) continue; 34 | if (other.acceptItem(this, item)) return other; 35 | } 36 | 37 | return null; 38 | }, 39 | 40 | read(read, version) { 41 | this.super$read(read, version); 42 | this.target = read.b(); 43 | }, 44 | 45 | write(write) { 46 | this.super$write(write); 47 | write.b(this.target); 48 | }, 49 | 50 | target: 0 51 | }); 52 | 53 | module.exports = lobo; 54 | -------------------------------------------------------------------------------- /scripts/routers/magnet.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const magnet = extend(Router, "magnet-router", {}); 19 | 20 | magnet.sparkChance = 0.1; 21 | 22 | magnet.buildType = () => extend(Router.RouterBuild, magnet, { 23 | updateTile() { 24 | // Only route items when there is power, but the amount doesn't matter 25 | // magnet routers serve as a heavy initial power cost 26 | if (this.efficiency > 0.0) { 27 | this.super$updateTile(); 28 | } 29 | }, 30 | 31 | // Add random spark effects when routing 32 | handleItem(source, item) { 33 | this.super$handleItem(source, item); 34 | 35 | if (Vars.ui && Mathf.chance(magnet.sparkChance)) { 36 | Fx.lancerLaserCharge.at(this.x + Mathf.range(2), this.y + Mathf.range(2), 37 | Math.random(0, 360), Items.surgeAlloy.color); 38 | } 39 | } 40 | }); 41 | 42 | module.exports = magnet; 43 | -------------------------------------------------------------------------------- /scripts/routers/op.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* Turns router into a UV locked distributor quarter. */ 19 | 20 | const opRouter = extend(Router, "op-router", { 21 | load() { 22 | this.super$load(); 23 | this.regions = []; 24 | for (var i = 0; i < 4; i++) { 25 | this.regions[i] = Core.atlas.find(this.name + "_" + i); 26 | } 27 | }, 28 | 29 | icons() { 30 | // Vanilla distributor texture ("distributor" is overriden to be 4 routers) 31 | return [Core.atlas.find("routorio-distributor")]; 32 | } 33 | }); 34 | 35 | opRouter.buildType = () => extend(Router.RouterBuild, opRouter, { 36 | draw() { 37 | Draw.rect(this.region, this.x, this.y); 38 | }, 39 | 40 | getRegion() { 41 | return opRouter.regions[(this.tile.x % 2) + 2 * (this.tile.y % 2)]; 42 | } 43 | }); 44 | 45 | module.exports = opRouter; 46 | -------------------------------------------------------------------------------- /scripts/routers/phase.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* Passback-less router with a cool design. 19 | Blendbits are 3 least significant nibbles, edges, outer corners and inner corners. 20 | The fourth nibble is unused. */ 21 | 22 | var phase; 23 | 24 | const dirs = require("routorio/lib/dirs"); 25 | 26 | const NetworkGraph = { 27 | new(entity) { 28 | const ret = Object.create(NetworkGraph); 29 | ret.routers = ObjectSet.with(entity); 30 | // Linked list nodes 31 | ret.rebuild(entity); 32 | ret.rebuildOutputs(); 33 | return ret; 34 | }, 35 | 36 | addNetwork(net) { 37 | const routers = net.routers.toSeq(); 38 | for (var i = 0; i < routers.size; i++) { 39 | this.routers.add(routers.get(i)); 40 | routers.get(i).network = this; 41 | } 42 | }, 43 | 44 | refresh() { 45 | const routers = this.routers.toSeq(); 46 | if (!routers.size) return; 47 | 48 | for (var i = 0; i < routers.size; i++) { 49 | var ent = routers.get(i); 50 | if (ent.block == phase) { 51 | ent.network = null; 52 | } 53 | } 54 | 55 | ent = this.routers.first(); 56 | this.routers.clear(); 57 | this.rebuild(ent); 58 | this.rebuildOutputs(); 59 | }, 60 | 61 | rebuild(root) { 62 | for (var i in dirs) { 63 | var tile = root.tile.nearby(i); 64 | if (!tile) return; 65 | 66 | if (tile.block() == phase) { 67 | var ent = tile.build; 68 | if (this.routers.add(ent)) { 69 | if (ent.network) { 70 | if (ent.network == this) return; 71 | this.addNetwork(ent.network); 72 | } 73 | ent.network = this; 74 | this.rebuild(ent); 75 | } 76 | } 77 | } 78 | }, 79 | 80 | rebuildOutputs() { 81 | const routers = this.routers.toSeq(); 82 | 83 | var last; 84 | for (var i = 0; i < routers.size; i++) { 85 | var router = routers.get(i); 86 | for (var o in router.outputs) { 87 | var node = { 88 | to: router.outputs[o], 89 | from: router, 90 | prev: node 91 | }; 92 | 93 | if (last) { 94 | last.next = node; 95 | } else { 96 | this.last = this.begin = node; 97 | } 98 | last = node; 99 | } 100 | } 101 | if (!node) return; 102 | 103 | this.end = node; 104 | this.end.next = this.begin; 105 | this.begin.prev = node; 106 | }, 107 | 108 | begin: null, 109 | end: null, 110 | last: null 111 | }; 112 | 113 | const connected = require("routorio/lib/connected"); 114 | 115 | phase = connected.new(Router, "phase-router", { 116 | load() { 117 | this.loadConnected(); 118 | 119 | // Center dot 120 | this.region = Core.atlas.find(this.name + "-base"); 121 | } 122 | }, { 123 | draw() { 124 | if (this.power.status < 1) { 125 | // Inactive state, draw disconnected version 126 | Draw.rect(phase.fullIcon, this.x, this.y); 127 | } else { 128 | this.super$draw(); 129 | this.drawEdges(); 130 | this.drawCorners(); 131 | this.drawShine(); 132 | } 133 | }, 134 | 135 | drawShine() { 136 | const shine = (Math.sin((Time.time / 6 + this.x + this.y) / 10) + 1) / 16; 137 | if (shine < 0.01) return; 138 | 139 | Draw.color(Color.white) 140 | Draw.alpha(shine); 141 | Draw.blend(Blending.additive); 142 | Fill.rect(this.x, this.y, Vars.tilesize, Vars.tilesize); 143 | Draw.blend(); 144 | Draw.reset(); 145 | }, 146 | 147 | onRemoved() { 148 | this.super$onRemoved(); 149 | 150 | const net = this.network; 151 | Core.app.post(() => { 152 | if (net) net.refresh(); 153 | 154 | // Server doesn't care about drawing, stop 155 | if (!Vars.ui) return; 156 | this.reblendAll(); 157 | }); 158 | }, 159 | 160 | /* Round-robin all outputs in this network */ 161 | handleItem(source, item) { 162 | const network = this.network; 163 | 164 | var ended = false; 165 | var node = network.last; 166 | while (!ended) { 167 | var output = node.to, source = node.from; 168 | node = node.next; 169 | if (output.acceptItem(source, item)) { 170 | output.handleItem(source, item); 171 | network.last = node; 172 | return; 173 | } 174 | 175 | ended = node == network.last; 176 | } 177 | // acceptItem said yes but handleItem said no 178 | }, 179 | 180 | acceptItem(source, item) { 181 | if (this.power.status < 1) return false; 182 | if (!this.network) { 183 | this.network = NetworkGraph.new(this); 184 | } 185 | 186 | const net = this.network; 187 | var node = net.begin; 188 | do { 189 | var output = node.to, source = node.from; 190 | node = node.next; 191 | 192 | if (output.acceptItem(source, item)) { 193 | return true; 194 | } 195 | } while (node != net.begin); 196 | 197 | return false; 198 | }, 199 | 200 | onProximityUpdate() { 201 | this.super$onProximityUpdate(); 202 | 203 | const net = this.network; 204 | const prox = this.proximity; 205 | // Remove potentially broken tiles 206 | this.outputs = []; 207 | 208 | /* Add back the remaining tiles */ 209 | for (var i = 0; i < prox.size; i++) { 210 | var near = prox.get(i); 211 | // Work on sorter, core, conveyor etc. all at the same time 212 | if ((near.block.acceptsItems || near.block.hasItems) && near.block != phase) { 213 | this.outputs.push(near); 214 | } 215 | } 216 | 217 | // Very slow 218 | if (net) net.rebuildOutputs(); 219 | }, 220 | 221 | read(read, version) { 222 | this.super$read(read, version); 223 | this.blendBits = read.s(); 224 | }, 225 | write(write) { 226 | this.super$write(write); 227 | write.s(this.blendBits); 228 | }, 229 | 230 | /* Public fields */ 231 | getNetwork() { return this._network; }, 232 | setNetwork(set) { this._network = set; }, 233 | getOutputs() { return this._outputs; }, 234 | setOutputs(set) { this._outputs = set; }, 235 | 236 | _network: null, 237 | _outputs: [] 238 | }); 239 | 240 | module.exports = phase; 241 | -------------------------------------------------------------------------------- /scripts/routers/plasma.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const plasma = extend(Block, "plasma-router", {}); 19 | 20 | // number of cooldown ticks that fresh plasma will spread 21 | plasma.lifetime = 100; 22 | // tries to spread 5 times per second 23 | plasma.cooldown = 0.2 * 60; 24 | // chance to spread to an adjacent block every cooldown tick 25 | plasma.spreadChance = 0.25; 26 | 27 | plasma.buildType = () => extend(Building, { 28 | created() { 29 | // proximity is initialized after this so we must wait 30 | Core.app.post(() => { 31 | // set life based on the oldest adjacent plasma 32 | var min = this.life; 33 | const prox = this.proximity; 34 | for (var i = 0; i < prox.size; i++) { 35 | var other = prox.get(i); 36 | if (other.life !== undefined) { 37 | min = Math.min(min, other.life); 38 | } 39 | } 40 | 41 | this.life = min - 1; 42 | }); 43 | }, 44 | 45 | updateTile() { 46 | this.super$updateTile(); 47 | 48 | if (this.life <= 0) { 49 | this.kill(); 50 | return; 51 | } 52 | 53 | this.time += this.delta(); 54 | if (this.time < plasma.cooldown) return; 55 | 56 | this.time -= plasma.cooldown; 57 | this.life--; 58 | 59 | const cx = this.tileX(), cy = this.tileY(); 60 | const dirs = [[cx - 1, cy], [cx + 1, cy], [cx, cy - 1], [cx, cy + 1]]; 61 | for (var dir of dirs) { 62 | var tile = Vars.world.tile(dir[0], dir[1]); 63 | if (!tile || tile.block() instanceof StaticWall || tile.block() == plasma) 64 | continue; 65 | 66 | this.spread(tile); 67 | } 68 | }, 69 | 70 | spread(tile) { 71 | if (!Mathf.chance(plasma.spreadChance)) 72 | return; 73 | 74 | tile.setNet(plasma, this.team, 0); 75 | }, 76 | 77 | getLife() { return this._life; }, 78 | setLife(set) { this._life = set; }, 79 | 80 | _life: plasma.lifetime, 81 | time: 0 82 | }); 83 | 84 | module.exports = plasma; 85 | -------------------------------------------------------------------------------- /scripts/routers/rainbow.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const rainbow = extend(Router, "rainbow-router", { 19 | load() { 20 | this.super$load(); 21 | this.drawable = new TextureRegionDrawable(Core.atlas.find("router")); 22 | }, 23 | 24 | minimapColor(tile) { 25 | return tile.build.get() != -1 ? this.colours[tile.build.get()].rgba : this.super$minimapColor(tile); 26 | }, 27 | 28 | colours: Vars.playerColors 29 | }); 30 | 31 | rainbow.config(java.lang.Integer, (build, colour) => { 32 | if (colour == -1 || rainbow.colours[colour]) { 33 | build.load(colour); 34 | } 35 | }); 36 | 37 | var scrollPos = 0; 38 | 39 | rainbow.buildType = () => extend(Router.RouterBuild, rainbow, { 40 | draw() { 41 | if (this.colour != -1) { 42 | Draw.color(rainbow.colours[this.colour]); 43 | Draw.rect(Blocks.router.region, this.x, this.y); 44 | Draw.color(); 45 | } else { 46 | Draw.rect(rainbow.region, this.x, this.y); 47 | } 48 | }, 49 | 50 | buildConfiguration(table) { 51 | const pane = table.pane(t => { 52 | t.background(rainbow.drawable); 53 | 54 | // Like m.w.blocks.ItemSelection but for colours 55 | for (var i in rainbow.colours) { 56 | this.button(t, i); 57 | 58 | if (i % 4 == 3) { 59 | t.row(); 60 | } 61 | } 62 | }).maxHeight(Scl.scl(40 * 5)).get(); 63 | 64 | // Only add scroll stuff if it's needed 65 | if (rainbow.colours.length > 20) { 66 | pane.setScrollingDisabled(true, false); 67 | pane.scrollYForce = scrollPos; 68 | pane.update(() => { 69 | scrollPos = pane.scrollY; 70 | }); 71 | pane.setOverscroll(false, false); 72 | } 73 | }, 74 | 75 | button(t, i) { 76 | const button = t.button(Tex.whiteui.tint(rainbow.colours[i]), Styles.clearNoneTogglei, 24, () => { 77 | this.configure(new java.lang.Integer(this.colour == i ? -1 : i)); 78 | Vars.control.input.config.hideConfig(); 79 | }).size(40).get(); 80 | button.update(() => { 81 | button.checked = this.colour == i; 82 | }); 83 | }, 84 | 85 | acceptItem(source, item) { 86 | return this.super$acceptItem(source, item) 87 | // Block if rainbow has a different colour than this one 88 | && (source.block != rainbow || source.get() == this.colour); 89 | }, 90 | 91 | read(read, version) { 92 | this.super$read(read, version); 93 | this.colour = read.b(); 94 | }, 95 | 96 | write(write) { 97 | this.super$write(write); 98 | write.b(this.colour); 99 | }, 100 | 101 | load(colour) { 102 | this.colour = colour; 103 | if (Vars.ui) { 104 | Vars.renderer.minimap.update(this.tile); 105 | } 106 | }, 107 | 108 | get() { 109 | return this.colour; 110 | }, 111 | 112 | config() { 113 | return new java.lang.Integer(this.colour); 114 | }, 115 | 116 | colour: -1 117 | }); 118 | 119 | module.exports = rainbow; 120 | -------------------------------------------------------------------------------- /scripts/routers/solar.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const solar = extend(Router, "solar-router", { 19 | setStats() { 20 | this.super$setStats(); 21 | this.stats.add(this.generationType, this.powerGeneration * 60, StatUnit.powerSecond); 22 | }, 23 | 24 | setBars() { 25 | this.super$setBars(); 26 | this.addBar("power", entity => new Bar( 27 | () => Core.bundle.format("bar.poweroutput", 28 | Strings.fixed(entity.powerProduction * 60 * entity.timeScale, 1)), 29 | () => Pal.powerBar, 30 | () => entity.powerProduction / this.powerGeneration 31 | )); 32 | }, 33 | 34 | efficiency() { 35 | const rules = Vars.state.rules; 36 | const mul = rules.solarPowerMultiplier; 37 | if (mul >= 0) return mul; 38 | 39 | return rules.lighting ? 1 - rules.ambientLight.a : 1 40 | } 41 | }); 42 | 43 | solar.baseExplosiveness = 5; 44 | solar.generationType = Stat.basePowerGeneration; 45 | solar.powerGeneration = 1 / 6; 46 | 47 | solar.buildType = () => extend(Router.RouterBuild, solar, { 48 | updateTile() { 49 | this.super$updateTile(); 50 | this.sun = Math.max(this.sun - 0.003 * this.delta(), 0); 51 | }, 52 | 53 | handleItem(source, item) { 54 | this.super$handleItem(source, item); 55 | this.sun = Math.min(this.sun + 0.1, 1); 56 | }, 57 | 58 | getPowerProduction() { 59 | return solar.powerGeneration * this.sun * solar.efficiency(); 60 | }, 61 | 62 | sun: 0 63 | }); 64 | 65 | module.exports = solar; 66 | -------------------------------------------------------------------------------- /scripts/routers/sprouter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const fruit = extend(Router, "routerfruit", { 19 | }); 20 | 21 | const sprout = extend(Router, "sprouter", { 22 | load() { 23 | this.super$load(); 24 | this.region = Core.atlas.find("routorio-sprouter-plant"); 25 | }, 26 | 27 | canPlaceOn(tile, team) { 28 | return tile.floor() == Blocks.dirt && tile.block() == Blocks.air; 29 | }, 30 | 31 | // Take 40m to 80m of sunlight with no fertilizer 32 | growTime: () => 60 * (60 + Mathf.range(20)), 33 | 34 | // 30s per item eaten 35 | itemValue: 30, 36 | // 10% chance to eat an item 37 | eatChance: 1 / 10 38 | }); 39 | 40 | sprout.buildType = () => extend(Router.RouterBuild, sprout, { 41 | updateTile() { 42 | // TODO: Use daytime and falloff at dusk/dawn 43 | // TODO: Water nearby will speed up growth and fertilization 44 | this.super$updateTile(); 45 | // if (idk) { 46 | this.growth += Time.delta / 60; 47 | // } 48 | if (this.growth >= this.growTime) { 49 | this.growth = 0; 50 | this.tile.setBlock(fruit, this.team, this.rotation); 51 | } 52 | }, 53 | 54 | draw() { 55 | Drawf.shadow(this.x, this.y, 32 * this.size()); 56 | Draw.rect(sprout.region, this.x, this.y); 57 | 58 | const scl = Vars.tilesize * this.growth / this.growTime; 59 | const rot = Mathf.lerp(this.lastRot, scl * 180, 0.02); 60 | this.lastRot = rot; 61 | Draw.rect(fruit.region, this.x, this.y, scl, scl, rot); 62 | }, 63 | 64 | handleItem(source, item) { 65 | if (Mathf.chance(sprout.eatChance)) { 66 | this.growth += sprout.itemValue; 67 | this.heal(1); 68 | if (Vars.ui) { 69 | Fx.healBlockFull.at(this.x, this.y, this.size(), Blocks.mender.baseColor, sprout); 70 | } 71 | } else { 72 | this.super$handleItem(source, item); 73 | } 74 | }, 75 | 76 | size() { 77 | // 0.5 to 1 based on the growth 78 | return 0.5 + (this.growth / this.growTime) / 2; 79 | }, 80 | 81 | read(read, version) { 82 | this.super$read(read, version); 83 | this.growth = read.s(); 84 | this.growTime = read.s(); 85 | }, 86 | 87 | write(write) { 88 | this.super$write(write); 89 | write.s(this.growth); 90 | write.s(this.growTime); 91 | }, 92 | 93 | growTime: sprout.growTime(), 94 | growth: 0, 95 | // Smoothly rotate when fed 96 | lastRot: 0 97 | }); 98 | 99 | module.exports = { 100 | sprouter: sprout, 101 | routerfruit: fruit 102 | }; 103 | -------------------------------------------------------------------------------- /scripts/routers/ubuntium.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const bery = global.routorio.beryllium; 19 | 20 | const ubuntium = extend(Router, "ubuntium-router", { 21 | }); 22 | 23 | // Chance for an item to be turned into Beryllium. 24 | ubuntium.chance = 1 / 30; 25 | 26 | ubuntium.buildType = () => extend(Router.RouterBuild, ubuntium, { 27 | // require unlocking beryllium before ubuntium router, it's not counted as consumption 28 | getDependencies(cons) { 29 | this.super$getDependencies(cons); 30 | 31 | cons.get(bery); 32 | }, 33 | 34 | handleItem(source, item) { 35 | if (Mathf.chance(ubuntium.chance)) { 36 | item = bery; 37 | } 38 | this.super$handleItem(source, item); 39 | } 40 | }); 41 | 42 | module.exports = ubuntium; 43 | -------------------------------------------------------------------------------- /scripts/routers/vulcan.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* "vulcan" instruction */ 19 | // TODO: Overhaul by setting 4 bits for every side, or flipping each bit 20 | 21 | var spock; 22 | 23 | const vars = ["output", "source", "item", "side"]; 24 | 25 | const VulcanI = { 26 | _(builder, key, to, from) { 27 | this.key = key.substr(1); 28 | this.to = builder.var(to); 29 | this.from = builder.var(from); 30 | }, 31 | 32 | run(vm) { 33 | const from = vm.building(this.from); 34 | if (!(from && from.block == spock)) { 35 | return; 36 | } 37 | 38 | if (this.key == "output") { 39 | from.vars.output = vm.num(this.to); 40 | return; 41 | } 42 | 43 | const val = from.vars[this.key]; 44 | if (val == undefined) return; 45 | 46 | vm[typeof(val) == "number" ? "setnum" : "setobj"](this.to, val); 47 | } 48 | }; 49 | 50 | const VulcanStatement = { 51 | new: words => { 52 | const st = extend(LStatement, Object.create(VulcanStatement)); 53 | st.read(words); 54 | return st; 55 | }, 56 | 57 | read(words) { 58 | this.key = words[1]; 59 | this.to = words[2]; 60 | this.from = words[3]; 61 | }, 62 | 63 | build(h) { 64 | if (h instanceof Table) { 65 | return this.buildt(h); 66 | } 67 | 68 | const inst = extend(LExecutor.LInstruction, Object.create(VulcanI)); 69 | inst._(h, this.key, this.to, this.from); 70 | return inst; 71 | }, 72 | 73 | buildt(table) { 74 | const keyf = this.field(table, this.key, text => { 75 | this.key = text; 76 | }).width(150).padRight(0).left().get(); 77 | 78 | const b = new Button(Styles.logict); 79 | b.image(Icon.pencilSmall); 80 | 81 | b.clicked(() => this.showSelectTable(b, (t, hide) => { 82 | const list = new Table(); 83 | for (var i of vars) { 84 | const name = "@" + i; 85 | list.button(i == "output" ? "[accent]" + name : name, () => { 86 | this.key = name; 87 | keyf.text = name; 88 | hide.run(); 89 | }).size(240, 40).row(); 90 | } 91 | 92 | t.add(list).width(240).left(); 93 | })); 94 | table.add(b).size(40).padLeft(-1).color(table.color); 95 | 96 | // takes 2 columns so that it doesnt do a weird ui thing 97 | table.label(() => this.key == "@output" ? "=" : "->").left().marginLeft(10); 98 | this.row(table); 99 | 100 | this.field(table, this.to, text => {this.to = text}); 101 | 102 | table.add(" in "); 103 | this.field(table, this.from, text => {this.from = text}); 104 | }, 105 | 106 | write(builder) { 107 | builder.append("vulcan "); 108 | builder.append(this.key + ""); 109 | builder.append(" "); 110 | builder.append(this.to + ""); 111 | builder.append(" "); 112 | builder.append(this.from + ""); 113 | }, 114 | 115 | name: () => "Vulcan Router", 116 | color: () => Pal.logicBlocks 117 | }; 118 | 119 | /* Mimic @RegisterStatement */ 120 | LAssembler.customParsers.put("vulcan", func(VulcanStatement.new)); 121 | 122 | LogicIO.allStatements.add(prov(() => VulcanStatement.new([ 123 | "vulcan", 124 | "@output", 125 | "side", 126 | "router1" 127 | ]))); 128 | 129 | spock = extend(Router, "vulcan-router", {}); 130 | 131 | spock.buildType = () => extend(Router.RouterBuild, spock, { 132 | getTileTarget(item, from, set) { 133 | const dir = this._vars.output; 134 | if (dir == -1) return null; 135 | const tile = this.tile.nearby(Mathf.mod(dir, 4)); 136 | if (!tile || !tile.build) return null; 137 | this._vars.output = -1; 138 | return tile.build.acceptItem(this, item) ? tile.build : null; 139 | }, 140 | 141 | handleItem(source, item) { 142 | this.super$handleItem(source, item); 143 | this._vars.source = source; 144 | this._vars.item = item; 145 | this._vars.side = source.tile.relativeTo(this.tile); 146 | }, 147 | 148 | acceptItem(source, item) { 149 | return this.power.status >= 1 150 | && this.team == source.team 151 | && this.items.total() == 0; 152 | }, 153 | 154 | getVars() {return this._vars}, 155 | setVars(set) {this._vars = set}, 156 | 157 | _vars: { 158 | output: -1, 159 | side: -1, 160 | source: null, 161 | item: null 162 | } 163 | }); 164 | 165 | module.exports = spock; 166 | -------------------------------------------------------------------------------- /scripts/routers/xmas.js: -------------------------------------------------------------------------------- 1 | importPackage(Packages.java.time); 2 | const r = global.routorio; 3 | 4 | function isDec() { 5 | return LocalDate.now().monthValue == 12; 6 | } 7 | 8 | const xmas = extend(Router, "xmas-router", { 9 | load() { 10 | this.super$load(); 11 | 12 | this.description = Core.bundle.get("block." + this.name + ".description." + (this.ready() ? "ready" : "early")); 13 | 14 | const variants = []; 15 | for (var i = 0; i < 6; i++) { 16 | variants[i] = Core.atlas.find(this.name + "_" + (i + 1)); 17 | } 18 | this.variantRegions = variants; 19 | }, 20 | 21 | init() { 22 | this.super$init(); 23 | 24 | // Wrapping paper is worthless when opening 25 | if (this.ready()) { 26 | //this.requirements = []; 27 | } 28 | 29 | for (var block of Vars.content.blocks().items) { 30 | if (block instanceof Router && block.id != this.id) { 31 | this.routers.push(block); 32 | } 33 | } 34 | }, 35 | 36 | loadIcons() { 37 | this.fullIcon = Core.atlas.find(this.name + "_1"); 38 | this.uiIcon = this.fullIcon; 39 | }, 40 | 41 | icons() { 42 | return [Core.atlas.find(this.name + "_1")]; 43 | }, 44 | 45 | canPlaceOn(tile, time) { 46 | return isDec() && !this.ready(); 47 | }, 48 | 49 | ready() { 50 | return isDec() && LocalDate.now().dayOfMonth > 24; 51 | }, 52 | 53 | open(tile, team) { 54 | const x = tile.x; 55 | const y = tile.y; 56 | var router; 57 | // Select a random researched router 58 | while (!router) { 59 | var index = Mathf.random(0, this.routers.length - 1); 60 | router = this.routers[Math.floor(index)]; 61 | // if router is too advanced or is too big 62 | if (!router.unlockedNow() || !Build.validPlace(router, team, x, y, 0)) { 63 | router = null; 64 | } 65 | } 66 | 67 | tile.setNet(router, team, 0); 68 | }, 69 | 70 | /* Predefine non-Router routers */ 71 | routers: [ 72 | r.fusion, 73 | r.inverted 74 | ] 75 | }); 76 | 77 | // Save server JavaAdapter lag 78 | if (!Vars.headless) { 79 | xmas.buildType = () => extend(Router.RouterBuild, xmas, { 80 | draw() { 81 | Draw.rect(this.region, this.x, this.y); 82 | }, 83 | 84 | created() { 85 | this.super$created(); 86 | const index = Mathf.randomSeed(this.pos(), 0, xmas.variantRegions.length - 1); 87 | this.region = xmas.variantRegions[Math.floor(index)]; 88 | }, 89 | 90 | region: null 91 | }); 92 | } 93 | 94 | // Break after xmas eve to open 95 | Events.on(BlockBuildEndEvent, e => { 96 | if (!e.breaking || Vars.net.client()) return; 97 | // just in case something with no building is destroyed 98 | if (!e.tile.build) return; 99 | const block = e.tile.build.cblock; 100 | if (!block || block.id != xmas.id) return; 101 | if (!xmas.ready()) return; 102 | 103 | Core.app.post(() => { 104 | xmas.open(e.tile, e.team); 105 | }); 106 | }); 107 | 108 | module.exports = xmas; 109 | -------------------------------------------------------------------------------- /scripts/units/reverout.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // TODO: add little router guns 19 | /* .===. 20 | |--\| 21 | |.o|| 22 | |..'| 23 | .===. 24 | .=. 25 | |o| 26 | .=. */ 27 | const register = require("routorio/lib/register"); 28 | 29 | const offset = 1.6 * Vars.tilesize; 30 | const dist = Math.sqrt(2 * offset * offset) 31 | 32 | const routors = [ 33 | 1, 1, 34 | 1, -1, 35 | -1, -1, 36 | -1, 1 37 | ]; 38 | 39 | const reverout = extend(UnitType, "reverout", { 40 | load() { 41 | this.super$load(); 42 | this.region = Core.atlas.find(this.name); 43 | this.rotor = Core.atlas.find("router"); 44 | } 45 | }); 46 | 47 | reverout.constructor = () => extend(UnitEntity, { 48 | draw() { 49 | this.super$draw(); 50 | 51 | const r = this.rotation; 52 | const sin = Mathf.sin(r) * dist; 53 | const cos = Mathf.cos(r) * dist; 54 | var x, y; 55 | 56 | for (var i = 0; i < 8; i += 2) { 57 | x = routors[i] * offset; 58 | y = routors[i + 1] * offset; 59 | Draw.rect(reverout.rotor, 60 | this.x + Angles.trnsx(r, x, y), 61 | this.y + Angles.trnsy(r, x, y), 62 | r + Time.time * 20); 63 | } 64 | }, 65 | 66 | classId: () => reverout.classId 67 | }); 68 | 69 | register(reverout); 70 | 71 | module.exports = reverout; 72 | -------------------------------------------------------------------------------- /scripts/units/router-chainer.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /* Factory for routorio's units */ 19 | 20 | const UnitPlan = UnitFactory.UnitPlan; 21 | const routorio = global.routorio; 22 | 23 | const chainer = extend(UnitFactory, "router-chainer", { 24 | init() { 25 | // TODO: Use reconstructor for sexy -> chain -> reverout? 26 | // TODO: balance unit costs in respect to dagger -> crawler -> azimuth 27 | chainer.plans = Seq.with( 28 | new UnitPlan(routorio["sexy-router"], 60 * 5, 29 | ItemStack.with(Items.silicon, 5, Items.copper, 6)), 30 | new UnitPlan(routorio.routerpede, 60 * 20, 31 | ItemStack.with(Items.silicon, 30, Items.graphite, 80)), 32 | new UnitPlan(routorio.reverout, 60 * 30, 33 | ItemStack.with(Items.silicon, 120, Items.titanium, 70, Items.graphite, 160))); 34 | 35 | this.super$init(); 36 | }, 37 | 38 | load() { 39 | this.super$load(); 40 | this.topRegion = this.outRegion = Core.atlas.find("clear"); 41 | 42 | this.region = Core.atlas.find(this.name + "-base"); 43 | this.router = Core.atlas.find("router"); 44 | this.surge = Core.atlas.find("routorio-surge-router"); 45 | 46 | this.laser = Core.atlas.find("laser"); 47 | this.laserEnd = Core.atlas.find("laser-end"); 48 | } 49 | }); 50 | 51 | chainer.buildType = () => extend(UnitFactory.UnitFactoryBuild, chainer, { 52 | draw() { 53 | const dx = this.x, dy = this.y; 54 | Draw.rect(chainer.region, dx, dy); 55 | Draw.z(Layer.turret); 56 | 57 | this.rot = Mathf.lerp(this.rot, Math.min(this.efficiency, 1) * this.timeScale, 0.02); 58 | const rot = Time.time * this.rot; 59 | const chaining = this.efficiency > 0; 60 | 61 | this.dist = Mathf.lerp(this.dist, this.plan 62 | ? this.plan.type.size / 40 63 | : 4 * this.rot + 8, 0.04); 64 | 65 | for (var i = 0; i < 8; i++) { 66 | var angle = rot + 360 * i / 8; 67 | var x = dx + Angles.trnsx(angle, this.dist); 68 | var y = dy + Angles.trnsy(angle, this.dist); 69 | 70 | if (chaining) { 71 | Drawf.laser(chainer.laser, chainer.laserEnd, 72 | // imaginary = hide laser 73 | x, y, dx, dy, Math.sqrt(Math.sin(angle / 50) / 5)); 74 | // Surge routers face the center when at max dist 75 | Draw.rect(chainer.surge, x, y, angle); //Mathf.slerp(0, angle,this.dist / 24)); 76 | } else { 77 | Draw.rect(chainer.router, x, y); 78 | } 79 | } 80 | }, 81 | 82 | // Routers start by folding out 83 | dist: 0, 84 | rot: 0 85 | }); 86 | 87 | module.exports = chainer; 88 | -------------------------------------------------------------------------------- /scripts/units/routerpede.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) deltanedas 2024 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | const routorio = global.routorio; 19 | const register = require("routorio/lib/register"); 20 | 21 | const viewport = new Rect(); 22 | 23 | function onScreen(pos) { 24 | return viewport.overlaps(pos.x, pos.y, 16, 16); 25 | } 26 | 27 | // Similar to the chain blaster, except TODO fires extra shots when chained. 28 | const weapon = new Weapon("chain-router"); 29 | Object.assign(weapon, { 30 | reload: 15, 31 | alternate: false, 32 | ejectEffect: Fx.coreLandDust, 33 | bullet: extend(BasicBulletType, 2.5, 9, { 34 | width: 7, 35 | height: 9, 36 | lifetime: 60 37 | }) 38 | }); 39 | 40 | const routerpede = extend(UnitType, "routerpede", { 41 | load() { 42 | this.super$load(); 43 | this.region = Core.atlas.find("router"); 44 | this.legRegion = Core.atlas.find(this.name + "-leg"); 45 | this.baseRegion = Core.atlas.find("clear"); 46 | } 47 | }); 48 | 49 | routerpede.constructor = () => extend(MechUnit, { 50 | update() { 51 | this.super$update(); 52 | const closest = Units.closest(this.team, this.x, this.y, routerpede.chainRadius, boolf(unit => { 53 | return unit !== this && unit.routerSegments !== undefined 54 | // The bigger chain consumes the smaller one 55 | && unit.routerSegments().length <= this.segments.length 56 | // Max 255 segments 57 | && unit.routerSegments().length + this.segments.length < 256; 58 | })); 59 | 60 | if (closest) { 61 | // Merge the others segments 62 | const segments = closest.routerSegments(); 63 | for (var i in segments) { 64 | this.push(); 65 | } 66 | 67 | // Then consume it 68 | this.push(); 69 | closest.kill(); 70 | } 71 | }, 72 | 73 | draw() { 74 | this.drawSingle(); 75 | 76 | if (this.segments.length > 0) { 77 | this.updateseg(0, this); 78 | for (var i = 1; i < this.segments.length; i++) { 79 | this.updateseg(i, this.segments[i - 1]); 80 | } 81 | } 82 | 83 | this.super$draw(); 84 | }, 85 | 86 | damage(amount, withEffect) { 87 | if (withEffect !== undefined) { 88 | this.super$damage(amount, withEffect); 89 | } else { 90 | this.super$damage(amount); 91 | } 92 | 93 | if (this.segments.length == 0) return; 94 | 95 | const remove = this.segments.length - (this.health / routerpede.health); 96 | for (var i = 0; i < remove; i++) { 97 | this.pop(); 98 | } 99 | }, 100 | 101 | writeSave(write, net) { 102 | this.super$writeSave(write, net === undefined ? false : net); 103 | write.b(this.segments.length); 104 | }, 105 | 106 | readSave(read, version) { 107 | this.super$readSave(read, version); 108 | const count = read.b(); 109 | // Saving each segment is wasteful, just recreate them 110 | for (var i = 0; i < count; i++) { 111 | this.push(); 112 | } 113 | }, 114 | 115 | classId: () => routerpede.classId, 116 | 117 | // Drag and draw a segment 118 | updateseg(i, to) { 119 | const seg = this.segments[i]; 120 | const nextAngle = Angles.angle(seg.x, seg.y, to.x, to.y); 121 | const nextDist = Mathf.dst(seg.x, seg.y, to.x, to.y); 122 | 123 | // Lerp if moving too far away 124 | if (nextDist > Vars.tilesize) { 125 | seg.rotation = Mathf.slerp(seg.rotation, to.rotation, 0.07); 126 | seg.x = Mathf.lerp(seg.x, to.x - Angles.trnsx(seg.rotation, Vars.tilesize), Time.delta / routerpede.speed); 127 | seg.y = Mathf.lerp(seg.y, to.y - Angles.trnsy(seg.rotation, Vars.tilesize), Time.delta / routerpede.speed); 128 | } 129 | 130 | if (!onScreen(seg)) return; 131 | 132 | const old = {x: this.x, y: this.y, rotation: this.rotation}; 133 | Object.assign(this, seg); 134 | this.drawSingle(); 135 | Object.assign(this, old); 136 | }, 137 | 138 | drawSingle() { 139 | // Draw legs and router individually vs draw() to avoid recursion 140 | routerpede.drawMech(this); 141 | Draw.rect(routerpede.region, this.x, this.y, this.rotation); 142 | }, 143 | 144 | // Add a router to the chain 145 | push() { 146 | const last = this.segments[this.segments.length - 1] || this; 147 | this.segments.push({ 148 | x: last.x - Angles.trnsx(last.rotation, Vars.tilesize), 149 | y: last.y - Angles.trnsy(last.rotation, Vars.tilesize), 150 | rotation: last.rotation 151 | }); 152 | this.health += routerpede.health; 153 | }, 154 | 155 | // Kill a router and create an effect if on the client 156 | pop() { 157 | const seg = this.segments.pop(); 158 | if (Vars.ui && seg) { 159 | Effect.scorch(seg.x, seg.y, 2); 160 | Effect.create(Fx.explosion, seg.x, seg.y); 161 | // Less shake than if it fully died 162 | Effect.shake(1, 1, seg.x, seg.y); 163 | } 164 | }, 165 | 166 | // Used in chain merging 167 | routerSegments() { 168 | return this.segments; 169 | }, 170 | 171 | segments: [] 172 | }); 173 | 174 | // 1 tile radius for absorbing other chain routers 175 | routerpede.chainRadius = Vars.tilesize; 176 | routerpede.weapons.add(weapon); 177 | 178 | // Update viewport for rendering stuff 179 | Events.run(Trigger.preDraw, () => { 180 | Core.camera.bounds(viewport); 181 | }); 182 | 183 | register(routerpede); 184 | 185 | module.exports = routerpede; 186 | -------------------------------------------------------------------------------- /scripts/units/sexy-router.js: -------------------------------------------------------------------------------- 1 | const sexy = extend(UnitType, "sexy-router", {}); 2 | 3 | sexy.constructor = () => extend(MechUnit, {}); 4 | 5 | // Sexy router just uses MechUnit, no need for extra class id 6 | 7 | module.exports = sexy; 8 | -------------------------------------------------------------------------------- /sprites-override/distributor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites-override/distributor.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/alien-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/alien-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/clear-router-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/clear-router-bottom.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/clear-router-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/clear-router-top.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/clear-router.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/clear-router.kra -------------------------------------------------------------------------------- /sprites/blocks/distribution/clear-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/clear-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/colossus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/colossus.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/distributor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/distributor.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/double-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/double-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/double-router_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/double-router_0.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/double-router_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/double-router_1.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/explosive-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/explosive-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/incinerouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/incinerouter.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/inverted-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/inverted-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/lobotorout-edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/lobotorout-edge.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/lobotorout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/lobotorout.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/op-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/op-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/op-router_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/op-router_0.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/op-router_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/op-router_1.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/op-router_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/op-router_2.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/op-router_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/op-router_3.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/plasma-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/plasma-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/rainbow-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/rainbow-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/titanium-double-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/titanium-double-router.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/titanium-double-router_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/titanium-double-router_0.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/titanium-double-router_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/titanium-double-router_1.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/xmas/xmas-router_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/xmas/xmas-router_1.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/xmas/xmas-router_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/xmas/xmas-router_2.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/xmas/xmas-router_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/xmas/xmas-router_3.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/xmas/xmas-router_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/xmas/xmas-router_4.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/xmas/xmas-router_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/xmas/xmas-router_5.png -------------------------------------------------------------------------------- /sprites/blocks/distribution/xmas/xmas-router_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/distribution/xmas/xmas-router_6.png -------------------------------------------------------------------------------- /sprites/blocks/logic/holorouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/logic/holorouter.png -------------------------------------------------------------------------------- /sprites/blocks/logic/vulcan-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/logic/vulcan-router.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/payload-conduit-edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/payload-conduit-edge.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/payload-conduit-glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/payload-conduit-glass.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/payload-conduit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/payload-conduit-icon.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/payload-conduit-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/payload-conduit-top.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/payload-conduit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/payload-conduit.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/routoid-assembler-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/routoid-assembler-out.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/routoid-assembler-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/routoid-assembler-top.png -------------------------------------------------------------------------------- /sprites/blocks/payloads/routoid-assembler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/payloads/routoid-assembler.png -------------------------------------------------------------------------------- /sprites/blocks/power/arc-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/arc-router.png -------------------------------------------------------------------------------- /sprites/blocks/power/electric-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/electric-router.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-corner_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-corner_0.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-corner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-corner_1.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-corner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-corner_2.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-corner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-corner_3.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-edge_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-edge_0.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-edge_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-edge_1.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-icorner_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-icorner_0.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-icorner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-icorner_1.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-icorner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-icorner_2.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-icorner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-icorner_3.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router-top.png -------------------------------------------------------------------------------- /sprites/blocks/power/fusion-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/fusion-router.png -------------------------------------------------------------------------------- /sprites/blocks/power/magnet-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/magnet-router.png -------------------------------------------------------------------------------- /sprites/blocks/power/moderouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/moderouter.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-base.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-corner_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-corner_0.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-corner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-corner_1.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-corner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-corner_2.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-corner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-corner_3.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-edge_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-edge_0.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-edge_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-edge_1.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-icorner_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-icorner_0.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-icorner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-icorner_1.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-icorner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-icorner_2.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router-icorner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router-icorner_3.png -------------------------------------------------------------------------------- /sprites/blocks/power/phase-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/phase-router.png -------------------------------------------------------------------------------- /sprites/blocks/power/solar-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/power/solar-router.png -------------------------------------------------------------------------------- /sprites/blocks/production/routerfruit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/production/routerfruit.png -------------------------------------------------------------------------------- /sprites/blocks/production/sprouter-plant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/production/sprouter-plant.png -------------------------------------------------------------------------------- /sprites/blocks/production/sprouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/production/sprouter.png -------------------------------------------------------------------------------- /sprites/blocks/production/ubuntium-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/production/ubuntium-router.png -------------------------------------------------------------------------------- /sprites/blocks/turrets/combat-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/turrets/combat-router.png -------------------------------------------------------------------------------- /sprites/blocks/turrets/totally-4-distributors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/turrets/totally-4-distributors.png -------------------------------------------------------------------------------- /sprites/blocks/units/router-chainer-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/units/router-chainer-base.png -------------------------------------------------------------------------------- /sprites/blocks/units/router-chainer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/blocks/units/router-chainer.png -------------------------------------------------------------------------------- /sprites/items/beryllium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/items/beryllium.png -------------------------------------------------------------------------------- /sprites/items/liquid-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/items/liquid-router.png -------------------------------------------------------------------------------- /sprites/items/neutron-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/items/neutron-router.png -------------------------------------------------------------------------------- /sprites/ui/button-buffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/button-buffer.png -------------------------------------------------------------------------------- /sprites/ui/button-equals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/button-equals.png -------------------------------------------------------------------------------- /sprites/ui/button-greater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/button-greater.png -------------------------------------------------------------------------------- /sprites/ui/button-less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/button-less.png -------------------------------------------------------------------------------- /sprites/ui/button-not.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/button-not.png -------------------------------------------------------------------------------- /sprites/ui/button-rate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/button-rate.png -------------------------------------------------------------------------------- /sprites/ui/god.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/god.png -------------------------------------------------------------------------------- /sprites/ui/white-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/ui/white-router.png -------------------------------------------------------------------------------- /sprites/units/reverout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/reverout.png -------------------------------------------------------------------------------- /sprites/units/routerpede-leg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/routerpede-leg.png -------------------------------------------------------------------------------- /sprites/units/routerpede.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/routerpede.png -------------------------------------------------------------------------------- /sprites/units/sexy-router-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/sexy-router-base.png -------------------------------------------------------------------------------- /sprites/units/sexy-router-leg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/sexy-router-leg.png -------------------------------------------------------------------------------- /sprites/units/sexy-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/sexy-router.png -------------------------------------------------------------------------------- /sprites/units/weapons/reverout-weapon-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/weapons/reverout-weapon-outline.png -------------------------------------------------------------------------------- /sprites/units/weapons/reverout-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/units/weapons/reverout-weapon.png -------------------------------------------------------------------------------- /sprites/zones/lavaflow-zone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deltanedas/routorio-old/dc91b5123d7553eb0d71505989d1f581195b2da3/sprites/zones/lavaflow-zone.png --------------------------------------------------------------------------------