diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/anim/coin_bundle.zip b/anim/coin_bundle.zip new file mode 100644 index 0000000..cd88f65 Binary files /dev/null and b/anim/coin_bundle.zip differ diff --git a/anim/goldstaff.zip b/anim/goldstaff.zip new file mode 100644 index 0000000..03076ae Binary files /dev/null and b/anim/goldstaff.zip differ diff --git a/anim/luckamulet.zip b/anim/luckamulet.zip new file mode 100644 index 0000000..97d3345 Binary files /dev/null and b/anim/luckamulet.zip differ diff --git a/anim/secoin.zip b/anim/secoin.zip new file mode 100644 index 0000000..79f1c8a Binary files /dev/null and b/anim/secoin.zip differ diff --git a/anim/stealer.zip b/anim/stealer.zip new file mode 100644 index 0000000..3f1b06b Binary files /dev/null and b/anim/stealer.zip differ diff --git a/anim/vipcard.zip b/anim/vipcard.zip new file mode 100644 index 0000000..6bae6c7 Binary files /dev/null and b/anim/vipcard.zip differ diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..72ee214 Binary files /dev/null and b/icon.png differ diff --git a/images/inventoryimages/coin_bundle.tex b/images/inventoryimages/coin_bundle.tex new file mode 100644 index 0000000..bc5d4d0 Binary files /dev/null and b/images/inventoryimages/coin_bundle.tex differ diff --git a/images/inventoryimages/coin_bundle.xml b/images/inventoryimages/coin_bundle.xml new file mode 100644 index 0000000..9e84ede --- /dev/null +++ b/images/inventoryimages/coin_bundle.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/inventoryimages/goldstaff.tex b/images/inventoryimages/goldstaff.tex new file mode 100644 index 0000000..91cc41e Binary files /dev/null and b/images/inventoryimages/goldstaff.tex differ diff --git a/images/inventoryimages/goldstaff.xml b/images/inventoryimages/goldstaff.xml new file mode 100644 index 0000000..3fc6093 --- /dev/null +++ b/images/inventoryimages/goldstaff.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/inventoryimages/luckamulet.tex b/images/inventoryimages/luckamulet.tex new file mode 100644 index 0000000..0a16e7e Binary files /dev/null and b/images/inventoryimages/luckamulet.tex differ diff --git a/images/inventoryimages/luckamulet.xml b/images/inventoryimages/luckamulet.xml new file mode 100644 index 0000000..a3586e7 --- /dev/null +++ b/images/inventoryimages/luckamulet.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/inventoryimages/secoin.tex b/images/inventoryimages/secoin.tex new file mode 100644 index 0000000..3f41055 Binary files /dev/null and b/images/inventoryimages/secoin.tex differ diff --git a/images/inventoryimages/secoin.xml b/images/inventoryimages/secoin.xml new file mode 100644 index 0000000..c2999a0 --- /dev/null +++ b/images/inventoryimages/secoin.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/inventoryimages/stealer.tex b/images/inventoryimages/stealer.tex new file mode 100644 index 0000000..82eff9e Binary files /dev/null and b/images/inventoryimages/stealer.tex differ diff --git a/images/inventoryimages/stealer.xml b/images/inventoryimages/stealer.xml new file mode 100644 index 0000000..42c482c --- /dev/null +++ b/images/inventoryimages/stealer.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/inventoryimages/vipcard.tex b/images/inventoryimages/vipcard.tex new file mode 100644 index 0000000..ce59c16 Binary files /dev/null and b/images/inventoryimages/vipcard.tex differ diff --git a/images/inventoryimages/vipcard.xml b/images/inventoryimages/vipcard.xml new file mode 100644 index 0000000..3be5bdb --- /dev/null +++ b/images/inventoryimages/vipcard.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/back.tex b/images/sehud/back.tex new file mode 100644 index 0000000..58d2c2c Binary files /dev/null and b/images/sehud/back.tex differ diff --git a/images/sehud/back.xml b/images/sehud/back.xml new file mode 100644 index 0000000..6670910 --- /dev/null +++ b/images/sehud/back.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bg.tex b/images/sehud/bg.tex new file mode 100644 index 0000000..784d3ae Binary files /dev/null and b/images/sehud/bg.tex differ diff --git a/images/sehud/bg.xml b/images/sehud/bg.xml new file mode 100644 index 0000000..69011e5 --- /dev/null +++ b/images/sehud/bg.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bg_2.tex b/images/sehud/bg_2.tex new file mode 100644 index 0000000..129506f Binary files /dev/null and b/images/sehud/bg_2.tex differ diff --git a/images/sehud/bg_2.xml b/images/sehud/bg_2.xml new file mode 100644 index 0000000..838b5a9 --- /dev/null +++ b/images/sehud/bg_2.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/0.tex b/images/sehud/bignums/0.tex new file mode 100644 index 0000000..af43713 Binary files /dev/null and b/images/sehud/bignums/0.tex differ diff --git a/images/sehud/bignums/0.xml b/images/sehud/bignums/0.xml new file mode 100644 index 0000000..9f5d088 --- /dev/null +++ b/images/sehud/bignums/0.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/1.tex b/images/sehud/bignums/1.tex new file mode 100644 index 0000000..89ab527 Binary files /dev/null and b/images/sehud/bignums/1.tex differ diff --git a/images/sehud/bignums/1.xml b/images/sehud/bignums/1.xml new file mode 100644 index 0000000..e1700b5 --- /dev/null +++ b/images/sehud/bignums/1.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/2.tex b/images/sehud/bignums/2.tex new file mode 100644 index 0000000..a2b9022 Binary files /dev/null and b/images/sehud/bignums/2.tex differ diff --git a/images/sehud/bignums/2.xml b/images/sehud/bignums/2.xml new file mode 100644 index 0000000..a0d182f --- /dev/null +++ b/images/sehud/bignums/2.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/3.tex b/images/sehud/bignums/3.tex new file mode 100644 index 0000000..2ac010c Binary files /dev/null and b/images/sehud/bignums/3.tex differ diff --git a/images/sehud/bignums/3.xml b/images/sehud/bignums/3.xml new file mode 100644 index 0000000..c068638 --- /dev/null +++ b/images/sehud/bignums/3.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/4.tex b/images/sehud/bignums/4.tex new file mode 100644 index 0000000..d25042e Binary files /dev/null and b/images/sehud/bignums/4.tex differ diff --git a/images/sehud/bignums/4.xml b/images/sehud/bignums/4.xml new file mode 100644 index 0000000..f76161e --- /dev/null +++ b/images/sehud/bignums/4.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/5.tex b/images/sehud/bignums/5.tex new file mode 100644 index 0000000..113e988 Binary files /dev/null and b/images/sehud/bignums/5.tex differ diff --git a/images/sehud/bignums/5.xml b/images/sehud/bignums/5.xml new file mode 100644 index 0000000..3b47cbd --- /dev/null +++ b/images/sehud/bignums/5.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/6.tex b/images/sehud/bignums/6.tex new file mode 100644 index 0000000..bce76e7 Binary files /dev/null and b/images/sehud/bignums/6.tex differ diff --git a/images/sehud/bignums/6.xml b/images/sehud/bignums/6.xml new file mode 100644 index 0000000..7e947e5 --- /dev/null +++ b/images/sehud/bignums/6.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/7.tex b/images/sehud/bignums/7.tex new file mode 100644 index 0000000..389a588 Binary files /dev/null and b/images/sehud/bignums/7.tex differ diff --git a/images/sehud/bignums/7.xml b/images/sehud/bignums/7.xml new file mode 100644 index 0000000..43e5076 --- /dev/null +++ b/images/sehud/bignums/7.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/8.tex b/images/sehud/bignums/8.tex new file mode 100644 index 0000000..fba5289 Binary files /dev/null and b/images/sehud/bignums/8.tex differ diff --git a/images/sehud/bignums/8.xml b/images/sehud/bignums/8.xml new file mode 100644 index 0000000..b26446d --- /dev/null +++ b/images/sehud/bignums/8.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/bignums/9.tex b/images/sehud/bignums/9.tex new file mode 100644 index 0000000..a022f7a Binary files /dev/null and b/images/sehud/bignums/9.tex differ diff --git a/images/sehud/bignums/9.xml b/images/sehud/bignums/9.xml new file mode 100644 index 0000000..7fa86eb --- /dev/null +++ b/images/sehud/bignums/9.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/close.tex b/images/sehud/close.tex new file mode 100644 index 0000000..5333c31 Binary files /dev/null and b/images/sehud/close.tex differ diff --git a/images/sehud/close.xml b/images/sehud/close.xml new file mode 100644 index 0000000..e565b71 --- /dev/null +++ b/images/sehud/close.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/cloth_act_cn.tex b/images/sehud/cloth_act_cn.tex new file mode 100644 index 0000000..dbb73b7 Binary files /dev/null and b/images/sehud/cloth_act_cn.tex differ diff --git a/images/sehud/cloth_act_cn.xml b/images/sehud/cloth_act_cn.xml new file mode 100644 index 0000000..91922b5 --- /dev/null +++ b/images/sehud/cloth_act_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/cloth_act_en.tex b/images/sehud/cloth_act_en.tex new file mode 100644 index 0000000..56abbd3 Binary files /dev/null and b/images/sehud/cloth_act_en.tex differ diff --git a/images/sehud/cloth_act_en.xml b/images/sehud/cloth_act_en.xml new file mode 100644 index 0000000..fd33b45 --- /dev/null +++ b/images/sehud/cloth_act_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/cloth_dact_cn.tex b/images/sehud/cloth_dact_cn.tex new file mode 100644 index 0000000..9fd7c51 Binary files /dev/null and b/images/sehud/cloth_dact_cn.tex differ diff --git a/images/sehud/cloth_dact_cn.xml b/images/sehud/cloth_dact_cn.xml new file mode 100644 index 0000000..7c70877 --- /dev/null +++ b/images/sehud/cloth_dact_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/cloth_dact_en.tex b/images/sehud/cloth_dact_en.tex new file mode 100644 index 0000000..74b6f9b Binary files /dev/null and b/images/sehud/cloth_dact_en.tex differ diff --git a/images/sehud/cloth_dact_en.xml b/images/sehud/cloth_dact_en.xml new file mode 100644 index 0000000..7945b8d --- /dev/null +++ b/images/sehud/cloth_dact_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/exp_act.tex b/images/sehud/exp_act.tex new file mode 100644 index 0000000..c8e28b7 Binary files /dev/null and b/images/sehud/exp_act.tex differ diff --git a/images/sehud/exp_act.xml b/images/sehud/exp_act.xml new file mode 100644 index 0000000..7723cf1 --- /dev/null +++ b/images/sehud/exp_act.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/exp_dact.tex b/images/sehud/exp_dact.tex new file mode 100644 index 0000000..284182f Binary files /dev/null and b/images/sehud/exp_dact.tex differ diff --git a/images/sehud/exp_dact.xml b/images/sehud/exp_dact.xml new file mode 100644 index 0000000..0f8993e --- /dev/null +++ b/images/sehud/exp_dact.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/expmask.tex b/images/sehud/expmask.tex new file mode 100644 index 0000000..264ed86 Binary files /dev/null and b/images/sehud/expmask.tex differ diff --git a/images/sehud/expmask.xml b/images/sehud/expmask.xml new file mode 100644 index 0000000..2e4ea56 --- /dev/null +++ b/images/sehud/expmask.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/food_act_cn.tex b/images/sehud/food_act_cn.tex new file mode 100644 index 0000000..24b32eb Binary files /dev/null and b/images/sehud/food_act_cn.tex differ diff --git a/images/sehud/food_act_cn.xml b/images/sehud/food_act_cn.xml new file mode 100644 index 0000000..691cfb2 --- /dev/null +++ b/images/sehud/food_act_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/food_act_en.tex b/images/sehud/food_act_en.tex new file mode 100644 index 0000000..7b38882 Binary files /dev/null and b/images/sehud/food_act_en.tex differ diff --git a/images/sehud/food_act_en.xml b/images/sehud/food_act_en.xml new file mode 100644 index 0000000..bcc4838 --- /dev/null +++ b/images/sehud/food_act_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/food_dact_cn.tex b/images/sehud/food_dact_cn.tex new file mode 100644 index 0000000..5460714 Binary files /dev/null and b/images/sehud/food_dact_cn.tex differ diff --git a/images/sehud/food_dact_cn.xml b/images/sehud/food_dact_cn.xml new file mode 100644 index 0000000..c861b18 --- /dev/null +++ b/images/sehud/food_dact_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/food_dact_en.tex b/images/sehud/food_dact_en.tex new file mode 100644 index 0000000..40c7854 Binary files /dev/null and b/images/sehud/food_dact_en.tex differ diff --git a/images/sehud/food_dact_en.xml b/images/sehud/food_dact_en.xml new file mode 100644 index 0000000..db233b1 --- /dev/null +++ b/images/sehud/food_dact_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/hudcoin.tex b/images/sehud/hudcoin.tex new file mode 100644 index 0000000..b0093fc Binary files /dev/null and b/images/sehud/hudcoin.tex differ diff --git a/images/sehud/hudcoin.xml b/images/sehud/hudcoin.xml new file mode 100644 index 0000000..5502de1 --- /dev/null +++ b/images/sehud/hudcoin.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/infoback.tex b/images/sehud/infoback.tex new file mode 100644 index 0000000..a6ed92b Binary files /dev/null and b/images/sehud/infoback.tex differ diff --git a/images/sehud/infoback.xml b/images/sehud/infoback.xml new file mode 100644 index 0000000..df69cfd --- /dev/null +++ b/images/sehud/infoback.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/infobutton.tex b/images/sehud/infobutton.tex new file mode 100644 index 0000000..386dc86 Binary files /dev/null and b/images/sehud/infobutton.tex differ diff --git a/images/sehud/infobutton.xml b/images/sehud/infobutton.xml new file mode 100644 index 0000000..2c91e44 --- /dev/null +++ b/images/sehud/infobutton.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/infopage_cn.tex b/images/sehud/infopage_cn.tex new file mode 100644 index 0000000..0bc9fe8 Binary files /dev/null and b/images/sehud/infopage_cn.tex differ diff --git a/images/sehud/infopage_cn.xml b/images/sehud/infopage_cn.xml new file mode 100644 index 0000000..3afa9bf --- /dev/null +++ b/images/sehud/infopage_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/infopage_en.tex b/images/sehud/infopage_en.tex new file mode 100644 index 0000000..3cba8b6 Binary files /dev/null and b/images/sehud/infopage_en.tex differ diff --git a/images/sehud/infopage_en.xml b/images/sehud/infopage_en.xml new file mode 100644 index 0000000..eab71dd --- /dev/null +++ b/images/sehud/infopage_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/level_act.tex b/images/sehud/level_act.tex new file mode 100644 index 0000000..589173f Binary files /dev/null and b/images/sehud/level_act.tex differ diff --git a/images/sehud/level_act.xml b/images/sehud/level_act.xml new file mode 100644 index 0000000..b4f02f0 --- /dev/null +++ b/images/sehud/level_act.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/level_dact.tex b/images/sehud/level_dact.tex new file mode 100644 index 0000000..7c40b7b Binary files /dev/null and b/images/sehud/level_dact.tex differ diff --git a/images/sehud/level_dact.xml b/images/sehud/level_dact.xml new file mode 100644 index 0000000..63ad910 --- /dev/null +++ b/images/sehud/level_dact.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/low.tex b/images/sehud/low.tex new file mode 100644 index 0000000..eaca0b4 Binary files /dev/null and b/images/sehud/low.tex differ diff --git a/images/sehud/low.xml b/images/sehud/low.xml new file mode 100644 index 0000000..62463f6 --- /dev/null +++ b/images/sehud/low.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/mainbutton.tex b/images/sehud/mainbutton.tex new file mode 100644 index 0000000..27f31c4 Binary files /dev/null and b/images/sehud/mainbutton.tex differ diff --git a/images/sehud/mainbutton.xml b/images/sehud/mainbutton.xml new file mode 100644 index 0000000..92c240b --- /dev/null +++ b/images/sehud/mainbutton.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/new.tex b/images/sehud/new.tex new file mode 100644 index 0000000..3a81ee7 Binary files /dev/null and b/images/sehud/new.tex differ diff --git a/images/sehud/new.xml b/images/sehud/new.xml new file mode 100644 index 0000000..deb2419 --- /dev/null +++ b/images/sehud/new.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/next.tex b/images/sehud/next.tex new file mode 100644 index 0000000..e40ed0f Binary files /dev/null and b/images/sehud/next.tex differ diff --git a/images/sehud/next.xml b/images/sehud/next.xml new file mode 100644 index 0000000..85997cb --- /dev/null +++ b/images/sehud/next.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/0.tex b/images/sehud/numbers/0.tex new file mode 100644 index 0000000..7723392 Binary files /dev/null and b/images/sehud/numbers/0.tex differ diff --git a/images/sehud/numbers/0.xml b/images/sehud/numbers/0.xml new file mode 100644 index 0000000..2523cce --- /dev/null +++ b/images/sehud/numbers/0.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/1.tex b/images/sehud/numbers/1.tex new file mode 100644 index 0000000..b65e7b4 Binary files /dev/null and b/images/sehud/numbers/1.tex differ diff --git a/images/sehud/numbers/1.xml b/images/sehud/numbers/1.xml new file mode 100644 index 0000000..284ea8c --- /dev/null +++ b/images/sehud/numbers/1.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/2.tex b/images/sehud/numbers/2.tex new file mode 100644 index 0000000..fb8159c Binary files /dev/null and b/images/sehud/numbers/2.tex differ diff --git a/images/sehud/numbers/2.xml b/images/sehud/numbers/2.xml new file mode 100644 index 0000000..c525389 --- /dev/null +++ b/images/sehud/numbers/2.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/3.tex b/images/sehud/numbers/3.tex new file mode 100644 index 0000000..ae5d556 Binary files /dev/null and b/images/sehud/numbers/3.tex differ diff --git a/images/sehud/numbers/3.xml b/images/sehud/numbers/3.xml new file mode 100644 index 0000000..5c7fbb7 --- /dev/null +++ b/images/sehud/numbers/3.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/4.tex b/images/sehud/numbers/4.tex new file mode 100644 index 0000000..167ce53 Binary files /dev/null and b/images/sehud/numbers/4.tex differ diff --git a/images/sehud/numbers/4.xml b/images/sehud/numbers/4.xml new file mode 100644 index 0000000..42e5a64 --- /dev/null +++ b/images/sehud/numbers/4.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/5.tex b/images/sehud/numbers/5.tex new file mode 100644 index 0000000..7a4c54e Binary files /dev/null and b/images/sehud/numbers/5.tex differ diff --git a/images/sehud/numbers/5.xml b/images/sehud/numbers/5.xml new file mode 100644 index 0000000..d309f13 --- /dev/null +++ b/images/sehud/numbers/5.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/6.tex b/images/sehud/numbers/6.tex new file mode 100644 index 0000000..fdecef9 Binary files /dev/null and b/images/sehud/numbers/6.tex differ diff --git a/images/sehud/numbers/6.xml b/images/sehud/numbers/6.xml new file mode 100644 index 0000000..dc1adb8 --- /dev/null +++ b/images/sehud/numbers/6.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/7.tex b/images/sehud/numbers/7.tex new file mode 100644 index 0000000..df92194 Binary files /dev/null and b/images/sehud/numbers/7.tex differ diff --git a/images/sehud/numbers/7.xml b/images/sehud/numbers/7.xml new file mode 100644 index 0000000..c932b7f --- /dev/null +++ b/images/sehud/numbers/7.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/8.tex b/images/sehud/numbers/8.tex new file mode 100644 index 0000000..805d954 Binary files /dev/null and b/images/sehud/numbers/8.tex differ diff --git a/images/sehud/numbers/8.xml b/images/sehud/numbers/8.xml new file mode 100644 index 0000000..de385e7 --- /dev/null +++ b/images/sehud/numbers/8.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/numbers/9.tex b/images/sehud/numbers/9.tex new file mode 100644 index 0000000..ee35837 Binary files /dev/null and b/images/sehud/numbers/9.tex differ diff --git a/images/sehud/numbers/9.xml b/images/sehud/numbers/9.xml new file mode 100644 index 0000000..23546cc --- /dev/null +++ b/images/sehud/numbers/9.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/precious_act_cn.tex b/images/sehud/precious_act_cn.tex new file mode 100644 index 0000000..87b2f00 Binary files /dev/null and b/images/sehud/precious_act_cn.tex differ diff --git a/images/sehud/precious_act_cn.xml b/images/sehud/precious_act_cn.xml new file mode 100644 index 0000000..dc2a1a8 --- /dev/null +++ b/images/sehud/precious_act_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/precious_act_en.tex b/images/sehud/precious_act_en.tex new file mode 100644 index 0000000..10d9250 Binary files /dev/null and b/images/sehud/precious_act_en.tex differ diff --git a/images/sehud/precious_act_en.xml b/images/sehud/precious_act_en.xml new file mode 100644 index 0000000..a2ca706 --- /dev/null +++ b/images/sehud/precious_act_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/precious_dact_cn.tex b/images/sehud/precious_dact_cn.tex new file mode 100644 index 0000000..0785638 Binary files /dev/null and b/images/sehud/precious_dact_cn.tex differ diff --git a/images/sehud/precious_dact_cn.xml b/images/sehud/precious_dact_cn.xml new file mode 100644 index 0000000..f0268fe --- /dev/null +++ b/images/sehud/precious_dact_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/precious_dact_en.tex b/images/sehud/precious_dact_en.tex new file mode 100644 index 0000000..ff07a41 Binary files /dev/null and b/images/sehud/precious_dact_en.tex differ diff --git a/images/sehud/precious_dact_en.xml b/images/sehud/precious_dact_en.xml new file mode 100644 index 0000000..59b9f28 --- /dev/null +++ b/images/sehud/precious_dact_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/refresh.tex b/images/sehud/refresh.tex new file mode 100644 index 0000000..52d783a Binary files /dev/null and b/images/sehud/refresh.tex differ diff --git a/images/sehud/refresh.xml b/images/sehud/refresh.xml new file mode 100644 index 0000000..b9064b5 --- /dev/null +++ b/images/sehud/refresh.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/resource_act_cn.tex b/images/sehud/resource_act_cn.tex new file mode 100644 index 0000000..ef90896 Binary files /dev/null and b/images/sehud/resource_act_cn.tex differ diff --git a/images/sehud/resource_act_cn.xml b/images/sehud/resource_act_cn.xml new file mode 100644 index 0000000..24053b5 --- /dev/null +++ b/images/sehud/resource_act_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/resource_act_en.tex b/images/sehud/resource_act_en.tex new file mode 100644 index 0000000..6824a1c Binary files /dev/null and b/images/sehud/resource_act_en.tex differ diff --git a/images/sehud/resource_act_en.xml b/images/sehud/resource_act_en.xml new file mode 100644 index 0000000..8e09695 --- /dev/null +++ b/images/sehud/resource_act_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/resource_dact_cn.tex b/images/sehud/resource_dact_cn.tex new file mode 100644 index 0000000..f5fd0a6 Binary files /dev/null and b/images/sehud/resource_dact_cn.tex differ diff --git a/images/sehud/resource_dact_cn.xml b/images/sehud/resource_dact_cn.xml new file mode 100644 index 0000000..07034b5 --- /dev/null +++ b/images/sehud/resource_dact_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/resource_dact_en.tex b/images/sehud/resource_dact_en.tex new file mode 100644 index 0000000..7dff720 Binary files /dev/null and b/images/sehud/resource_dact_en.tex differ diff --git a/images/sehud/resource_dact_en.xml b/images/sehud/resource_dact_en.xml new file mode 100644 index 0000000..b93bd9c --- /dev/null +++ b/images/sehud/resource_dact_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/sail_act_cn.tex b/images/sehud/sail_act_cn.tex new file mode 100644 index 0000000..43b289e Binary files /dev/null and b/images/sehud/sail_act_cn.tex differ diff --git a/images/sehud/sail_act_cn.xml b/images/sehud/sail_act_cn.xml new file mode 100644 index 0000000..bc3ce3d --- /dev/null +++ b/images/sehud/sail_act_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/sail_act_en.tex b/images/sehud/sail_act_en.tex new file mode 100644 index 0000000..f058741 Binary files /dev/null and b/images/sehud/sail_act_en.tex differ diff --git a/images/sehud/sail_act_en.xml b/images/sehud/sail_act_en.xml new file mode 100644 index 0000000..847c7fc --- /dev/null +++ b/images/sehud/sail_act_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/sail_dact_cn.tex b/images/sehud/sail_dact_cn.tex new file mode 100644 index 0000000..209a5f0 Binary files /dev/null and b/images/sehud/sail_dact_cn.tex differ diff --git a/images/sehud/sail_dact_cn.xml b/images/sehud/sail_dact_cn.xml new file mode 100644 index 0000000..2da774f --- /dev/null +++ b/images/sehud/sail_dact_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/sail_dact_en.tex b/images/sehud/sail_dact_en.tex new file mode 100644 index 0000000..69d2621 Binary files /dev/null and b/images/sehud/sail_dact_en.tex differ diff --git a/images/sehud/sail_dact_en.xml b/images/sehud/sail_dact_en.xml new file mode 100644 index 0000000..01fe1d4 --- /dev/null +++ b/images/sehud/sail_dact_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/slotbg_fresh.tex b/images/sehud/slotbg_fresh.tex new file mode 100644 index 0000000..87a27da Binary files /dev/null and b/images/sehud/slotbg_fresh.tex differ diff --git a/images/sehud/slotbg_fresh.xml b/images/sehud/slotbg_fresh.xml new file mode 100644 index 0000000..730b489 --- /dev/null +++ b/images/sehud/slotbg_fresh.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/slotbg_normal.tex b/images/sehud/slotbg_normal.tex new file mode 100644 index 0000000..8909dbf Binary files /dev/null and b/images/sehud/slotbg_normal.tex differ diff --git a/images/sehud/slotbg_normal.xml b/images/sehud/slotbg_normal.xml new file mode 100644 index 0000000..df1e99b --- /dev/null +++ b/images/sehud/slotbg_normal.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/slotbg_special.tex b/images/sehud/slotbg_special.tex new file mode 100644 index 0000000..c093549 Binary files /dev/null and b/images/sehud/slotbg_special.tex differ diff --git a/images/sehud/slotbg_special.xml b/images/sehud/slotbg_special.xml new file mode 100644 index 0000000..4031f0c --- /dev/null +++ b/images/sehud/slotbg_special.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/smithing_act_cn.tex b/images/sehud/smithing_act_cn.tex new file mode 100644 index 0000000..3452f1e Binary files /dev/null and b/images/sehud/smithing_act_cn.tex differ diff --git a/images/sehud/smithing_act_cn.xml b/images/sehud/smithing_act_cn.xml new file mode 100644 index 0000000..36904d0 --- /dev/null +++ b/images/sehud/smithing_act_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/smithing_act_en.tex b/images/sehud/smithing_act_en.tex new file mode 100644 index 0000000..82332f0 Binary files /dev/null and b/images/sehud/smithing_act_en.tex differ diff --git a/images/sehud/smithing_act_en.xml b/images/sehud/smithing_act_en.xml new file mode 100644 index 0000000..b382f47 --- /dev/null +++ b/images/sehud/smithing_act_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/smithing_dact_cn.tex b/images/sehud/smithing_dact_cn.tex new file mode 100644 index 0000000..30d2be1 Binary files /dev/null and b/images/sehud/smithing_dact_cn.tex differ diff --git a/images/sehud/smithing_dact_cn.xml b/images/sehud/smithing_dact_cn.xml new file mode 100644 index 0000000..b423969 --- /dev/null +++ b/images/sehud/smithing_dact_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/smithing_dact_en.tex b/images/sehud/smithing_dact_en.tex new file mode 100644 index 0000000..2a3a73e Binary files /dev/null and b/images/sehud/smithing_dact_en.tex differ diff --git a/images/sehud/smithing_dact_en.xml b/images/sehud/smithing_dact_en.xml new file mode 100644 index 0000000..89b161e --- /dev/null +++ b/images/sehud/smithing_dact_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/status_cn.tex b/images/sehud/status_cn.tex new file mode 100644 index 0000000..91bdf17 Binary files /dev/null and b/images/sehud/status_cn.tex differ diff --git a/images/sehud/status_cn.xml b/images/sehud/status_cn.xml new file mode 100644 index 0000000..bed5c68 --- /dev/null +++ b/images/sehud/status_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/status_en.tex b/images/sehud/status_en.tex new file mode 100644 index 0000000..e97e31d Binary files /dev/null and b/images/sehud/status_en.tex differ diff --git a/images/sehud/status_en.xml b/images/sehud/status_en.xml new file mode 100644 index 0000000..9545419 --- /dev/null +++ b/images/sehud/status_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_cn1.tex b/images/sehud/swdj_cn1.tex new file mode 100644 index 0000000..250ff91 Binary files /dev/null and b/images/sehud/swdj_cn1.tex differ diff --git a/images/sehud/swdj_cn1.xml b/images/sehud/swdj_cn1.xml new file mode 100644 index 0000000..c46f399 --- /dev/null +++ b/images/sehud/swdj_cn1.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_cn2.tex b/images/sehud/swdj_cn2.tex new file mode 100644 index 0000000..036df4d Binary files /dev/null and b/images/sehud/swdj_cn2.tex differ diff --git a/images/sehud/swdj_cn2.xml b/images/sehud/swdj_cn2.xml new file mode 100644 index 0000000..63d41a9 --- /dev/null +++ b/images/sehud/swdj_cn2.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_cn3.tex b/images/sehud/swdj_cn3.tex new file mode 100644 index 0000000..cb72955 Binary files /dev/null and b/images/sehud/swdj_cn3.tex differ diff --git a/images/sehud/swdj_cn3.xml b/images/sehud/swdj_cn3.xml new file mode 100644 index 0000000..28d2fec --- /dev/null +++ b/images/sehud/swdj_cn3.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_cn4.tex b/images/sehud/swdj_cn4.tex new file mode 100644 index 0000000..56bce6e Binary files /dev/null and b/images/sehud/swdj_cn4.tex differ diff --git a/images/sehud/swdj_cn4.xml b/images/sehud/swdj_cn4.xml new file mode 100644 index 0000000..e08eda7 --- /dev/null +++ b/images/sehud/swdj_cn4.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_cn5.tex b/images/sehud/swdj_cn5.tex new file mode 100644 index 0000000..bb1575e Binary files /dev/null and b/images/sehud/swdj_cn5.tex differ diff --git a/images/sehud/swdj_cn5.xml b/images/sehud/swdj_cn5.xml new file mode 100644 index 0000000..3a890c3 --- /dev/null +++ b/images/sehud/swdj_cn5.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_en1.tex b/images/sehud/swdj_en1.tex new file mode 100644 index 0000000..ebfa0bf Binary files /dev/null and b/images/sehud/swdj_en1.tex differ diff --git a/images/sehud/swdj_en1.xml b/images/sehud/swdj_en1.xml new file mode 100644 index 0000000..a90e9ca --- /dev/null +++ b/images/sehud/swdj_en1.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_en2.tex b/images/sehud/swdj_en2.tex new file mode 100644 index 0000000..5ad45cb Binary files /dev/null and b/images/sehud/swdj_en2.tex differ diff --git a/images/sehud/swdj_en2.xml b/images/sehud/swdj_en2.xml new file mode 100644 index 0000000..dce896f --- /dev/null +++ b/images/sehud/swdj_en2.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_en3.tex b/images/sehud/swdj_en3.tex new file mode 100644 index 0000000..ef5721c Binary files /dev/null and b/images/sehud/swdj_en3.tex differ diff --git a/images/sehud/swdj_en3.xml b/images/sehud/swdj_en3.xml new file mode 100644 index 0000000..9cc216b --- /dev/null +++ b/images/sehud/swdj_en3.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_en4.tex b/images/sehud/swdj_en4.tex new file mode 100644 index 0000000..e007dac Binary files /dev/null and b/images/sehud/swdj_en4.tex differ diff --git a/images/sehud/swdj_en4.xml b/images/sehud/swdj_en4.xml new file mode 100644 index 0000000..7963173 --- /dev/null +++ b/images/sehud/swdj_en4.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/swdj_en5.tex b/images/sehud/swdj_en5.tex new file mode 100644 index 0000000..5524a63 Binary files /dev/null and b/images/sehud/swdj_en5.tex differ diff --git a/images/sehud/swdj_en5.xml b/images/sehud/swdj_en5.xml new file mode 100644 index 0000000..007b417 --- /dev/null +++ b/images/sehud/swdj_en5.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_cloth.tex b/images/sehud/title_cloth.tex new file mode 100644 index 0000000..6397975 Binary files /dev/null and b/images/sehud/title_cloth.tex differ diff --git a/images/sehud/title_cloth.xml b/images/sehud/title_cloth.xml new file mode 100644 index 0000000..98f4890 --- /dev/null +++ b/images/sehud/title_cloth.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_food.tex b/images/sehud/title_food.tex new file mode 100644 index 0000000..e110a47 Binary files /dev/null and b/images/sehud/title_food.tex differ diff --git a/images/sehud/title_food.xml b/images/sehud/title_food.xml new file mode 100644 index 0000000..f37e060 --- /dev/null +++ b/images/sehud/title_food.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_precious.tex b/images/sehud/title_precious.tex new file mode 100644 index 0000000..bb548f7 Binary files /dev/null and b/images/sehud/title_precious.tex differ diff --git a/images/sehud/title_precious.xml b/images/sehud/title_precious.xml new file mode 100644 index 0000000..9581c1d --- /dev/null +++ b/images/sehud/title_precious.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_recource.tex b/images/sehud/title_recource.tex new file mode 100644 index 0000000..ee30c79 Binary files /dev/null and b/images/sehud/title_recource.tex differ diff --git a/images/sehud/title_recource.xml b/images/sehud/title_recource.xml new file mode 100644 index 0000000..bf5a973 --- /dev/null +++ b/images/sehud/title_recource.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_resource.tex b/images/sehud/title_resource.tex new file mode 100644 index 0000000..ee30c79 Binary files /dev/null and b/images/sehud/title_resource.tex differ diff --git a/images/sehud/title_resource.xml b/images/sehud/title_resource.xml new file mode 100644 index 0000000..0195fcf --- /dev/null +++ b/images/sehud/title_resource.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_sail.tex b/images/sehud/title_sail.tex new file mode 100644 index 0000000..8b4443f Binary files /dev/null and b/images/sehud/title_sail.tex differ diff --git a/images/sehud/title_sail.xml b/images/sehud/title_sail.xml new file mode 100644 index 0000000..c0a0d60 --- /dev/null +++ b/images/sehud/title_sail.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/title_smithing.tex b/images/sehud/title_smithing.tex new file mode 100644 index 0000000..ed88ee4 Binary files /dev/null and b/images/sehud/title_smithing.tex differ diff --git a/images/sehud/title_smithing.xml b/images/sehud/title_smithing.xml new file mode 100644 index 0000000..0c05063 --- /dev/null +++ b/images/sehud/title_smithing.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/up.tex b/images/sehud/up.tex new file mode 100644 index 0000000..8113023 Binary files /dev/null and b/images/sehud/up.tex differ diff --git a/images/sehud/up.xml b/images/sehud/up.xml new file mode 100644 index 0000000..019e879 --- /dev/null +++ b/images/sehud/up.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/vip0.tex b/images/sehud/vip0.tex new file mode 100644 index 0000000..c379b0b Binary files /dev/null and b/images/sehud/vip0.tex differ diff --git a/images/sehud/vip0.xml b/images/sehud/vip0.xml new file mode 100644 index 0000000..72fd53b --- /dev/null +++ b/images/sehud/vip0.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/vip1.tex b/images/sehud/vip1.tex new file mode 100644 index 0000000..abfe14d Binary files /dev/null and b/images/sehud/vip1.tex differ diff --git a/images/sehud/vip1.xml b/images/sehud/vip1.xml new file mode 100644 index 0000000..bed9186 --- /dev/null +++ b/images/sehud/vip1.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/vip2.tex b/images/sehud/vip2.tex new file mode 100644 index 0000000..007697e Binary files /dev/null and b/images/sehud/vip2.tex differ diff --git a/images/sehud/vip2.xml b/images/sehud/vip2.xml new file mode 100644 index 0000000..994b3d5 --- /dev/null +++ b/images/sehud/vip2.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/vip3.tex b/images/sehud/vip3.tex new file mode 100644 index 0000000..708c35e Binary files /dev/null and b/images/sehud/vip3.tex differ diff --git a/images/sehud/vip3.xml b/images/sehud/vip3.xml new file mode 100644 index 0000000..e1c6c22 --- /dev/null +++ b/images/sehud/vip3.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/vip4.tex b/images/sehud/vip4.tex new file mode 100644 index 0000000..5d4b6ff Binary files /dev/null and b/images/sehud/vip4.tex differ diff --git a/images/sehud/vip4.xml b/images/sehud/vip4.xml new file mode 100644 index 0000000..08170e5 --- /dev/null +++ b/images/sehud/vip4.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/vip5.tex b/images/sehud/vip5.tex new file mode 100644 index 0000000..cd1bfe4 Binary files /dev/null and b/images/sehud/vip5.tex differ diff --git a/images/sehud/vip5.xml b/images/sehud/vip5.xml new file mode 100644 index 0000000..4227779 --- /dev/null +++ b/images/sehud/vip5.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/wrap_description_cn.tex b/images/sehud/wrap_description_cn.tex new file mode 100644 index 0000000..6ff6ee7 Binary files /dev/null and b/images/sehud/wrap_description_cn.tex differ diff --git a/images/sehud/wrap_description_cn.xml b/images/sehud/wrap_description_cn.xml new file mode 100644 index 0000000..c9c755f --- /dev/null +++ b/images/sehud/wrap_description_cn.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/wrap_description_en.tex b/images/sehud/wrap_description_en.tex new file mode 100644 index 0000000..e5b44af Binary files /dev/null and b/images/sehud/wrap_description_en.tex differ diff --git a/images/sehud/wrap_description_en.xml b/images/sehud/wrap_description_en.xml new file mode 100644 index 0000000..42d0e6e --- /dev/null +++ b/images/sehud/wrap_description_en.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/sehud/wrap_title.tex b/images/sehud/wrap_title.tex new file mode 100644 index 0000000..c4b1480 Binary files /dev/null and b/images/sehud/wrap_title.tex differ diff --git a/images/sehud/wrap_title.xml b/images/sehud/wrap_title.xml new file mode 100644 index 0000000..2878252 --- /dev/null +++ b/images/sehud/wrap_title.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mod.manifest b/mod.manifest new file mode 100644 index 0000000..d465be2 Binary files /dev/null and b/mod.manifest differ diff --git a/modicon.tex b/modicon.tex new file mode 100644 index 0000000..8d0af12 Binary files /dev/null and b/modicon.tex differ diff --git a/modicon.xml b/modicon.xml new file mode 100644 index 0000000..be75d48 --- /dev/null +++ b/modicon.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modinfo.lua b/modinfo.lua new file mode 100644 index 0000000..df0f949 --- /dev/null +++ b/modinfo.lua @@ -0,0 +1,98 @@ +name = +[[ Economia Simples ]] +description = +[[h1] Alteracoes [/h1] +[list] +[*]Sem a hotkey obrigatoria de abrir a loja [strike](que atrapalhava quando tava digitando)[/strike] +[*]Corrigido bug que crashava o server quando um monstro era morto no limbo +[/list] + +[[h1] Referencias e creditos [/h1] + +[b]Edicao em cima de:[/b] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2460675139] Simple Economy (Fork of Shaoqun Liu)[/url] +[b]Mod original:[/b] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=1115709310] Simple Economy[/url] +]] +author = "Otomai" +version = "1.0" + +forumthread = "" + +api_version = 10 + +dst_compatible = true +dont_starve_compatible = false +reign_of_giants_compatible = false +all_clients_require_mod = true + + +icon_atlas = "modicon.xml" +icon = "modicon.tex" + +server_filter_tags = {} + +local KEY_A = 65 +local keyslist = {} +local string = "" --modified from gesture wheel +for i = 1, 26 do + local ch = string.char(KEY_A + i - 1) + keyslist[i] = {description = ch, data = ch} +end + +configuration_options = +{ + { + name = "Language", + label = "Language", + options = { + {description = "English", data = false}, + {description = "简体中文", data = true}, + }, + default = false, + }, + { + name = "KillBonus", + label = "Reward on killing mobs", + options = { + {description = "Off", data = false}, + {description = "100% of mobs max health", data = 1.0}, + {description = "50% of mobs max health", data = 0.50}, + {description = "25% of mobs max health", data = 0.25}, + {description = "10% of mobs max health", data = 0.1}, + {description = "8% of mobs max health", data = 0.08}, + {description = "5% of mobs max health", data = 0.05}, + {description = "2% of mobs max health", data = 0.02}, + {description = "1% of mobs max health", data = 0.01}, + {description = "0.5% of mobs max health", data = 0.005}, + {description = "0.1% of mobs max health", data = 0.001}, + }, + default = 0.02, + }, + { + name = "Disintegrate", + label = "Allow disintegration", + options = { + {description = "NO", data = false, hover = "Not allow to use Midas Wand to disintegrate items.".."\n".."点金杖仅可用来击杀低血量怪物以换取金币".."\n".."选此选项后以点金杖攻击低血量生物可100%几率击杀"}, + {description = "YES", data = true, hover = "Allow to use Midas Wand to disintegration items.".."\n".."选此选项后以点金杖攻击低血量生物仅可25%几率击杀"}, + }, + default = false, + }, + { + name = "Precious_Disintegratable", + label = "Allow disintegrating precious items", + options = { + {description = "YES", data = true, hover = "Allow to distintegrate items in the list of precious items."}, + {description = "NO", data = false, hover ="Not allow to distintegrate items in the list of precious items."}, + }, + default = false, + }, + { + name = "CanDragMainbutton", + label = "CanDragMainbutton", + hover = "the Mainbutton can be dragged", + options = { + {description = "YES", data = true, hover = "the Mainbutton can be dragged"}, + {description = "NO", data = false, hover = "the Mainbutton can't be dragged"}, + }, + default = true, + }, +} \ No newline at end of file diff --git a/modinfo_chs.lua b/modinfo_chs.lua new file mode 100644 index 0000000..51391e5 --- /dev/null +++ b/modinfo_chs.lua @@ -0,0 +1,84 @@ +description = +[[新增一个交易系统。 +使用专属道具来赚取金币。 +打怪也可以赚钱了。 +点击左上角的图标打开商品交易面板,使用金币换取需要的东西。 +珍贵品每3天的早上会刷新。 +不同的季节商品的价格不一样。 +原作者:柴柴 +]] + +local KEY_A = 65 +local keyslist = {} +local string = "" --modified from gesture wheel +for i = 1, 26 do + local ch = string.char(KEY_A + i - 1) + keyslist[i] = {description = ch, data = ch} +end + +configuration_options = +{ + { + name = "Language", + label = "语言", + options = { + {description = "English", data = false}, + {description = "简体中文", data = true}, + }, + default = false, + }, + { + name = "KillBonus", + label = "打怪获得金币", + options = { + {description = "关闭", data = false}, + {description = "怪物最大生命值100%", data = 1.0}, + {description = "怪物最大生命值50%", data = 0.50}, + {description = "怪物最大生命值25%", data = 0.25}, + {description = "怪物最大生命值10%", data = 0.1}, + {description = "怪物最大生命值8%", data = 0.08}, + {description = "怪物最大生命值5%", data = 0.05}, + {description = "怪物最大生命值2%", data = 0.02}, + {description = "怪物最大生命值1%", data = 0.01}, + {description = "怪物最大生命值0.5%", data = 0.005}, + {description = "怪物最大生命值0.1%", data = 0.001}, + }, + default = 0.02, + }, + { + name = "Disintegrate", + label = "允许点金分解", + options = { + {description = "否", data = false, hover = "不允许使用点金杖分解任何掉落物".."\n".."点金杖仅可用来击杀低血量怪物以换取金币".."\n".."选此选项后以点金杖攻击低血量生物可100%几率击杀"}, + {description = "是", data = true, hover = "允许使用点金杖分解任何掉落物".."\n".."选此选项后以点金杖攻击低血量生物仅可25%几率击杀"}, + }, + default = true, + }, + { + name = "Precious_Disintegratable", + label = "允许分解珍稀物品", + options = { + {description = "是", data = true, hover = "允许分解出售在珍稀列表里的物品"}, + {description ="否", data = false, hover ="不允许分解珍稀物品"}, + }, + default = true, + }, + { + name = "打开/关闭商店", + label = "设置热键", + hover = "按下热键以打开或关闭商店", + options = keyslist, + default = "C", --C + }, + { + name = "CanDragMainbutton", + label = "拖拽商店图标", + hover = "可以拖拽商店图标", + options = { + {description = "是", data = true, hover = "商店图标可以被拖拽"}, + {description = "否", data = false, hover = "商店图标不能被拖拽"}, + }, + default = true, + }, +} +} \ No newline at end of file diff --git a/modmain.lua b/modmain.lua new file mode 100644 index 0000000..ecca483 --- /dev/null +++ b/modmain.lua @@ -0,0 +1,596 @@ +local _G = GLOBAL +local require = GLOBAL.require +local STRINGS = GLOBAL.STRINGS +local Recipe = GLOBAL.Recipe +local Ingredient = GLOBAL.Ingredient +local RECIPETABS = GLOBAL.RECIPETABS +local TECH = GLOBAL.TECH + +local LAN_ = GetModConfigData('Language') +if LAN_ then + require 'SEscripts/strings_cn' + TUNING.SElan = "cn" +else + require 'SEscripts/strings_en' + TUNING.SElan = "en" +end + +if GetModConfigData('Disintegrate') then + TUNING.allowgoldstaff = true +else + TUNING.allowgoldstaff = false +end + +if GetModConfigData('Precious_Disintegratable') then + TUNING.Precious_Disintegratable = true +else + TUNING.Precious_Disintegratable = false +end + +if GetModConfigData('CanDragMainbutton') then + TUNING.CanDragMainbutton = true +else + TUNING.CanDragMainbutton = false +end + + +TUNING.Refresh_Price = 233 --刷新商店的花费 + +PrefabFiles = { + "secoin", + "stealer", + "goldstaff", + "vipcard", + "luckamulet", + "coin_bundle", +} + +Assets = { + Asset("ATLAS", "images/inventoryimages/secoin.xml"), + Asset("IMAGE", "images/inventoryimages/secoin.tex"), + + Asset("ATLAS", "images/sehud/mainbutton.xml"), + Asset("IMAGE", "images/sehud/mainbutton.tex"), + + Asset("ATLAS", "images/sehud/bg.xml"), + Asset("IMAGE", "images/sehud/bg.tex"), + + Asset("ATLAS", "images/sehud/bg_2.xml"), + Asset("IMAGE", "images/sehud/bg_2.tex"), + + Asset("ATLAS", "images/sehud/exp_act.xml"), + Asset("IMAGE", "images/sehud/exp_act.tex"), + + Asset("ATLAS", "images/sehud/exp_dact.xml"), + Asset("IMAGE", "images/sehud/exp_dact.tex"), + + Asset("ATLAS", "images/sehud/expmask.xml"), + Asset("IMAGE", "images/sehud/expmask.tex"), + + Asset("ATLAS", "images/sehud/level_act.xml"), + Asset("IMAGE", "images/sehud/level_act.tex"), + + Asset("ATLAS", "images/sehud/level_dact.xml"), + Asset("IMAGE", "images/sehud/level_dact.tex"), + + Asset("ATLAS", "images/sehud/status_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/status_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/hudcoin.xml"), + Asset("IMAGE", "images/sehud/hudcoin.tex"), + + Asset("ATLAS", "images/sehud/title_food.xml"), + Asset("IMAGE", "images/sehud/title_food.tex"), + Asset("ATLAS", "images/sehud/title_cloth.xml"), + Asset("IMAGE", "images/sehud/title_cloth.tex"), + Asset("ATLAS", "images/sehud/title_smithing.xml"), + Asset("IMAGE", "images/sehud/title_smithing.tex"), + Asset("ATLAS", "images/sehud/title_resource.xml"), + Asset("IMAGE", "images/sehud/title_resource.tex"), + Asset("ATLAS", "images/sehud/title_sail.xml"), + Asset("IMAGE", "images/sehud/title_sail.tex"), + Asset("ATLAS", "images/sehud/title_precious.xml"), + Asset("IMAGE", "images/sehud/title_precious.tex"), + + Asset("ATLAS", "images/sehud/slotbg_normal.xml"), + Asset("IMAGE", "images/sehud/slotbg_normal.tex"), + + Asset("ATLAS", "images/sehud/slotbg_special.xml"), + Asset("IMAGE", "images/sehud/slotbg_special.tex"), + + Asset("ATLAS", "images/sehud/slotbg_fresh.xml"), + Asset("IMAGE", "images/sehud/slotbg_fresh.tex"), + + Asset("ATLAS", "images/sehud/back.xml"), + Asset("IMAGE", "images/sehud/back.tex"), + + Asset("ATLAS", "images/sehud/next.xml"), + Asset("IMAGE", "images/sehud/next.tex"), + + Asset("ATLAS", "images/sehud/close.xml"), + Asset("IMAGE", "images/sehud/close.tex"), + + Asset("ATLAS", "images/sehud/refresh.xml"), + Asset("IMAGE", "images/sehud/refresh.tex"), + + Asset("ATLAS", "images/sehud/infobutton.xml"), + Asset("IMAGE", "images/sehud/infobutton.tex"), + + Asset("ATLAS", "images/sehud/infoback.xml"), + Asset("IMAGE", "images/sehud/infoback.tex"), + + Asset("ATLAS", "images/sehud/infopage_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/infopage_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/new.xml"), + Asset("IMAGE", "images/sehud/new.tex"), + + Asset("ATLAS", "images/sehud/up.xml"), + Asset("IMAGE", "images/sehud/up.tex"), + + Asset("ATLAS", "images/sehud/low.xml"), + Asset("IMAGE", "images/sehud/low.tex"), + + Asset("ATLAS", "images/sehud/food_act_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/food_act_"..TUNING.SElan..".tex"), + Asset("ATLAS", "images/sehud/food_dact_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/food_dact_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/cloth_act_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/cloth_act_"..TUNING.SElan..".tex"), + Asset("ATLAS", "images/sehud/cloth_dact_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/cloth_dact_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/smithing_act_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/smithing_act_"..TUNING.SElan..".tex"), + Asset("ATLAS", "images/sehud/smithing_dact_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/smithing_dact_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/resource_act_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/resource_act_"..TUNING.SElan..".tex"), + Asset("ATLAS", "images/sehud/resource_dact_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/resource_dact_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/sail_act_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/sail_act_"..TUNING.SElan..".tex"), + Asset("ATLAS", "images/sehud/sail_dact_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/sail_dact_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/precious_act_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/precious_act_"..TUNING.SElan..".tex"), + Asset("ATLAS", "images/sehud/precious_dact_"..TUNING.SElan..".xml"), + Asset("IMAGE", "images/sehud/precious_dact_"..TUNING.SElan..".tex"), + + Asset("ATLAS", "images/sehud/swdj_"..TUNING.SElan.."1.xml"), + Asset("IMAGE", "images/sehud/swdj_"..TUNING.SElan.."1.tex"), + Asset("ATLAS", "images/sehud/swdj_"..TUNING.SElan.."2.xml"), + Asset("IMAGE", "images/sehud/swdj_"..TUNING.SElan.."2.tex"), + Asset("ATLAS", "images/sehud/swdj_"..TUNING.SElan.."3.xml"), + Asset("IMAGE", "images/sehud/swdj_"..TUNING.SElan.."3.tex"), + Asset("ATLAS", "images/sehud/swdj_"..TUNING.SElan.."4.xml"), + Asset("IMAGE", "images/sehud/swdj_"..TUNING.SElan.."4.tex"), + Asset("ATLAS", "images/sehud/swdj_"..TUNING.SElan.."5.xml"), + Asset("IMAGE", "images/sehud/swdj_"..TUNING.SElan.."5.tex"), + + Asset("ATLAS", "images/sehud/vip0.xml"), + Asset("IMAGE", "images/sehud/vip0.tex"), + Asset("ATLAS", "images/sehud/vip1.xml"), + Asset("IMAGE", "images/sehud/vip1.tex"), + Asset("ATLAS", "images/sehud/vip2.xml"), + Asset("IMAGE", "images/sehud/vip2.tex"), + Asset("ATLAS", "images/sehud/vip3.xml"), + Asset("IMAGE", "images/sehud/vip3.tex"), + Asset("ATLAS", "images/sehud/vip4.xml"), + Asset("IMAGE", "images/sehud/vip4.tex"), + Asset("ATLAS", "images/sehud/vip5.xml"), + Asset("IMAGE", "images/sehud/vip5.tex"), + + Asset("ATLAS", "images/sehud/numbers/0.xml"), + Asset("IMAGE", "images/sehud/numbers/0.tex"), + Asset("ATLAS", "images/sehud/numbers/1.xml"), + Asset("IMAGE", "images/sehud/numbers/1.tex"), + Asset("ATLAS", "images/sehud/numbers/2.xml"), + Asset("IMAGE", "images/sehud/numbers/2.tex"), + Asset("ATLAS", "images/sehud/numbers/3.xml"), + Asset("IMAGE", "images/sehud/numbers/3.tex"), + Asset("ATLAS", "images/sehud/numbers/4.xml"), + Asset("IMAGE", "images/sehud/numbers/4.tex"), + Asset("ATLAS", "images/sehud/numbers/5.xml"), + Asset("IMAGE", "images/sehud/numbers/5.tex"), + Asset("ATLAS", "images/sehud/numbers/6.xml"), + Asset("IMAGE", "images/sehud/numbers/6.tex"), + Asset("ATLAS", "images/sehud/numbers/7.xml"), + Asset("IMAGE", "images/sehud/numbers/7.tex"), + Asset("ATLAS", "images/sehud/numbers/8.xml"), + Asset("IMAGE", "images/sehud/numbers/8.tex"), + Asset("ATLAS", "images/sehud/numbers/9.xml"), + Asset("IMAGE", "images/sehud/numbers/9.tex"), + + Asset("ATLAS", "images/sehud/bignums/0.xml"), + Asset("IMAGE", "images/sehud/bignums/0.tex"), + Asset("ATLAS", "images/sehud/bignums/1.xml"), + Asset("IMAGE", "images/sehud/bignums/1.tex"), + Asset("ATLAS", "images/sehud/bignums/2.xml"), + Asset("IMAGE", "images/sehud/bignums/2.tex"), + Asset("ATLAS", "images/sehud/bignums/3.xml"), + Asset("IMAGE", "images/sehud/bignums/3.tex"), + Asset("ATLAS", "images/sehud/bignums/4.xml"), + Asset("IMAGE", "images/sehud/bignums/4.tex"), + Asset("ATLAS", "images/sehud/bignums/5.xml"), + Asset("IMAGE", "images/sehud/bignums/5.tex"), + Asset("ATLAS", "images/sehud/bignums/6.xml"), + Asset("IMAGE", "images/sehud/bignums/6.tex"), + Asset("ATLAS", "images/sehud/bignums/7.xml"), + Asset("IMAGE", "images/sehud/bignums/7.tex"), + Asset("ATLAS", "images/sehud/bignums/8.xml"), + Asset("IMAGE", "images/sehud/bignums/8.tex"), + Asset("ATLAS", "images/sehud/bignums/9.xml"), + Asset("IMAGE", "images/sehud/bignums/9.tex"), + Asset("ATLAS", "images/sehud/wrap_title.xml"), + Asset("IMAGE", "images/sehud/wrap_title.tex"), + Asset("ATLAS", "images/sehud/wrap_description_en.xml"), + Asset("IMAGE", "images/sehud/wrap_description_en.tex"), + Asset("ATLAS", "images/sehud/wrap_description_cn.xml"), + Asset("IMAGE", "images/sehud/wrap_description_cn.tex"), +} + +--载入清单 +modimport("scripts/SEscripts/itemlist.lua") + +--角色交易属性 +AddPlayerPostInit(function(inst) + inst.seccoin = GLOBAL.net_int(inst.GUID,"seccoin") + inst.secexp = GLOBAL.net_int(inst.GUID,"secexp") + inst.seclevel = GLOBAL.net_shortint(inst.GUID,"seclevel") + inst.secvip = GLOBAL.net_shortint(inst.GUID,"secvip") + inst.secprecious = GLOBAL.net_bytearray(inst.GUID,"secprecious") + inst.secpreciouschange = GLOBAL.net_bool(inst.GUID, "secpreciouschange") + inst.secsoundm = GLOBAL.net_bool(inst.GUID, "secsoundm", "secsoundm") + inst:AddComponent("seplayerstatus") + if not GLOBAL.TheNet:GetIsClient() then + inst.components.seplayerstatus:Init(inst) + end +end) + +--全局经济数据 +AddPrefabPostInit("forest", function() GLOBAL.TheWorld:AddComponent("seworldstatus") end) +AddPrefabPostInit("cave", function() GLOBAL.TheWorld:AddComponent("seworldstatus") end) + +local function check(player) + local checklist = {} + local code = 0 + for k,v in pairs(player.components.seplayerstatus.precious) do + table.insert(checklist,TUNING.selist_precious[v]) + end + for k,v in pairs(checklist) do + code = code + v.price + end + return code +end + +--设置modrpc +AddModRPCHandler("SimpleEconomy", "buy", function(player, iname, iprice, more, lock) --商店功能,与服务器通信 + local iiname = iname + local amount = 1 --购买数量 + if more then amount = 10 end --如果右键则购买10个 + if(lock == check(player)) then + if iname == "blueprint" and math.random(0, 40) <= 1 then --1/40概率买到稀有蓝图 + iiname = selist_blueprint[math.random(#selist_blueprint)].name + end + + if player.components.health.currenthealth > 0 and not player:HasTag("playerghost") then --如果人物不是死亡状态 + local discount = player.components.seplayerstatus.discount + if player.components.seplayerstatus.coin >= math.ceil(iprice*discount*amount) then --如果金币足够 + for i=1, amount do + local item = GLOBAL.SpawnPrefab(iiname) --生成商品 + player.components.inventory:GiveItem(item, nil, player:GetPosition()) + end + player.components.seplayerstatus:DoDeltaCoin(-iprice*amount) --减少金币 + end + else --如果人物是死亡状态 + local discount = player.components.seplayerstatus.discount + if player.components.seplayerstatus.coin >= math.ceil(iprice*discount) then --如果金币够 + local pt = Point(player.Transform:GetWorldPosition()) --获得人物在世界的位置 + for i=1, amount do + local angle = math.random()*2*GLOBAL.PI --随机角度 + local loots = GLOBAL.SpawnPrefab(iiname) --生成物品 + loots.Transform:SetPosition(pt.x,pt.y,pt.z) --物品放在人物脚下 + loots.Physics:SetVel(2*math.cos(angle), 10, 2*math.sin(angle)) + end + player.components.seplayerstatus:DoDeltaCoin(-iprice*amount) --减少金币 + end + end + end +end) + +AddModRPCHandler("SimpleEconomy", "refresh", function(player) --刷新功能,与服务器通信 + if player.components.seplayerstatus.coin >= TUNING.Refresh_Price then + player.components.seplayerstatus:preciousbuild() + if player.components.seplayerstatus.preciouschange == true then + player.components.seplayerstatus.preciouschange = false + else + player.components.seplayerstatus.preciouschange = true + end + player.components.seplayerstatus:DoDeltaCoin(-TUNING.Refresh_Price) + end +end) + +AddModRPCHandler("SimpleEconomy", "wrapcoin", function(player,iamount,iprice,more) --打包金币功能 + local wrap_amount = 1 + if more then wrap_amount = 5 end + if player.components.seplayerstatus.coin >= math.ceil(iprice*wrap_amount) then + for i=1,wrap_amount do + local item = _G.SpawnPrefab("coin_bundle") + item.components.coin_container.amount = iamount + item.components.inspectable:SetDescription(STRINGS.CHARACTERS.GENERIC.DESCRIBE.COIN_BUNDLE..item.components.coin_container.amount) + player.components.inventory:GiveItem(item, nil, player:GetPosition()) + end + player.components.seplayerstatus:DoDeltaCoin(-iprice*wrap_amount, true,true) + end +end) + +--换人不掉钱 + +local restartlist={} --换人物时,当前经济学数据存放在此 + +local function ListInsert(player) --存放数据 + if player.userid and player.components then + restartlist[player.userid] = { + coin = 200, + exp = 0, + level =1, + vip = 0, + discount = 0, + slist = {}, + precious = {}, + + yes = false, + preciouschange = false, + soundm = false, + day = 0, + used = true, + } + end + + restartlist[player.userid].coin=player.components.seplayerstatus.coin + restartlist[player.userid].exp=player.components.seplayerstatus.exp + restartlist[player.userid].level=player.components.seplayerstatus.level + restartlist[player.userid].vip=player.components.seplayerstatus.vip + restartlist[player.userid].discount=player.components.seplayerstatus.discount + restartlist[player.userid].slist=player.components.seplayerstatus.slist + restartlist[player.userid].precious=player.components.seplayerstatus.precious + + restartlist[player.userid].yes=true + restartlist[player.userid].preciouschange=player.components.seplayerstatus.presciouschange + restartlist[player.userid].soundm=player.components.seplayerstatus.soundm + restartlist[player.userid].day=player.components.seplayerstatus.day + restartlist[player.userid].used=false + +end + +AddComponentPostInit("playerspawner",function(OnPlayerSpawn, inst) --为组件添加方法 + inst:ListenForEvent("ms_playerjoined",function(self,player) --当有玩家加入时,检查是否是更换人物,如果是,检查是否有经济学数据备份,如果有则继承 + + if restartlist[player.userid] and (not restartlist[player.userid].used) then + player.components.seplayerstatus.coin=restartlist[player.userid].coin + player.components.seplayerstatus.exp=restartlist[player.userid].exp + player.components.seplayerstatus.level=restartlist[player.userid].level + player.components.seplayerstatus.vip=restartlist[player.userid].vip + player.components.seplayerstatus.discount=restartlist[player.userid].discount + player.components.seplayerstatus.slist=restartlist[player.userid].slist + player.components.seplayerstatus.precious=restartlist[player.userid].precious + + player.components.seplayerstatus.yes=true + player.components.seplayerstatus.presciouschange=restartlist[player.userid].preciouschange + player.components.seplayerstatus.soundm=restartlist[player.userid].soundm + player.components.seplayerstatus.day=restartlist[player.userid].day + restartlist[player.userid].used=true + end + end) + + inst:ListenForEvent("ms_playerdespawnanddelete",function(self,player) --当有玩家被删除时,保留备份经济学的数据 + ListInsert(player) + end) + +end) + +local function mydoweight(inst, target) + local price = 0 + if target ~= nil then + local weight = target.components.weighable:GetWeight() + local weightpercent = target.components.weighable:GetWeightPercent() + if weight and weightpercent then + price = weight*(1+weightpercent)/2 + end + --季节鱼价格为2倍 + if target.prefab == "oceanfish_small_7_inv" or target.prefab =="oceanfish_small_8_inv" or target.prefab =="oceanfish_small_6_inv" or target.prefab =="oceanfish_medium_8_inv" then + price = price*2 + --TheNet:Announce("是季节鱼") + end + + price = math.ceil(price) + end + return price +end + +--AddPrefabPostInit("pocket_scale",function(inst) +-- inst:AddComponent("itemweigher") +-- inst.components.itemweigher.type = _G.TROPHYSCALE_TYPES.FISH +-- inst.components.itemweigher:SetOnDoWeighInFn(mydoweight) +--end) + +local TimeEvent = _G.TimeEvent + +local mytimeline = {} + +mytimeline = { + TimeEvent(30 * _G.FRAMES, function(inst) + local weight = inst.sg.statemem.target ~= nil and inst.sg.statemem.target.components.weighable:GetWeight() or nil + if weight ~= nil and inst:PerformBufferedAction() then + local announce_str = inst.sg.statemem.target.components.weighable:GetWeightPercent() >= TUNING.WEIGHABLE_HEAVY_WEIGHT_PERCENT and "ANNOUNCE_WEIGHT_HEAVY" or "ANNOUNCE_WEIGHT" + + local price = 0 + price = mydoweight(inst, inst.sg.statemem.target) + + local str = _G.subfmt(_G.GetString(inst, announce_str), {weight = string.format("%0.2f", weight)}) + + if TUNING.SElan == "cn" then + str = str.."\n金币:"..price + elseif TUNING.SElan == "en" then + str = str.."\ncoins: "..price + end + + inst.components.talker:Say(str) + else + inst.AnimState:ClearOverrideBuild(inst.sg.statemem.target_build) + inst:ClearBufferedAction() + inst.AnimState:SetTime(51 * FRAMES) + end + end), +} + +local function SGWilsonPostInit(sg) + -- note! This overwrites the old timeout behavior! If possible you should + -- always try appending your behaviour instead. + sg.states["use_pocket_scale"].timeline = mytimeline +end + +AddStategraphPostInit("wilson", SGWilsonPostInit) + +local COIN_BUNDLE_UNWRAP = _G.Action({ rmb=true, priority=2 }) --打开钱袋动作,该参数使动作可以在scene中右键触发 +COIN_BUNDLE_UNWRAP.id = "COIN_BUNDLE_UNWRAP" --id +if TUNING.SElan == "cn" then --文字描述 + COIN_BUNDLE_UNWRAP.str = "拆开钱袋" +elseif TUNING.SElan == "en" then + COIN_BUNDLE_UNWRAP.str = "unwrap" +end +COIN_BUNDLE_UNWRAP.fn = function(act) --动作触发时执行的函数 + local target = act.target or act.invobject + target.components.coin_container:Unwrap(act.doer,target) --调用函数 + return true --必须要有,否则状态结束时人物会说我做不到 +end + +AddAction(COIN_BUNDLE_UNWRAP) --将动作加入action + +AddStategraphActionHandler("wilson", _G.ActionHandler(COIN_BUNDLE_UNWRAP, "dolongaction")) --设置状态图,联机有两个 +AddStategraphActionHandler("wilson_client", _G.ActionHandler(COIN_BUNDLE_UNWRAP, "dolongaction")) + +AddComponentAction("INVENTORY", "coin_container", function(inst, doer, actions, right) --设置什么时候触发动作,inventory代表在在物品栏或者物品指在人物身上 + if doer.replica.inventory:GetActiveItem() ~= inst and inst:HasTag("coin_container") then + table.insert(actions, _G.ACTIONS.COIN_BUNDLE_UNWRAP) + end +end) +AddComponentAction("SCENE", "coin_container", function(inst, doer, actions, right) --物品在地上 + --print(right) + --print("2") + --print(inst:HasTag("coin_container")) + if right and inst:HasTag("coin_container") then + table.insert(actions, _G.ACTIONS.COIN_BUNDLE_UNWRAP) + end +end) + +local COIN_BUNDLE_ADD = _G.Action() --合并钱袋 +COIN_BUNDLE_ADD.id = "COIN_BUNDLE_ADD" +if TUNING.SElan == "cn" then --文字描述 + COIN_BUNDLE_ADD.str = "合并钱袋" +elseif TUNING.SElan == "en" then + COIN_BUNDLE_ADD.str = "fuel" +end +COIN_BUNDLE_ADD.fn = function(act) + act.target.components.coin_container.amount = act.target.components.coin_container.amount + act.invobject.components.coin_container.amount + act.target.components.inspectable:SetDescription(STRINGS.CHARACTERS.GENERIC.DESCRIBE.COIN_BUNDLE..act.target.components.coin_container.amount) + act.doer.components.inventory:RemoveItem(act.invobject) + act.invobject:Remove() + return true +end + +AddAction(COIN_BUNDLE_ADD) + +AddStategraphActionHandler("wilson", _G.ActionHandler(COIN_BUNDLE_ADD, "doshortaction")) +AddStategraphActionHandler("wilson_client", _G.ActionHandler(COIN_BUNDLE_ADD, "doshortaction")) + + +AddComponentAction("USEITEM", "coin_container", function(inst, doer, target, actions) + if target:HasTag("coin_container") then + table.insert(actions, _G.ACTIONS.COIN_BUNDLE_ADD) + end +end) + +--UI尺寸 +local function ScaleUI(self, screensize) + local hudscale = self.top_root:GetScale() + self.uiseconomy:SetScale(.75*hudscale.x,.75*hudscale.y,1) +end + +--UI +local uiseconomy = require("widgets/uiseconomy") +local function Adduiseconomy(self) + self.uiseconomy = self.top_root:AddChild(uiseconomy(self.owner)) + local screensize = {GLOBAL.TheSim:GetScreenSize()} + ScaleUI(self, screensize) + self.uiseconomy:SetHAnchor(0) + self.uiseconomy:SetVAnchor(0) + --H: 0=中间 1=左端 2=右端 + --V: 0=中间 1=顶端 2=底端 + self.uiseconomy:MoveToFront() + local OnUpdate_base = self.OnUpdate + self.OnUpdate = function(self, dt) + OnUpdate_base(self, dt) + local curscreensize = {GLOBAL.TheSim:GetScreenSize()} + if curscreensize[1] ~= screensize[1] or curscreensize[2] ~= screensize[2] then + ScaleUI(self) + screensize = curscreensize + end + end +end + +local killBonus = GetModConfigData('KillBonus') + +if killBonus then + AddPrefabPostInit("world", function() + AddPrefabPostInitAny(function(inst) + inst:ListenForEvent("death", function() + if GLOBAL.TheNet:GetIsClient() then return end -- 激活地下金币掉落 + -- if GLOBAL.TheNet:GetIsClient() or GLOBAL.TheWorld:HasTag("cave") then return end + if not inst:HasTag("wall") and inst:IsValid() and + inst.components.lootdropper and inst.components.health and + not inst.components.health.invincible and inst.components.combat and + inst.components.combat.target and + inst.components.combat.defaultdamage > 0 then + local mobPosition = inst:GetPosition() + local bounty = math.floor((inst.components.health.maxhealth * killBonus)) + + if bounty > 0 then + for k, player in pairs( + GLOBAL.FindPlayersInRange( + mobPosition.x, mobPosition.y, + mobPosition.z, + GLOBAL.TUNING.BOOMERANG_DISTANCE, + true)) do + local item = inst.components.lootdropper:SpawnLootPrefab("secoin") + item.components.secoin.amount = bounty + player:DoTaskInTime(.3, function() + player.components.seplayerstatus:givesecoin(item, item:GetPosition(), nil) + end) + + end + end + end + end) + end) + -- end + end) + + function c_givesecoins(amount) + if GLOBAL.TheNet:GetIsClient() then return end + local player = GLOBAL.GetPlayer() + --GetPlayer().components.seplayerstatus:DoDeltaCoin(amount) + player.components.seplayerstatus:DoDeltaCoin(amount) + + end +end + +GLOBAL.c_givesecoins = c_givesecoins + +AddClassPostConstruct("widgets/controls", Adduiseconomy) + diff --git a/scripts/SEscripts/itemlist.lua b/scripts/SEscripts/itemlist.lua new file mode 100644 index 0000000..b97a7b2 --- /dev/null +++ b/scripts/SEscripts/itemlist.lua @@ -0,0 +1,487 @@ +selist_food = +{ +[1] = {name = "kabobs", price = 36},--肉串 +[2] = {name = "meatballs", price = 54},--肉丸 +[3] = {name = "bonestew", price = 100},--肉汤 +[4] = {name = "meat_dried", price = 60},--肉干 +[5] = {name = "turkeydinner", price = 90},--火鸡正餐 +[6] = {name = "baconeggs", price = 125},--鸡蛋火腿 +[7] = {name = "perogies", price = 114},--饺子 +[8] = {name = "hotchili", price = 85},--辣椒酱 +[9] = {name = "guacamole", price = 85},--鼬鼠沙拉 +[10] = {name = "unagi", price = 76},--鳗鱼寿司 +[11] = {name = "frogglebunwich", price = 64},--青蛙三明治 +[12] = {name = "fishtacos", price = 76},--玉米鱼饼 +[13] = {name = "fishsticks", price = 112},--鱼条 +[14] = {name = "honeynuggets", price = 92},--甜蜜金砖 +[15] = {name = "honeyham", price = 142},--蜜汁火腿 +[16] = {name = "monsterlasagna", price = 71},--怪兽千层饼 +[17] = {name = "powcake", price = 36},--芝士蛋糕 +[18] = {name = "butterflymuffin", price = 54},--蝴蝶松饼 +[19] = {name = "fruitmedley", price = 64},--水果拼盘 +[20] = {name = "ratatouille", price = 58},--蔬菜杂烩 +[21] = {name = "jammypreserves", price = 72},--果酱蜜饯 +[22] = {name = "trailmix", price = 64},--水果杂烩 +[23] = {name = "flowersalad", price = 96},--花瓣沙拉 +[24] = {name = "taffy", price = 48},--太妃糖 +[25] = {name = "icecream", price = 228},--冰淇淋 +[26] = {name = "waffles", price = 256},--华夫饼 +[27] = {name = "pumpkincookie", price = 76},--南瓜饼 +[28] = {name = "stuffedeggplant", price = 82},--香酥茄盒 +[29] = {name = "watermelonicle", price = 63},--西瓜冰 +[30] = {name = "dragonpie", price = 124},--火龙果派 +[31] = {name = "mandrakesoup", price = 450},--曼德拉草汤 +[32] = {name = "smallmeat", price = 18},--小肉 +[33] = {name = "meat", price = 30},--大肉 +[34] = {name = "monstermeat", price = 27},--怪兽肉 +[35] = {name = "drumstick", price = 18},--鸡腿 +[36] = {name = "bird_egg", price = 12},--鸡蛋 +[37] = {name = "fish", price = 20},--鱼 +[38] = {name = "eel", price = 60},--鳗鱼 +[39] = {name = "froglegs", price = 14},--青蛙腿 +[40] = {name = "plantmeat", price = 33},--食人花肉 +[41] = {name = "trunk_summer", price = 125},--红色象鼻 +[42] = {name = "trunk_winter", price = 200},--蓝色象鼻 +[43] = {name = "berries", price = 3},--浆果 +[44] = {name = "berries_juicy", price = 6},--蜜汁浆果 +[45] = {name = "cutlichen", price = 4},--苔藓 +[46] = {name = "ice", price = 6},--冰 +[47] = {name = "red_cap", price = 8},--红蘑菇 +[48] = {name = "green_cap", price = 12},--绿蘑菇 +[49] = {name = "blue_cap", price = 16},--蓝蘑菇 +[50] = {name = "cactus_meat", price = 19},--仙人掌 +[51] = {name = "cactus_flower", price = 30},--仙人掌花 +[52] = {name = "cave_banana", price = 16},--香蕉 +[53] = {name = "butterflywings", price = 8},--蝴蝶翅膀 +[54] = {name = "honey", price = 8},--蜂蜜 +[55] = {name = "petals", price = 2},--花瓣 +[56] = {name = "petals_evil", price = 4},--噩梦花瓣 +[57] = {name = "carrot", price = 12},--胡萝卜 +[58] = {name = "corn", price = 18},--玉米 +[59] = {name = "durian", price = 24},--榴莲 +[60] = {name = "pomegranate", price = 21},--石榴 +[61] = {name = "eggplant", price = 28},--茄子 +[62] = {name = "pumpkin", price = 35},--南瓜 +[63] = {name = "watermelon", price = 30},--西瓜 +[64] = {name = "dragonfruit", price = 75},--火龙果 + +[65] = {name = "smallmeat_dried", price = 30},--小肉干 +[66] = {name = "pepper", price = 150},--辣椒 +[67] = {name = "tomato", price = 30},--番茄 +[68] = {name= "garlic", price = 150},--大蒜 +[69] = {name= "onion", price = 60},--洋葱 +[70] = {name= "potato", price = 60},--土豆 +[71] = {name= "rock_avocado_fruit_ripe", price = 10},--石果 +[72] = {name= "kelp", price = 9},--生海带 +[73] = {name= "kelp_dried", price = 18},--干海带 +[74] = {name= "asparagus", price = 18},--芦笋 +[75] = {name= "wobster_sheller_land", price = 80},--活龙虾 +[76] = {name= "wobster_sheller_dead_cooked", price = 30},--熟龙虾 +[77] = {name= "barnacle", price = 20},--藤壶 +[78] = {name= "fishmeat_small", price = 20},--小鱼肉 +[79] = {name= "fishmeat", price = 40},--大鱼肉 +[80] = {name= "leafloaf", price = 70},--叶片肉饼 +[81] = {name= "bananapop", price = 63},--香蕉冻 +[82] = {name= "asparagussoup", price = 40},--芦笋汤 +[83] = {name= "ceviche", price = 150},--酸橘汁腌鱼 +[84] = {name= "vegstinger", price = 80},--蔬菜鸡尾酒 +[85] = {name= "potatotornado", price = 70},--薯塔 +[86] = {name= "salsa", price = 100},--生鲜萨尔斯酱 +[87] = {name= "pepperpopper", price = 100},--爆炒填馅辣椒 +[88] = {name= "lobsterbisque", price = 130},--龙虾汤 +[89] = {name= "californiaroll", price = 50},--加利福尼亚卷 +[90] = {name= "seafoodgumbo", price = 80},--海鲜浓汤 +[91] = {name= "surfnturf", price = 150},--海鲜牛排 +[92] = {name= "lobsterdinner", price = 256},--龙虾正餐 +[93] = {name= "leafymeatburger", price = 100},--素食汉堡 +[94] = {name= "barnaclesushi", price = 112},--藤壶手握寿司 +[95] = {name= "leafymeatsouffle", price = 180},--果冻沙拉 +[96] = {name= "meatysalad", price = 140},--牛肉绿叶菜 +[97] = {name= "barnaclestuffedfishhead", price = 100},--酿鱼头 +[98] = {name= "barnaclinguine", price = 110},--藤壶中细面 +[99] = {name= "barnaclepita", price = 50},--藤壶皮塔饼 +[100] = {name = "shroomcake", price = 100},--蘑菇蛋糕 +[101] = {name = "batnosehat", price = 250},--牛奶帽 +[102] = {name = "batnose", price = 100},--蝙蝠鼻 +[103] = {name = "moon_cap", price = 20},--月亮蘑菇 + +} + +selist_cloth = +{ +[1] = {name = "sewing_kit", price = 400},--缝补机 +[2] = {name = "strawhat", price = 122},--草帽 +[3] = {name = "flowerhat", price = 48},--花环 +[4] = {name = "grass_umbrella", price = 104},--花伞 +[5] = {name = "umbrella", price = 168},--雨伞 +[6] = {name = "minifan", price = 84},--风车 +[7] = {name = "beefalohat", price = 560},--牛角帽 +[8] = {name = "catcoonhat", price = 180},--猫帽 +[9] = {name = "earmuffshat", price = 96},--兔毛耳罩 +[10] = {name = "hawaiianshirt", price = 540},--花纹衬衫 +[11] = {name = "icehat", price = 360},--冰块 +[12] = {name = "raincoat", price = 356},--雨衣 +[13] = {name = "rainhat", price = 282},--雨帽 +[14] = {name = "reflectivevest", price = 254},--夏季背心 +[15] = {name = "trunkvest_summer", price = 365},--夏日背心 +[16] = {name = "trunkvest_winter", price = 543},--寒冬背心 +[17] = {name = "watermelonhat", price = 72},--西瓜帽 +[18] = {name = "winterhat", price = 246},--冬帽 + +[19] = {name = "torch", price = 57},--火把 +[20] = {name = "redlantern", price = 124},--灯笼 +[21] = {name = "lantern", price = 135},--提灯 +[22] = {name = "minerhat", price = 290},--矿工帽 +[23] = {name = "pumpkin_lantern", price = 179},--南瓜灯 +[24] = {name = "molehat", price = 366},--地鼠帽 + +[25] = {name = "beehat", price = 276},--养蜂帽 +[26] = {name = "featherhat", price = 348},--羽毛帽 +[27] = {name = "bushhat", price = 217},--浆果帽 +[28] = {name = "tophat", price = 180},--高礼帽 +[29] = {name = "spiderhat", price = 325},--女王帽 +[30] = {name = "goggleshat", price = 125},--时尚眼镜 +[31] = {name = "sweatervest", price = 636},--小巧背心 +[32] = {name = "onemanband", price = 384},--独奏乐器 +[33] = {name = "compass", price = 30},--指南针 +[34] = {name = "waterballoon", price = 28},--水球 +[35] = {name = "amulet", price = 312},--红护符 +[36] = {name = "blueamulet", price = 213},--蓝护符 +[37] = {name = "purpleamulet", price = 716},--紫护符 + +[38] = {name = "heatrock", price = 150},--暖石 +[39] = {name = "bedroll_straw", price = 108},--稻草卷 +[40] = {name = "bedroll_furry", price = 267},--毛皮铺盖 +[41] = {name = "bernie_inactive", price = 183},--小熊 +[42] = {name = "giftwrap", price = 13},--彩纸 +[43] = {name = "bundlewrap", price = 264},--空包裹 +[44] = {name = "featherpencil", price = 42},--羽毛笔 +[45] = {name = "healingsalve", price = 64},--药膏 +[46] = {name = "bandage", price = 96},--蜂蜜药膏 +[47] = {name = "lifeinjector", price = 135},--针筒 + +[48] = {name = "backpack", price = 84},--背包 +[49] = {name = "piggyback", price = 546},--小猪包 +[50] = {name = "winter_ornament_light1", price = 150},--圣诞灯红 +[51] = {name = "winter_ornament_light2", price = 150},--圣诞灯绿 +[52] = {name = "winter_ornament_light3", price = 150},--圣诞灯蓝 +[53] = {name = "winter_ornament_light4", price = 150},--圣诞灯白 + +[54] = {name = "KELPHAT", price = 150},--海带环 +[55] = {name= "sewing_tape", price = 80},--胶带 +} + +selist_smithing = +{ +[1] = {name = "armorgrass", price = 122},--草甲 +[2] = {name = "armorwood", price = 141},--木甲 +[3] = {name = "spear", price = 53},--长矛 +[4] = {name = "spear_wathgrithr", price = 124},--战斗长矛 +[5] = {name = "wathgrithrhat", price = 168},--战斗头盔 +[6] = {name = "hambat", price = 180},--火腿棒 +[7] = {name = "footballhat", price = 118},--猪皮头盔 +[8] = {name = "tentaclespike", price = 115},--触手棒 +[9] = {name = "batbat", price = 650},--蝙蝠棒 +[10] = {name = "nightsword", price = 375},--影刀 +[11] = {name = "armor_sanity", price = 371},--影甲 +[12] = {name = "armormarble", price = 400},--大理石甲 +[13] = {name = "whip", price = 600},--猫尾鞭 +[14] = {name = "boomerang", price = 99},--飞镖 +[15] = {name = "blowdart_pipe", price = 114},--吹箭 +[16] = {name = "blowdart_fire", price = 60},--燃烧吹箭 +[17] = {name = "blowdart_sleep", price = 75},--麻醉吹箭 +[18] = {name = "blowdart_yellow", price = 114},--电磁吹箭 +[19] = {name = "firestaff", price = 300},--红魔杖 +[20] = {name = "icestaff", price = 250},--蓝魔杖 +[21] = {name = "telestaff", price = 843},--紫魔杖 + +[22] = {name = "gunpowder", price = 42},--炸药 +[23] = {name = "trap_teeth", price = 108},--狗牙陷阱 +[24] = {name = "beemine", price = 201},--蜜蜂地雷 + +[25] = {name = "axe", price = 18},--斧头 +[26] = {name = "shovel", price = 36},--铲子 +[27] = {name = "pickaxe", price = 36},--矿锄 +[28] = {name = "goldenaxe", price = 78},--金斧头 +[29] = {name = "goldenshovel", price = 78},--金铲子 +[30] = {name = "goldenpickaxe", price = 78},--金矿锄 +[31] = {name = "hammer", price = 135},--锤子 +[32] = {name = "pitchfork", price = 36},--草叉 +[33] = {name = "razor", price = 36},--剃须刀 +[34] = {name = "bugnet", price = 108},--捕虫网 +[35] = {name = "birdtrap", price = 147},--捕鸟器 +[36] = {name = "fishingrod", price = 78},--鱼竿 +[37] = {name = "saddle_basic", price = 504},--鞍 +[38] = {name = "saddlehorn", price = 102},--取鞍器 + +[39] = {name = "turf_grass", price = 20},--长草地皮 +[40] = {name = "turf_forest", price = 20},--森林地皮 +[41] = {name = "turf_savanna", price = 20},--草地地皮 +[42] = {name = "turf_deciduous", price = 20},--季节地皮 +[43] = {name = "turf_rocky", price = 20},--岩石地皮 +[44] = {name = "turf_carpetfloor", price = 91},--地毯地板 +[45] = {name = "turf_checkerfloor", price = 30},--方格地板 +[46] = {name = "turf_woodfloor", price = 60},--木质地板 +[47] = {name = "turf_road", price = 90},--卵石路 + +[48] = {name = "fence_item", price = 11},--栅栏 +[49] = {name = "fence_gate_item", price = 156},--木门 +[50] = {name = "wall_hay_item", price = 17},--草墙 +[51] = {name = "wall_wood_item", price = 20},--木墙 +[52] = {name = "wall_stone_item", price = 12},--石墙 +[53] = {name = "wall_moonrock_item", price = 153},--月石墙 + +[54] = {name= "oceanfishingrod", price = 150},--海钓竿 +[55] = {name= "cookiecutterhat", price = 118},--饼干切割机帽子 +[56] = {name= "waterplant_bomb", price = 75},--藤壶刺 +[57] = {name= "dug_trap_starfish", price = 400},--海星 +[58] = {name= "moonglassaxe", price = 250},--月斧 +[59] = {name= "glasscutter", price = 500},--月刀 +[60] = {name= "bathbomb", price = 250},--浴盐 +[61] = {name= "turf_meteor", price = 60},--月球地皮 +[62] = {name= "pocket_scale", price = 50},--袖珍称 +[63] = {name= "reskin_tool", price = 150},--扫帚 + +[64] = {name= "farm_plow_item", price = 200},--犁地机 +[65] = {name = "soil_amender", price = 150},--肥料瓶 +[66] = {name = "soil_amender_fermented", price = 350},--腐烂肥料瓶 +[67] = {name= "plantregistryhat", price = 180},--耕种帽 +[68] = {name= "farm_hoe", price = 40},--锄头 +[69] = {name= "golden_farm_hoe", price = 80},--金锄头 +[70] = {name= "wateringcan", price = 120},--水壶 + +} + +selist_resource = +{ +[1] = {name = "cutgrass", price = 5},--草 +[2] = {name = "twigs", price = 6},--树枝 +[3] = {name = "log", price = 10},--木头 +[4] = {name = "charcoal", price = 6},--木炭 +[5] = {name = "cutreeds", price = 8},--芦苇 +[6] = {name = "rocks", price = 8},--石头 +[7] = {name = "flint", price = 6},--燧石 +[8] = {name = "nitre", price = 12},--硝石 +[9] = {name = "goldnugget", price = 14},--金块 +[10] = {name = "marble", price = 20},--大理石 +[11] = {name = "moonrocknugget", price = 34},--月石 +[12] = {name = "dug_berrybush", price = 27},--浆果丛 +[13] = {name = "dug_berrybush2", price = 34},--热带浆果丛 +[14] = {name = "dug_berrybush_juicy", price = 40},--蜜汁浆果丛 +[15] = {name = "dug_grass", price = 20},--草丛 +[16] = {name = "dug_sapling", price = 17},--树枝丛 +[17] = {name = "dug_marsh_bush", price = 21},--尖刺丛 +[18] = {name = "pinecone", price = 5},--常青树种子 +[19] = {name = "acorn", price = 6},--桦树种子 +[20] = {name = "twiggy_nut", price = 6},--多枝树种 +[21] = {name = "seeds", price = 6},--种子 +[22] = {name = "foliage", price = 6},--蕨叶 +[23] = {name = "succulent_picked", price = 10},--肉质植物 +[24] = {name = "lightbulb", price = 12},--荧光果 +[25] = {name = "wormlight_lesser", price = 24},--小发光浆果 +[26] = {name = "wormlight", price = 68},--发光浆果 +[27] = {name = "fireflies", price = 84},--萤火虫 +[28] = {name = "redgem", price = 100},--红宝石 +[29] = {name = "bluegem", price = 100},--蓝宝石 +[30] = {name = "purplegem", price = 125},--紫宝石 +[31] = {name = "livinglog", price = 90},--活木 +[32] = {name = "nightmarefuel", price = 33},--噩梦燃料 +[33] = {name = "spidergland", price = 16},--蜘蛛腺体 +[34] = {name = "silk", price = 20},--蜘蛛网 +[35] = {name = "spidereggsack", price = 140},--蜘蛛巢 +[36] = {name = "honeycomb", price = 120},--蜂巢 +[37] = {name = "coontail", price = 100},--猫尾 +[38] = {name = "boneshard", price = 20},--骨片 +[39] = {name = "houndstooth", price = 38},--狗牙 +[40] = {name = "stinger", price = 18},--蜂刺 +[41] = {name = "horn", price = 180},--牛角 +[42] = {name = "beefalowool", price = 21},--牛毛 +[43] = {name = "pigskin", price = 48},--猪皮 +[44] = {name = "manrabbit_tail", price = 53},--兔毛 +[45] = {name = "feather_crow", price = 16},--黑鸟毛 +[46] = {name = "feather_robin", price = 18},--红鸟毛 +[47] = {name = "feather_robin_winter", price = 22},--蓝鸟毛 +[48] = {name = "feather_canary", price = 36},--金鸟毛 +[49] = {name = "beardhair", price = 20},--胡须 +[50] = {name = "tentaclespots", price = 74},--触手皮 +[51] = {name = "mosquitosack", price = 32},--血袋 +[52] = {name = "batwing", price = 62},--蝙蝠翅膀 +[53] = {name = "rottenegg", price = 10},--臭鸡蛋 +[54] = {name = "spoiled_food", price = 6},--腐烂食物 +[55] = {name = "poop", price = 12},--屎 +[56] = {name = "guano", price = 10},--鸟屎 +[57] = {name = "phlegm", price = 100},--鼻涕 +[58] = {name = "glommerfuel", price = 38},--格罗姆粘液 +[59] = {name = "slurtleslime", price = 30},--含糊虫粘液 +[60] = {name = "slurtle_shellpieces", price = 60},--破碎的壳 +[61] = {name = "spore_medium", price = 55},--红色孢子 +[62] = {name = "spore_small", price = 55},--绿色孢子 +[63] = {name = "spore_tall", price = 55},--蓝色孢子 +[64] = {name = "tallbirdegg", price = 130},--高鸟蛋 +[65] = {name = "butterfly", price = 16},--蝴蝶 +[66] = {name = "bee", price = 22},--蜜蜂 +[67] = {name = "lureplantbulb", price = 180},--食人花 +[68] = {name = "rabbit", price = 24},--兔子 +[69] = {name = "mole", price = 36},--地鼠 +[70] = {name = "crow", price = 22},--黑鸟 +[71] = {name = "robin", price = 33},--红鸟 +[72] = {name = "robin_winter", price = 44},--蓝鸟 +[73] = {name = "canary", price = 55},--金丝雀 +[74] = {name = "canary_poisoned", price = 125},--中毒金丝雀 + +[75] = {name = "puffin", price = 30},--海鸟 +[76] = {name= "saltrock", price = 150},--盐 +[77] = {name= "driftwood_log", price = 90},--浮木 +[78] = {name= "cookiecuttershell", price = 15},--饼干切割机壳 +[79] = {name= "bullkelp_root", price = 500},--海草茎 +[80] = {name= "rock_avocado_fruit_sprout", price = 1000},--石果苗 +[81] = {name= "waterplant_planter", price = 1000},--藤壶种子 +[82] = {name= "moonglass", price = 50},--月晶 +[83] = {name= "moonrockidol", price = 225},--月石图腾 +[84] = {name = "dug_trap_starfish", price = 120}, -- 海星陷阱 +[85] = {name = "spoiled_fish_small", price = 18}, -- 坏掉的小鱼 +[86] = {name = "spoiled_fish", price = 21}, -- 变质的鱼 +[87] = {name = "moonbutterfly", price = 50}, -- 月娥 +[88] = {name = "carrat", price = 200}, -- 胡萝卜鼠 +} + +selist_sail = +{ + [1] = {name = "boatpatch", price = 120},--船补丁 + [2] = {name = "boat_item", price = 240},--船套件 + [3] = {name = "anchor_item", price = 233},--锚 + [4] = {name = "steeringwheel_item", price = 140},--方向舵 + [5] = {name = "mast_item", price = 480},--帆 + [6] = {name = "oar", price = 12},--船桨 + [7] = {name = "oar_driftwood", price = 90},--浮木船桨 + [8] = {name = "mastupgrade_lamp_item", price = 144},--船灯 + [9] = {name = "mastupgrade_lightningrod_item", price = 115},--船避雷针 + [10] = {name = "oceanfishingbobber_crow", price = 45},--黑羽浮漂 + [11] = {name = "oceanfishingbobber_robin", price = 50},--红羽浮漂 + [12] = {name = "oceanfishingbobber_robin_winter", price = 50},--蓝羽浮漂 + [13] = {name = "oceanfishingbobber_canary", price = 45},--黄羽浮漂 +} + +selist_precious = +{ +[1] = {name = "goatmilk", price = 1200},--电羊奶 +[2] = {name = "butter", price = 1600},--蝴蝶黄油 +[3] = {name = "royal_jelly", price = 1500},--蜂王浆 +[4] = {name = "jellybean", price = 600},--糖豆 + +[5] = {name = "mandrake", price = 2500},--曼德拉草 +[6] = {name = "bearger_fur", price = 2800},--熊皮 +[7] = {name = "deerclops_eyeball", price = 3600},--眼球 +[8] = {name = "dragon_scales", price = 600},--龙鳞 +[9] = {name = "goose_feather", price = 200},--鹅毛 +[10] = {name = "deer_antler3", price = 250},--鹿角钥匙 +[11] = {name = "klaussackkey", price = 1800},--真钥匙 +[12] = {name = "fossil_piece", price = 600},--化石碎片 +[13] = {name = "gears", price = 400},--齿轮 +[14] = {name = "greengem", price = 1400},--绿宝石 +[15] = {name = "orangegem", price = 1100},--橙宝石 +[16] = {name = "yellowgem", price = 1100},--黄宝石 +[17] = {name = "lavae_egg", price = 600},--熔岩虫卵 +[18] = {name = "lightninggoathorn", price = 1200},--电羊角 +[19] = {name = "minotaurhorn", price = 2500},--犀牛角 +[20] = {name = "shroom_skin", price = 1600},--蛤蟆皮 +[21] = {name = "atrium_key", price = 1200},--远古钥匙 +[22] = {name = "shadowheart", price = 1600},--暗影之心 +[23] = {name = "slurper_pelt", price = 450},--辍食者皮 +[24] = {name = "thulecite", price = 200},--铥矿 +[25] = {name = "steelwool", price = 800},--刚羊毛 +[26] = {name = "walrus_tusk", price = 1000},--海象牙 +[27] = {name = "walrushat", price = 2400},--海象帽 + +[28] = {name = "armorruins", price = 2100},--铥矿甲 +[29] = {name = "armorslurper", price = 3500},--饥饿腰带 +[30] = {name = "eyeturret_item", price = 9999},--眼球塔 +[31] = {name = "greenstaff", price = 4500},--绿法杖 +[32] = {name = "orangestaff", price = 4800},--橙法杖 +[33] = {name = "yellowstaff", price = 3700},--黄法杖 +[34] = {name = "nightstick", price = 1900},--晨星 +[35] = {name = "panflute", price = 2500},--排箫 +[36] = {name = "ruins_bat", price = 1800},--铥矿棒 +[37] = {name = "ruinshat", price = 1400},--铥矿头盔 +[38] = {name = "slurtlehat", price = 1200},--蜗牛帽 +[39] = {name = "armorsnurtleshell", price = 1800},--蜗牛壳 +[40] = {name = "staff_tornado", price = 5200},--旋风 + +[41] = {name = "cane", price = 1000},--步行手杖 +[42] = {name = "featherfan", price = 1500},--鹅毛扇 +[43] = {name = "icepack", price = 6000},--冰背包 +[44] = {name = "opalstaff", price = 7400},--呼月法杖 +[45] = {name = "saddle_race", price = 1200},--蝴蝶鞍 +[46] = {name = "saddle_war", price = 4800},--战斗鞍 +[47] = {name = "armordragonfly", price = 1400},--龙鳞衣 +[48] = {name = "beargervest", price = 4600},--熊皮大衣 +[49] = {name = "eyebrellahat", price = 5600},--眼球伞 +[50] = {name = "greenamulet", price = 2200},--绿护符 +[51] = {name = "orangeamulet", price = 1700},--橙护符 +[52] = {name = "yellowamulet", price = 1700},--黄护符 +[53] = {name = "hivehat", price = 2000},--蜂王冠 +[54] = {name = "krampus_sack", price = 9999},--小偷包 +[55] = {name = "armorskeleton", price = 4000},--骨甲 +[56] = {name = "skeletonhat", price = 3200},--骨盔 +[57] = {name = "deserthat", price = 300},--风镜 +[58] = {name = "thurible", price = 2400},--暗影香炉 +[59] = {name = "townportaltalisman", price = 300},--沙之石 +[60] = {name = "sleepbomb", price = 800},--催眠袋 +[61] = {name = "red_mushroomhat", price = 120},--红菇帽 +[62] = {name = "green_mushroomhat", price = 120},--绿菇帽 +[63] = {name = "blue_mushroomhat", price = 120},--蓝菇帽 +[64] = {name = "trinket_15", price = 270},--白主教 +[65] = {name = "trinket_16", price = 270},--黑主教 +[66] = {name = "trinket_28", price = 270},--白战车 +[67] = {name = "trinket_29", price = 270},--黑战车 +[68] = {name = "trinket_30", price = 270},--白骑士 +[69] = {name = "trinket_31", price = 270},--黑骑士 +[70] = {name = "blueprint", price = 250},--蓝图 + +[71] = {name= "gnarwail_horn", price = 2300},--独角鲸的角 +[72] = {name= "malbatross_feather", price = 100},--邪天翁的羽毛 +[73] = {name= "trident", price = 8000},--三叉戟 +[74] = {name= "mast_malbatross_item", price = 5000},--邪天翁帆 --帆的代码后有item代表未放置的物品,没有则为以放置的 +[75] = {name= "malbatross_feathered_weave", price = 1000},--羽毛帆布 +[76] = {name= "malbatross_beak", price = 5000},--鸟嘴 +[77] = {name= "chum", price = 250},--鱼食 +[78] = {name= "tacklecontainer", price = 2000},--钓具箱 +[79] = {name= "opalpreciousgem", price = 2000},--彩虹宝石 + +[80] = {name = "oceanfishinglure_hermit_rain", price = 500},--雨天鱼饵 +[81] = {name = "oceanfishinglure_hermit_snow", price = 500},--雪天鱼饵 +[82] = {name = "oceanfishinglure_hermit_drowsy", price = 500},--麻痹鱼饵 +[83] = {name = "oceanfishinglure_hermit_heavy", price = 500},--重量级鱼饵 + +[84] = {name= "nutrientsgoggleshat", price = 1200},--高级耕作帽 +[85] = {name= "premiumwateringcan", price = 600},--鸟嘴水壶 +} + +selist_special = +{ +[1] = {name = "goldstaff", price = 1000},--点金法杖 +[2] = {name = "luckamulet", price = 1500},--幸运项链 +[3] = {name = "stealer", price = 7000},--勤奋的探索者 +[4] = {name = "vipcard", price = 9999},--vip贵宾卡 +} + +--特殊蓝图 +selist_blueprint = +{ +[1] = {name = "mushroom_light_blueprint", price = 2000},--萤菇灯 +[2] = {name = "mushroom_light2_blueprint", price = 2000},--炽菇灯 +[3] = {name = "bundlewrap_blueprint", price = 2000},--空包裹 +[4] = {name = "sleepbomb_blueprint", price = 2000},--睡球 +[5] = {name = "endtable_blueprint", price = 2000},--茶几 +[6] = {name = "dragonflyfurnace_blueprint", price = 2000},--龙鳞熔炉 +[7] = {name = "townportal_blueprint", price = 2000},--沙传送阵 +[8] = {name = "goggleshat_blueprint", price = 2000},--时尚眼镜 +[9] = {name = "deserthat_blueprint", price = 2000},--风镜 +[10] = {name = "red_mushroomhat_blueprint", price = 2000},--红菇帽 +[11] = {name = "green_mushroomhat_blueprint", price = 2000},--绿菇帽 +[12] = {name = "blue_mushroomhat_blueprint", price = 2000},--蓝菇帽 +[13] = {name = "mast_malbatross_blueprint", price = 2000},--邪天翁帆 +[14] = {name= "malbatross_feathered_weave_blueprint", price = 2000},--羽毛帆布 +[15] = {name= "trident_blueprint", price = 2000},--三叉戟 +[16] = {name= "winch_blueprint", price = 2000},--加加绞盘 +} \ No newline at end of file diff --git a/scripts/SEscripts/strings_cn.lua b/scripts/SEscripts/strings_cn.lua new file mode 100644 index 0000000..192bfd7 --- /dev/null +++ b/scripts/SEscripts/strings_cn.lua @@ -0,0 +1,47 @@ +STRINGS.NAMES.DEER_ANTLER3 = "鹿之匙" +STRINGS.NAMES.SUCCULENT_PICKED = STRINGS.NAMES.SUCCULENT_PICKED or "多肉植物" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT1 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT1 or "红色圣诞灯" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT2 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT2 or "绿色圣诞灯" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT3 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT3 or "蓝色圣诞灯" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT4 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT4 or "白色圣诞灯" + +STRINGS.NAMES.SECOIN = "简单金币" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.LUCKAMULET = "简单金币" + +STRINGS.NAMES.STEALER = "金币挖掘机" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.STEALER = "有精度也有硬度,又能撩又能敲" + +STRINGS.NAMES.GOLDSTAFF = "点金法杖" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.GOLDSTAFF = "将一切变成金币" + +STRINGS.NAMES.VIPCARD = "VIP贵宾卡" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.VIPCARD = "经常花钱的必需品" + +STRINGS.NAMES.LUCKAMULET = "幸运项链" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.LUCKAMULET = "镶嵌的水晶包裹着虔诚的祝福" + +STRINGS.NAMES.COIN_BUNDLE = "一袋金币" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.COIN_BUNDLE = "内有金币:" + +STRINGS.SIMPLEECONOMY={ +[1] = "开始挣钱之旅~", +[2] = "交易", +[3] = "说明", +[4] = "返回", +[5] = "关闭", +[6] = "下一页", +[7] = "上一页", +[8] = "随机蓝图", +[9] = "金币 + ", +[10] = "金币 共+ ", +[11] = "这些东西似乎没有市场价格", +[12] = "那里没有可以变成金币的东西", +[13] = "交易等级提升!", +[14] = " 悄悄告诉你,我的存款有", +[15] = "。", +[16] = " 不要被吓死,我的存款可是有", +[17] = " 之多。", +[18] = "", +[19] = "", +[20] = "刷新珍稀品" +} \ No newline at end of file diff --git a/scripts/SEscripts/strings_en.lua b/scripts/SEscripts/strings_en.lua new file mode 100644 index 0000000..b6e49ac --- /dev/null +++ b/scripts/SEscripts/strings_en.lua @@ -0,0 +1,47 @@ +STRINGS.NAMES.DEER_ANTLER3 = "Deer Antler" +STRINGS.NAMES.SUCCULENT_PICKED = STRINGS.NAMES.SUCCULENT_PICKED or "Succulent" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT1 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT1 or "Red Christmas Orb" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT2 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT2 or "Green Christmas Orb" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT3 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT3 or "Blue Christmas Orb" +STRINGS.NAMES.WINTER_ORNAMENT_LIGHT4 = STRINGS.NAMES.WINTER_ORNAMENT_LIGHT4 or "White Christmas Orb" + +STRINGS.NAMES.SECOIN = "Simple Gold" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.LUCKAMULET = "Simple Gold" + +STRINGS.NAMES.STEALER = "Gold Digger" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.STEALER = "Hardy, hearty and multi-purpose" + +STRINGS.NAMES.GOLDSTAFF = "Midas Wand" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.GOLDSTAFF = "Turns everything into gold" + +STRINGS.NAMES.VIPCARD = "VIP Card" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.VIPCARD = "For the shopaholics" + +STRINGS.NAMES.LUCKAMULET = "Lucky Charm" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.LUCKAMULET = "Blessings crystalized into a gem" + +STRINGS.NAMES.COIN_BUNDLE = "a bag of coins" +STRINGS.CHARACTERS.GENERIC.DESCRIBE.COIN_BUNDLE = "coins:" + +STRINGS.SIMPLEECONOMY={ +[1] = "Let’s begin our journey of gold farming~", +[2] = "Trade", +[3] = "Instructions", +[4] = "Back", +[5] = "Close", +[6] = "Next", +[7] = "Previous", +[8] = "Random Blueprint", +[9] = "+ ", +[10] = "+ ", +[11] = "Those items could not be traded in this market.", +[12] = "There is nothing that can be disintegrated.", +[13] = "Shopping level increased!", +[14] = "Psst... I have ", +[15] = " coins.", +[16] = "Holy cow, I have ", +[17] = " coins.", +[18] = " coins.", +[19] = " coins.", +[20] = "Refresh" +} \ No newline at end of file diff --git a/scripts/components/coin_container.lua b/scripts/components/coin_container.lua new file mode 100644 index 0000000..b2f425b --- /dev/null +++ b/scripts/components/coin_container.lua @@ -0,0 +1,43 @@ +local function amount(self,amount) self.inst.amount:set(amount) end + +local function oncanbeunwrap(self, canbeunwrap) + if canbeunwrap then + self.inst:AddTag("coin_container") + else + self.inst:RemoveTag("coin_container") + end +end + +local coin_container = Class(function(self, inst) + self.inst = inst + self.amount = 1 + self.onunwrapfn = nil + self.canbeunwrap = true +end, +nil, +{ + canbeunwrap = oncanbeunwrap, +}) + +function coin_container:Unwrap(doer,target) --动作函数 + doer.components.seplayerstatus:DoDeltaCoin(self.amount,true) + self.onunwrapfn(self.inst,doer) +end + +function coin_container:SetOnUnwrapFn(fn) --设置回调函数 + self.onunwrapfn = fn +end + +function coin_container:OnSave() --保存 + local data = { + amount = self.amount, + } + return data +end + +function coin_container:OnLoad(data) --读取 + self.amount = data.amount or 0 +end + + +return coin_container \ No newline at end of file diff --git a/scripts/components/secoin.lua b/scripts/components/secoin.lua new file mode 100644 index 0000000..16add71 --- /dev/null +++ b/scripts/components/secoin.lua @@ -0,0 +1,9 @@ +local secoin = Class(function(self, inst) + self.inst = inst + self.amount = 1 +end, +nil, +{ +}) + +return secoin \ No newline at end of file diff --git a/scripts/components/seplayerstatus.lua b/scripts/components/seplayerstatus.lua new file mode 100644 index 0000000..0590fdf --- /dev/null +++ b/scripts/components/seplayerstatus.lua @@ -0,0 +1,205 @@ +require "SEscripts/itemlist" + +local function seccoin(self,coin) self.inst.seccoin:set(coin) end +local function secexp(self,exp) self.inst.secexp:set(exp) end +local function seclevel(self,level) self.inst.seclevel:set(level) end +local function secvip(self,vip) self.inst.secvip:set(vip) end +local function secprecious(self,precious) self.inst.secprecious:set(precious) end +local function secpreciouschange(self,preciouschange) self.inst.secpreciouschange:set(preciouschange) end +local function secsoundm(self,soundm) self.inst.secsoundm:set(soundm) end + +local seplayerstatus = Class(function(self, inst) --经济学类 + self.inst = inst + self.coin = 200 + self.exp = 0 + self.level = 1 + self.vip = 0 + self.discount = (1-self.level*5/100)^self.vip + self.slist = {} + self.precious = {} + self:preciousbuild() + + self.yes = false + + self.preciouschange = false + self.soundm = false + self.day = 0 +end, +nil, +{ + coin = seccoin, + exp = secexp, + level = seclevel, + vip = secvip, + precious = secprecious, + preciouschange = secpreciouschange, + soundm = secsoundm, +}) + +function seplayerstatus:numget() --随机抽取珍稀品 + local num = math.random(#selist_precious) + local check = false + for i=1, #self.slist do + if num == self.slist[i] then + check = true + end + end + if num == 80 or num == 81 or num == 82 or num == 83 then check = true end + if check == true then + return self:numget() + else + return num + end +end + +function seplayerstatus:preciousbuild() --随机珍稀品列表 + self.slist = {} + for i=1, 10+4*self.level do + if i == 1 then + table.insert(self.slist, 70) + elseif i == 2 then + table.insert(self.slist, math.random(80,83)) + else + table.insert(self.slist, self:numget()) + end + end + self.precious = self.slist +end + +function seplayerstatus:OnSave() --保存 + local data = { + coin = self.coin, + exp = self.exp, + level = self.level, + yes = self.yes, + precious = self.precious, + day = self.day, + } + return data +end + +function seplayerstatus:OnLoad(data) --读取 + self.coin = data.coin or 0 + self.exp = data.exp or 0 + self.level = data.level or 0 + self.yes = data.yes or false + if data.precious and #data.precious ~= 0 then + self.precious = data.precious + else + self:preciousbuild() + end + self.day = data.day or 0 +end + +function seplayerstatus:DoDeltaCoin(amount,notgainexp,nodiscount) --改变金币数量 + if amount < 0 then --减少金币 + if nodiscount == true then + self.coin = self.coin + math.ceil(amount) + elseif nodiscount == nil or nodiscount == false then + self.coin = self.coin + math.ceil(amount*self.discount) + end + else --增加金币 + self.coin = self.coin + amount + self.inst.components.talker:Say(STRINGS.SIMPLEECONOMY[9]..amount..STRINGS.SIMPLEECONOMY[18]) + end + if self.coin >= 999999 then self.coin = 999999 end + self.inst:PushEvent("SEDoDeltaCoin") --广播事件 + + if self.soundm == false then + self.soundm = true + else + self.soundm = false + end + + if notgainexp == nil or notgainexp == false then + self:DoDeltaExp(math.abs(amount)) --调用增加经验函数 + end +end + +function seplayerstatus:DoDeltaExp(amount) + if self.level < 5 then + self.exp = self.exp + amount + self.inst:PushEvent("SEDoDeltaExp") + if self.exp >= (self.level+1)^3*1000 then + local a = self.exp-(self.level+1)^3*1000 + self.exp = 0 + self.level = self.level + 1 + self.inst:PushEvent("SELevelUp") + self.inst:DoTaskInTime(1, function() + self.inst.SoundEmitter:PlaySound("dontstarve/characters/wx78/levelup") + self.inst.components.talker:Say(STRINGS.SIMPLEECONOMY[13]) + end) + self:OnVIP(self.vip) + self:DoDeltaExp(a) + end + else + self.exp = 125000 + end +end + +function seplayerstatus:OnVIP(value) --改变vip等级 + self.vip = value + self.discount = (1-self.level*5/100)^self.vip +end + +function seplayerstatus:givesecoin(secoin) --给金币 + local price = 0 + --local full = self.inst.components.inventory:IsFull() + --local backfull = false + --for k,v in pairs(self.inst.components.inventory.opencontainers) do + -- if k and k:HasTag("backpack") and k.components.container and k.components.container:IsFull() then + -- backfull = true + -- end + --end + --self.inst.components.inventory:GiveItem(secoin, nil, pos) + if secoin ~= nil then + price = secoin.components.secoin.amount + local x1,y1,z1 = self.inst.Transform:GetWorldPosition() + local x0,y0,z0 = secoin.Transform:GetWorldPosition() + local x,y,z = Vector3(0,0,0) + local maxtime = 5 + for i=1, maxtime do + self.inst:DoTaskInTime(FRAMES*i, function() + if secoin == nil then return end + x1,y1,z1 = self.inst.Transform:GetWorldPosition() + x0,y0,z0 = secoin.Transform:GetWorldPosition() + if x0 == nil then return end + x = x1 - x0 + y = y1 - y0 + z = z1 - z0 + secoin.Transform:SetPosition(x/(maxtime-i)+x0,y/(maxtime-i)+y0,z/(maxtime-i)+z0) + if i == maxtime then + self:DoDeltaCoin(price) --调用了改变金币函数 + secoin:Remove() + end + end) + end + end +end + +function seplayerstatus:Init(inst) --初始化 + -- 初始不赠送点金法杖 + -- inst:DoTaskInTime(5, function() + -- if inst.components.seplayerstatus.yes ~= true then + -- inst.components.seplayerstatus.yes = true + -- local item = SpawnPrefab("goldstaff") + -- inst.components.inventory:GiveItem(item, nil, inst:GetPosition()) + -- inst.components.talker:Say(STRINGS.SIMPLEECONOMY[1]) + -- end + -- end) + inst:ListenForEvent("cycleschanged", function() --监听日期改变事件,每三天更换珍稀品列表 + self.day = self.day + 1 + if self.day >= 3 then + self.day = 0 + self:preciousbuild() + if self.preciouschange == true then + self.preciouschange = false + else + self.preciouschange = true + end + end + end, TheWorld) +end + +return seplayerstatus +--GetPlayer().components.seplayerstatus:DoDeltaCoin(25000) \ No newline at end of file diff --git a/scripts/components/seworldstatus.lua b/scripts/components/seworldstatus.lua new file mode 100644 index 0000000..bc9f231 --- /dev/null +++ b/scripts/components/seworldstatus.lua @@ -0,0 +1,207 @@ +require "SEscripts/itemlist" + +local seworldstatus = Class(function(self, inst) --世界商品表 + self.inst = inst + + TUNING.selist_food = {} + TUNING.selist_cloth = {} + TUNING.selist_smithing = {} + TUNING.selist_resource = {} + TUNING.selist_sail = {} + TUNING.selist_precious = {} + TUNING.selist_special = {} + + for n=1, #selist_food do + TUNING.selist_food[n] = {} + TUNING.selist_food[n].name = selist_food[n].name + TUNING.selist_food[n].price = selist_food[n].price + end + for n=1, #selist_cloth do + TUNING.selist_cloth[n] = {} + TUNING.selist_cloth[n].name = selist_cloth[n].name + TUNING.selist_cloth[n].price = selist_cloth[n].price + end + for n=1, #selist_smithing do + TUNING.selist_smithing[n] = {} + TUNING.selist_smithing[n].name = selist_smithing[n].name + TUNING.selist_smithing[n].price = selist_smithing[n].price + end + for n=1, #selist_resource do + TUNING.selist_resource[n] = {} + TUNING.selist_resource[n].name = selist_resource[n].name + TUNING.selist_resource[n].price = selist_resource[n].price + end + for n=1,#selist_sail do + TUNING.selist_sail[n] = {} + TUNING.selist_sail[n].name = selist_sail[n].name + TUNING.selist_sail[n].price = selist_sail[n].price + end + for n=1,#selist_precious do + TUNING.selist_precious[n] = {} + TUNING.selist_precious[n].name = selist_precious[n].name + TUNING.selist_precious[n].price = selist_precious[n].price + end + for n=1, #selist_special do + TUNING.selist_special[n] = {} + TUNING.selist_special[n].name = selist_special[n].name + TUNING.selist_special[n].price = selist_special[n].price + end + + --点金法杖低价分解珍贵品和专属装备 + TUNING.selist_low = {} + for n=1, #selist_precious do + table.insert(TUNING.selist_low, selist_precious[n]) + end + for n=1, #selist_special do + table.insert(TUNING.selist_low, selist_special[n]) + end + for n=1, #selist_blueprint do + table.insert(TUNING.selist_low, selist_blueprint[n]) + end + + TUNING.SEseasonchange = false + + self:changelist() --方法判定涨跌 + self:seasoncheck() --方法检查季节 + self:floatprice() --浮动涨跌 + self:daycheck() --方法检查天数变换 +end) + +function seworldstatus:changelist() + --判定张跌 + if TheWorld.components.worldstate.data.season == "spring" then + TUNING.seseasonfood = .5 TUNING.seseasoncloth = 1 TUNING.seseasonsmithing = 1 TUNING.seseasonresource = 1 TUNING.seseasonsail = 1 + end + if TheWorld.components.worldstate.data.season == "summer" then + TUNING.seseasonfood = 1 TUNING.seseasoncloth = .5 TUNING.seseasonsmithing = 1.5 TUNING.seseasonresource = 1.5 TUNING.seseasonsail = 1.5 + end + if TheWorld.components.worldstate.data.season == "autumn" then + TUNING.seseasonfood = 1 TUNING.seseasoncloth = 1 TUNING.seseasonsmithing = 1 TUNING.seseasonresource = .5 TUNING.seseasonsail = .5 + end + if TheWorld.components.worldstate.data.season == "winter" then + TUNING.seseasonfood = 1.5 TUNING.seseasoncloth = 1.5 TUNING.seseasonsmithing = .5 TUNING.seseasonresource = 1 TUNING.seseasonsail = 1 + end + TUNING.todaySeseasonfood = TUNING.seseasonfood TUNING.todaySeseasoncloth = TUNING.seseasoncloth TUNING.todaySeseasonsmithing = TUNING.seseasonsmithing TUNING.todaySeseasonresource = TUNING.seseasonresource TUNING.todaySeseasonsail = TUNING.seseasonsail + + --改变价格 + for k,v in pairs(selist_food) do TUNING.selist_food[k].price = math.ceil(v.price*TUNING.seseasonfood) end + for k,v in pairs(selist_cloth) do TUNING.selist_cloth[k].price = math.ceil(v.price*TUNING.seseasoncloth) end + for k,v in pairs(selist_smithing) do TUNING.selist_smithing[k].price = math.ceil(v.price*TUNING.seseasonsmithing) end + for k,v in pairs(selist_resource) do TUNING.selist_resource[k].price = math.ceil(v.price*TUNING.seseasonresource) end + for k,v in pairs(selist_sail) do TUNING.selist_sail[k].price = math.ceil(v.price*TUNING.seseasonsail) end + + --合并清单供点金法杖使用 + TUNING.allgoods = {} + for n=1, #TUNING.selist_food do + table.insert(TUNING.allgoods, TUNING.selist_food[n]) + end + for n=1, #TUNING.selist_cloth do + table.insert(TUNING.allgoods, TUNING.selist_cloth[n]) + end + for n=1, #TUNING.selist_smithing do + table.insert(TUNING.allgoods, TUNING.selist_smithing[n]) + end + for n=1, #TUNING.selist_resource do + table.insert(TUNING.allgoods, TUNING.selist_resource[n]) + end + for n=1, #TUNING.selist_sail do + table.insert(TUNING.allgoods, TUNING.selist_sail[n]) + end + + --ui辅助 + if TUNING.SEseasonchange == false then + TUNING.SEseasonchange = true + else + TUNING.SEseasonchange = false + end +end + +function seworldstatus:seasoncheck() + TheWorld:ListenForEvent("seasontick", function() --监听季节变换事件,季节变换调用函数改变价格涨跌 + self:changelist() + end) +end + +function seworldstatus:floatprice() + local delta= .1 + local tf = {} + local td = {} + --tf=TUNING.todaySesesonfood tc=TUNING.todaySeseasoncloth tsm=TUNING.todaySeseasonsmithing tso=TUNING.todaySeseasonresource + --TUNING.todaySeseasonfood = TUNING.seseasonfood TUNING.todaySeseasoncloth = TUNING.seseasoncloth TUNING.todaySeseasonsmithing = TUNING.seseasonsmithing TUNING.todaySeseasonresource = TUNING.seseasonresource + + tf[1] = TUNING.todaySeseasonfood + td[1] = TUNING.seseasonfood + tf[2] = TUNING.todaySeseasoncloth + td[2] = TUNING.seseasoncloth + tf[3] = TUNING.todaySeseasonsmithing + td[3] = TUNING.seseasonsmithing + tf[4] = TUNING.todaySeseasonresource + td[4] = TUNING.seseasonresource + tf[5] = TUNING.seseasonsail + td[5] = TUNING.todaySeseasonsail + + for n = 1, 5 do + local max = td[n]+delta + local min = td[n]-delta + local delta1 = max-tf[n] + local delta2 = min-tf[n] + local r=math.random(delta2*100,delta1*100) + if r>0 then + tf[n] = tf[n]+(math.random(delta1*100)/delta1/100)^2*delta1 + elseif r < 0 then + tf[n] = tf[n]+(math.random(-delta2*100)/delta2/100)^2*delta2 + else + tf[n] = tf[n] + end + end + + TUNING.todaySeseasonfood=tf[1] + + TUNING.todaySeseasoncloth=tf[2] + + TUNING.todaySeseasonsmithing=tf[3] + + TUNING.todaySeseasonresource=tf[4] + + TUNING.todaySeseasonsail=tf[5] + + + + + --改变价格 + for k,v in pairs(selist_food) do TUNING.selist_food[k].price = math.ceil(v.price*TUNING.todaySeseasonfood) end + for k,v in pairs(selist_cloth) do TUNING.selist_cloth[k].price = math.ceil(v.price*TUNING.todaySeseasoncloth) end + for k,v in pairs(selist_smithing) do TUNING.selist_smithing[k].price = math.ceil(v.price*TUNING.todaySeseasonsmithing) end + for k,v in pairs(selist_resource) do TUNING.selist_resource[k].price = math.ceil(v.price*TUNING.todaySeseasonresource) end + for k,v in pairs(selist_sail) do TUNING.selist_sail[k].price = math.ceil(v.price*TUNING.todaySeseasonsail) end + + --合并清单供点金法杖使用 + TUNING.allgoods = {} + for n=1, #TUNING.selist_food do + table.insert(TUNING.allgoods, TUNING.selist_food[n]) + end + for n=1, #TUNING.selist_cloth do + table.insert(TUNING.allgoods, TUNING.selist_cloth[n]) + end + for n=1, #TUNING.selist_smithing do + table.insert(TUNING.allgoods, TUNING.selist_smithing[n]) + end + for n=1, #TUNING.selist_resource do + table.insert(TUNING.allgoods, TUNING.selist_resource[n]) + end + for n=1, #TUNING.selist_resource do + table.insert(TUNING.allgoods, TUNING.selist_sail[n]) + end + + --print(#TUNING.allgoods) + +end + + +function seworldstatus:daycheck() + TheWorld:ListenForEvent("cycleschanged", function() + self:floatprice() + end) +end + +return seworldstatus \ No newline at end of file diff --git a/scripts/prefabs/coin_bundle.lua b/scripts/prefabs/coin_bundle.lua new file mode 100644 index 0000000..8618120 --- /dev/null +++ b/scripts/prefabs/coin_bundle.lua @@ -0,0 +1,59 @@ +local assets= +{ + Asset("ANIM", "anim/coin_bundle.zip"), + Asset("ATLAS", "images/inventoryimages/coin_bundle.xml"), + Asset("IMAGE", "images/inventoryimages/coin_bundle.tex"), +} + +local prefabs = { + + +} + +local function OnDescribe() + return "金币" +end + +local function OnUnwrap(inst,doer) --回调函数 + if doer ~= nil and doer.SoundEmitter ~= nil then + doer.SoundEmitter:PlaySound("dontstarve/common/together/packaged") + end + inst:Remove() +end + +local function fn() + local inst = CreateEntity() + + inst.entity:AddTransform() + inst.entity:AddAnimState() + inst.entity:AddNetwork() + + MakeInventoryPhysics(inst) + + inst.AnimState:SetBank("coin_bundle") + inst.AnimState:SetBuild("coin_bundle") + inst.AnimState:PlayAnimation("idle") + + inst:AddTag("coin_container") + + inst.entity:SetPristine() + + if not TheWorld.ismastersim then + return inst + end + + inst:AddComponent("inspectable") + --in modmain.lua,when spawn it or uesitem,do--inst.components.inspectable:SetDescription("内含"..inst.components.coin_container.amount.."个金币") + + inst:AddComponent("inventoryitem") --是物品栏物品 + inst.components.inventoryitem.imagename = "coin_bundle" + inst.components.inventoryitem.atlasname = "images/inventoryimages/coin_bundle.xml" + + inst:AddComponent("coin_container") --添加金币容器组件 + inst.components.coin_container.amount = 1 + inst.components.coin_container:SetOnUnwrapFn(OnUnwrap) --设置回调函数 + + return inst +end + +return Prefab("coin_bundle", fn, assets, prefabs) \ No newline at end of file diff --git a/scripts/prefabs/goldstaff.lua b/scripts/prefabs/goldstaff.lua new file mode 100644 index 0000000..9662b0d --- /dev/null +++ b/scripts/prefabs/goldstaff.lua @@ -0,0 +1,216 @@ +local assets= +{ + Asset("ANIM", "anim/goldstaff.zip"), + Asset("ATLAS", "images/inventoryimages/goldstaff.xml"), +} + +local prefabs = { +} + +local function onequip(inst, owner) + owner.AnimState:OverrideSymbol("swap_object", "goldstaff", "swap") + owner.AnimState:Show("ARM_carry") + owner.AnimState:Hide("ARM_normal") +end + +local function onunequip(inst, owner) + owner.AnimState:Hide("ARM_carry") + owner.AnimState:Show("ARM_normal") +end + +local function goldstafffn(staff, target, pos) + local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 2.7) + local caster = staff.components.inventoryitem.owner + local talkprice = 0 + local pass = 1 + local noprice = true + for k,v in pairs(ents) do + if v.components.inventoryitem + and v.components.inventoryitem.owner == nil + and v.prefab ~= "secoin" --禁止分解的物品 + and v.prefab ~= "chester_eyebone" + and v.prefab ~= "glommerflower" + and v.prefab ~= "hutch_fishbowl" + and v.prefab ~= "moonrockseed" + and v.prefab ~= "moon_altar_glass" + and v.prefab ~= "moon_altar_idol" + and v.prefab ~= "moon_altar_seed" + and v.prefab ~= "sculpture_rooknose" + and v.prefab ~= "sculpture_knighthead" + and v.prefab ~= "sculpture_bishophead" + and staff.components.finiteuses.current >= 1 then --如果有足够耐久 + local price = 0 + local stacksize = 1 + local Isprecious = false + if v.components.stackable then stacksize = v.components.stackable.stacksize end --堆叠 + for i,j in pairs(TUNING.allgoods) do --查找是否是商品 + if v.prefab == j.name then + price = j.price/3*stacksize + end + end + for i,j in pairs(TUNING.selist_low) do --查找是否是珍稀品 + if v.prefab == j.name then + price = j.price/10*stacksize + Isprecious = true + end + end + + if v.components.weighable then + local weight = v.components.weighable:GetWeight() + local weightpercent = v.components.weighable:GetWeightPercent() + if weight and weightpercent then + price = weight*(1+weightpercent)/2 + end + --季节鱼价格为2倍 + if v.prefab == "oceanfish_small_7_inv" or v.prefab =="oceanfish_small_8_inv" or v.prefab =="oceanfish_small_6_inv" or v.prefab =="oceanfish_medium_8_inv" then + price = price*2 + --TheNet:Announce("是季节鱼") + end + end + + if price == 0 then --如果不是商品 + price = math.random(1, 5) --1~5随机给一个价格 + else + noprice = false + end + + if v.components.finiteuses and v.prefab ~= "vipcard" then --如果是有耐久的物品 + local percent = v.components.finiteuses:GetPercent() + price = price*percent + end + if v.components.fueled and v.prefab ~= "vipcard" then --如果是有燃料的物品 + local percent = v.components.fueled:GetPercent() + price = price*percent + end + if v.components.armor and v.components.armor.maxcondition > 0 and v.prefab ~= "vipcard" then --如果是装备 + local percent = v.components.armor:GetPercent() + price = price*percent + end + + if caster.components.builder and AllRecipes[v.prefab] then --如果是builder + price = price * caster.components.builder.ingredientmod + end + + price = math.ceil(price) + + if not(Isprecious) or TUNING.Precious_Disintegratable then --如果禁止分解珍稀品则不会给予金币和分解 + talkprice = talkprice + price + + local pt = Point(v.Transform:GetWorldPosition()) + local secoin = SpawnPrefab("secoin") + secoin.components.secoin.amount = price + local angle = math.random()*2*PI + secoin.Transform:SetPosition(pt.x,pt.y,pt.z) + secoin.Physics:SetVel(2*math.cos(angle), 10, 2*math.sin(angle)) + secoin:DoTaskInTime(pass*FRAMES*3+.3, function() + caster.components.seplayerstatus:givesecoin(secoin) + end) + pass = pass + 1 + + staff.components.inventoryitem.owner.SoundEmitter:PlaySound("dontstarve/common/staff_dissassemble") + if v.components.inventory then v.components.inventory:DropEverything() end + if v.components.container then v.components.container:DropEverything() end + staff.components.finiteuses:Use(1) + v:Remove() + end + else + --staff.components.inventoryitem.owner.components.talker:Say("那东西不能转化成金币") + end + end + if talkprice > 0 then + SpawnPrefab("explode_small_slurtle").Transform:SetPosition(pos:Get()) + caster:DoTaskInTime(pass*FRAMES*3+.4, function() + caster.components.talker:Say(STRINGS.SIMPLEECONOMY[10]..talkprice..STRINGS.SIMPLEECONOMY[19]) + if noprice == true then + caster:DoTaskInTime(1, function() + caster.components.talker:Say(STRINGS.SIMPLEECONOMY[11]) + end) + end + end) + else + caster.components.talker:Say(STRINGS.SIMPLEECONOMY[12]) + end +end + +local function onattack(self, attacker, target, projectile) + local maxhp = 100 + local chance = 50 + if TUNING.allowgoldstaff == false then + chance = 100 -- 不允许分解物品赚钱,那就只能点金怪物 + end + if attacker then + local coefficient = attacker.components.seplayerstatus.level + if coefficient <= 5 then maxhp = maxhp*coefficient end + end + if target + and target:IsValid() + and target.components.health + and target.components.health.currenthealth <= maxhp + and math.random(0, 100) <= chance + and self.inst.components.finiteuses.current >= 1 + and target.components.lootdropper + and (target.components.freezable or target:HasTag("monster")) then + local amount = target.components.health.maxhealth + SpawnPrefab("explode_small_slurtle").Transform:SetPosition(target:GetPosition():Get()) + if target.components.health.currenthealth > 0 then + target.components.combat:GetAttacked(attacker, amount) + end + local item = target.components.lootdropper:SpawnLootPrefab("secoin") + item.components.secoin.amount = math.random(math.ceil(amount/24), math.ceil(amount/16)) + attacker:DoTaskInTime(.3, function() + attacker.components.seplayerstatus:givesecoin(item) + end) + self.inst.components.finiteuses:Use(1) + end +end + +local function fn() + local inst = CreateEntity() + local trans = inst.entity:AddTransform() + local anim = inst.entity:AddAnimState() + MakeInventoryPhysics(inst) + inst.entity:AddNetwork() + inst.entity:AddSoundEmitter() + + anim:SetBank("goldstaff") + anim:SetBuild("goldstaff") + anim:PlayAnimation("idle") + + if not TheWorld.ismastersim then + return inst + end + + inst:AddComponent("inspectable") + + inst:AddComponent("inventoryitem") + inst.components.inventoryitem.atlasname = "images/inventoryimages/goldstaff.xml" + + inst:AddComponent("equippable") + inst.components.equippable:SetOnEquip( onequip ) + inst.components.equippable:SetOnUnequip( onunequip ) + + inst:AddComponent("tool") + + inst:AddComponent("weapon") + inst.components.weapon:SetDamage(0) + inst.components.weapon.OnAttack = onattack + + inst:AddComponent("finiteuses") + inst.components.finiteuses:SetOnFinished(inst.Remove) + inst.components.finiteuses:SetMaxUses(35) + inst.components.finiteuses:SetUses(35) + + if TUNING.allowgoldstaff then + inst:AddComponent("spellcaster") + --inst.components.spellcaster.canuseontargets = true + --inst.components.spellcaster.canonlyuseonrecipes = true + inst.components.spellcaster.canuseonpoint = true + inst.components.spellcaster.canuseonpoint_water = true + inst.components.spellcaster:SetSpellFn(goldstafffn) + end + + return inst +end + + +return Prefab( "goldstaff", fn, assets, prefabs) \ No newline at end of file diff --git a/scripts/prefabs/luckamulet.lua b/scripts/prefabs/luckamulet.lua new file mode 100644 index 0000000..bba18c2 --- /dev/null +++ b/scripts/prefabs/luckamulet.lua @@ -0,0 +1,106 @@ +local assets= +{ + Asset("ANIM", "anim/luckamulet.zip"), + Asset("ATLAS", "images/inventoryimages/luckamulet.xml"), +} + +local function getcoin(inst, chance) + if math.random(0, 100) <= chance and inst.components.inventoryitem.owner then + local owner = inst.components.inventoryitem.owner + local pt = Point(owner.Transform:GetWorldPosition()) + local loots = SpawnPrefab("secoin") + loots.components.secoin.amount = math.random(1,10) + local angle = math.random()*2*PI + loots.Transform:SetPosition(pt.x,pt.y,pt.z) + loots.Physics:SetVel(2*math.cos(angle), 10, 2*math.sin(angle)) + loots:DoTaskInTime(.3, function() + if owner.components.seplayerstatus ~= nil then + owner.components.seplayerstatus:givesecoin(loots) + end + end) + inst.components.finiteuses:Use(1) + end +end + +local function onequip(inst, owner) + owner.AnimState:OverrideSymbol("swap_body", "luckamulet", "picture") + + inst.onwalk = function() + if owner.components.locomotor.wantstomoveforward and math.random(0, 333) <= 1 then + getcoin(inst, 15) + end + end + + inst.get1 = function() + getcoin(inst, 50) + end + + inst.get2 = function() + getcoin(inst, 25) + end + + inst.get3 = function() + getcoin(inst, 10) + end + + inst.get4 = function() + getcoin(inst, 25) + end + + inst:ListenForEvent("locomote", inst.onwalk, owner)--走路 + inst:ListenForEvent("picksomething", inst.get4, owner)--采摘 + inst:ListenForEvent("working", inst.get3, owner)--作业 + inst:ListenForEvent("oneat", inst.get3, owner)--吃东西 + inst:ListenForEvent("fishingstrain", inst.get1, owner)--成功钓鱼 + inst:ListenForEvent("refreshcrafting", inst.get2, owner)--成功制造 + inst:ListenForEvent("attacked", inst.get3, owner)--被打 +end + +local function onunequip(inst, owner) + owner.AnimState:ClearOverrideSymbol("swap_body") + + inst:RemoveEventCallback("locomote", inst.onwalk, owner) + inst:RemoveEventCallback("picksomething", inst.get4, owner) + inst:RemoveEventCallback("working", inst.get3, owner) + inst:RemoveEventCallback("oneat", inst.get3, owner) + inst:RemoveEventCallback("fishingstrain", inst.get1, owner) + inst:RemoveEventCallback("refreshcrafting", inst.get2, owner) + inst:RemoveEventCallback("attacked", inst.get3, owner) +end + +local function fn(Sim) + local inst = CreateEntity() + local trans = inst.entity:AddTransform() + local anim = inst.entity:AddAnimState() + MakeInventoryPhysics(inst) + inst.entity:AddNetwork() + + inst.alreadybuild = false + + anim:SetBank("ground") + anim:SetBuild("luckamulet") + anim:PlayAnimation("idle") + + inst:AddComponent("inspectable") + + if not TheWorld.ismastersim then + return inst + end + + inst:AddComponent("inventoryitem") + inst.components.inventoryitem.atlasname = "images/inventoryimages/luckamulet.xml" + + inst:AddComponent("equippable") + inst.components.equippable.equipslot = EQUIPSLOTS.NECK or EQUIPSLOTS.BODY + inst.components.equippable:SetOnEquip( onequip ) + inst.components.equippable:SetOnUnequip( onunequip ) + + inst:AddComponent("finiteuses") + inst.components.finiteuses:SetOnFinished(inst.Remove) + inst.components.finiteuses:SetMaxUses(500) + inst.components.finiteuses:SetUses(500) + + return inst +end + +return Prefab( "common/inventory/luckamulet", fn, assets) diff --git a/scripts/prefabs/secoin.lua b/scripts/prefabs/secoin.lua new file mode 100644 index 0000000..118b32d --- /dev/null +++ b/scripts/prefabs/secoin.lua @@ -0,0 +1,61 @@ +local assets= +{ + Asset("ANIM", "anim/secoin.zip"), + Asset("ATLAS", "images/inventoryimages/secoin.xml"), +} + +local function shine(inst) + if not inst.AnimState:IsCurrentAnimation("sparkle") then + inst.AnimState:PlayAnimation("sparkle") + inst.AnimState:PushAnimation("idle", false) + end + inst:DoTaskInTime(4 + math.random() * 5, shine) +end + +local function PutIn(inst, owner) + if owner and owner.components.seplayerstatus then + owner.components.seplayerstatus:DoDeltaCoin(inst.components.secoin.amount) + owner:DoTaskInTime(0.1, function() + if owner and owner.components.seplayerstatus and inst then + owner.components.inventory:RemoveItem(inst) + inst:Remove() + end + end) + end +end + +local function fn(Sim) + local inst = CreateEntity() + local trans = inst.entity:AddTransform() + local anim = inst.entity:AddAnimState() + MakeInventoryPhysics(inst) + inst.entity:AddNetwork() + inst.entity:AddSoundEmitter() + + inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh") + anim:SetBank("secoin") + anim:SetBuild("secoin") + anim:PlayAnimation("idle") + + inst:AddTag("molebait") + inst:AddTag("quakedebris") + + if not TheWorld.ismastersim then + return inst + end + + inst:AddComponent("inspectable") + + inst:AddComponent("inventoryitem") + inst.components.inventoryitem.atlasname = "images/inventoryimages/secoin.xml" + inst.components.inventoryitem.canbepickedup = false + inst.components.inventoryitem:SetOnPutInInventoryFn(PutIn) + + inst:AddComponent("secoin") + + shine(inst) + + return inst +end + +return Prefab( "secoin", fn, assets) diff --git a/scripts/prefabs/stealer.lua b/scripts/prefabs/stealer.lua new file mode 100644 index 0000000..63b0f96 --- /dev/null +++ b/scripts/prefabs/stealer.lua @@ -0,0 +1,101 @@ +local assets= +{ + Asset("ANIM", "anim/stealer.zip"), + Asset("ATLAS", "images/inventoryimages/stealer.xml"), +} + +local prefabs = { +} + +local function onequip(inst, owner) + owner.AnimState:OverrideSymbol("swap_object", "stealer", "swap") + owner.AnimState:Show("ARM_carry") + owner.AnimState:Hide("ARM_normal") + + owner.workgetcoin = function(inst, data) + local chance = 25 + if data.target then + if data.target.prefab == "livingtree" or (data.target.prefab == "deciduoustree" and data.target.monster) then + chance = 100 + data.target.components.workable.workleft = data.target.components.workable.workleft + 0.4 + end + if data.target.components.lootdropper and math.random(0,100) <= chance then + local item = data.target.components.lootdropper:SpawnLootPrefab("secoin") + item.components.secoin.amount = math.random(1,5) + owner:DoTaskInTime(.3, function() + owner.components.seplayerstatus:givesecoin(item) + end) + end + end + end + + owner:ListenForEvent("working", owner.workgetcoin, owner) +end + +local function onunequip(inst, owner) + owner.AnimState:Hide("ARM_carry") + owner.AnimState:Show("ARM_normal") + + owner:RemoveEventCallback("working", owner.workgetcoin, owner) +end + +local function onattack(inst, attacker, target, skipsanity) + local chance = 50 + if target then + if target.components.health then + chance = chance*(1-target.components.health.absorb) + end + if target.prefab == "krampus" or target.prefab == "klaus" then + chance = 100 + end + if chance < 0 then chance = 0 elseif chance > 100 then chance = 100 end + end + if attacker and target and not target:HasTag("wall") and target:IsValid() and target.components.lootdropper and math.random(0,100) <= chance and target.components.health and not target.components.health.invincible then + local item = target.components.lootdropper:SpawnLootPrefab("secoin") + item.components.secoin.amount = math.random(1,5) + attacker:DoTaskInTime(.3, function() + attacker.components.seplayerstatus:givesecoin(item, item:GetPosition(), nil) + end) + end +end + +local function fn() + local inst = CreateEntity() + local trans = inst.entity:AddTransform() + local anim = inst.entity:AddAnimState() + MakeInventoryPhysics(inst) + inst.entity:AddNetwork() + inst.entity:AddSoundEmitter() + + anim:SetBank("stealer") + anim:SetBuild("stealer") + anim:PlayAnimation("idle") + + if not TheWorld.ismastersim then + return inst + end + + inst:AddComponent("tool") + inst.components.tool:SetAction(ACTIONS.CHOP, 0.5) + inst.components.tool:SetAction(ACTIONS.MINE, 0.5) + inst.components.tool:SetAction(ACTIONS.HAMMER, 0.5) + + inst:AddComponent("weapon") + inst.components.weapon:SetDamage(10) + inst.components.weapon:SetOnAttack(onattack) + + inst:AddComponent("inspectable") + + inst:AddComponent("inventoryitem") + inst.components.inventoryitem.atlasname = "images/inventoryimages/stealer.xml" + + inst:AddComponent("equippable") + inst.components.equippable:SetOnEquip( onequip ) + inst.components.equippable:SetOnUnequip( onunequip ) + inst.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MULT + + return inst +end + + +return Prefab( "stealer", fn, assets, prefabs) \ No newline at end of file diff --git a/scripts/prefabs/vipcard.lua b/scripts/prefabs/vipcard.lua new file mode 100644 index 0000000..3f60ffd --- /dev/null +++ b/scripts/prefabs/vipcard.lua @@ -0,0 +1,89 @@ +local assets= +{ + Asset("ANIM", "anim/vipcard.zip"), + Asset("ATLAS", "images/inventoryimages/vipcard.xml"), +} + +local function getvip(inst, owner) + if owner then + inst:DoTaskInTime(0, function() + local se = nil + if owner:HasTag("player") then + inst._owner = owner + se = inst._owner.components.seplayerstatus + + inst.ownerlevelup = function() + inst.components.finiteuses:SetUses(se.level*5) + end + + se:OnVIP(1) + inst.components.finiteuses:SetUses(se.level*5) + inst:ListenForEvent("SELevelUp", inst.ownerlevelup, inst._owner) + elseif owner.components.inventoryitem + and owner.components.inventoryitem.owner + and owner.components.inventoryitem.owner:HasTag("player") then + inst._owner = owner.components.inventoryitem.owner + se = inst._owner.components.seplayerstatus + + inst.ownerlevelup = function() + inst.components.finiteuses:SetUses(se.level*5) + end + + se:OnVIP(1) + inst.components.finiteuses:SetUses(se.level*5) + inst:ListenForEvent("SELevelUp", inst.ownerlevelup, inst._owner) + end + end) + end +end + +local function removevip(self, inst, owner) + if self.inst._owner ~= nil then + self.inst._owner.components.seplayerstatus:OnVIP(0) + self.inst:RemoveEventCallback("SELevelUp", self.inst.ownerlevelup, self.inst._owner) + self.inst._owner = nil + end + if self.owner then + self.owner:RemoveChild(self.inst) + end + self:ClearOwner() + self.inst:ReturnToScene() + self:WakeLivingItem() +end + +local function fn(Sim) + local inst = CreateEntity() + local trans = inst.entity:AddTransform() + local anim = inst.entity:AddAnimState() + MakeInventoryPhysics(inst) + inst.entity:AddNetwork() + inst.entity:AddSoundEmitter() + + anim:SetBank("vipcard") + anim:SetBuild("vipcard") + anim:PlayAnimation("idle") + + inst:AddTag("molebait") + inst:AddTag("quakedebris") + + if not TheWorld.ismastersim then + return inst + end + + inst._owner = nil + + inst:AddComponent("inspectable") + + inst:AddComponent("finiteuses") + inst.components.finiteuses:SetMaxUses(100) + inst.components.finiteuses:SetUses(0) + + inst:AddComponent("inventoryitem") + inst.components.inventoryitem.atlasname = "images/inventoryimages/vipcard.xml" + inst.components.inventoryitem:SetOnPutInInventoryFn(getvip) + inst.components.inventoryitem.OnRemoved = removevip + + return inst +end + +return Prefab( "vipcard", fn, assets) diff --git a/scripts/widgets/uiseconomy.lua b/scripts/widgets/uiseconomy.lua new file mode 100644 index 0000000..7a16235 --- /dev/null +++ b/scripts/widgets/uiseconomy.lua @@ -0,0 +1,1336 @@ +local UIAnim = require "widgets/uianim" +local Text = require "widgets/text" +local Widget = require "widgets/widget" +local Image = require "widgets/image" +local ImageButton = require "widgets/imagebutton" +local AnimButton = require "widgets/animbutton" +local HoverText = require "widgets/hoverer" +local ItemSlot = require "widgets/itemslot" +local Button = require "widgets/button" + +require "SEscripts/itemlist" + +local GetScreenPos = function() + return TheSim:GetScreenPos(TheInput:GetWorldPosition():Get()) +end + +local GetWidgetPercent = function() + local x, y = TheSim:GetScreenSize() + return x / 1920 +end + +local uiseconomy = Class(Widget, function(self, owner) + Widget._ctor(self, "uiseconomy") + self.owner = owner + self.numpage = 1 + self.mainui = self:AddChild(Widget("mainui")) + self.mainui:SetScale(.75, .75, 1) + self.mainui:SetPosition(0,20,0) + self.mainui:Hide() + +self.mainui.bg = self.mainui:AddChild(Image("images/sehud/bg.xml", "bg.tex")) + self.mainui.bg:SetTint(1,1,1,0.95) + self.mainui.bg:SetPosition(0, 45, 0) + + self.mainui.bg.title = self.mainui.bg:AddChild(Image("images/sehud/title_food.xml", "title_food.tex")) + self.mainui.bg.title:SetPosition(0, 246, 0) + +self.mainui.wrapcoin = self.mainui:AddChild(Widget("wrapcoin"))--分钱功能 + self.mainui.wrapcoin.bg_2 = self.mainui.wrapcoin:AddChild(Image("images/sehud/bg_2.xml", "bg_2.tex")) + --self.mainui.wrapcoin.bg_2:SetTint(1,1,1,0.95) + self.mainui.wrapcoin:SetPosition(700,0,0) + +self.mainui.wrapcoin.title = self.mainui.wrapcoin:AddChild(Image("images/sehud/wrap_title.xml","wrap_title.tex")) + self.mainui.wrapcoin.title:SetPosition(0,185,0) + +self.mainui.wrapcoin.des = self.mainui.wrapcoin:AddChild(Image("images/sehud/wrap_description_"..TUNING.SElan..".xml","wrap_description_"..TUNING.SElan..".tex")) + self.mainui.wrapcoin.des:SetPosition(0,140,0) + +self.mainui.status = self.mainui:AddChild(Widget("status")) + self.mainui.status.bg = self.mainui.status:AddChild(Image("images/sehud/status_"..TUNING.SElan..".xml", "status_"..TUNING.SElan..".tex")) + self.mainui.status:SetPosition(410, 25, 0) + + self.mainui.status.coinamount = self.mainui.status:AddChild(Widget("coinamount")) + self.mainui.status.coinamount:SetPosition(-110, 159, 0) + self.mainui.status.coinamount:SetScale(1, 1, 1) + + self.mainui.status.coinamount.num = {} + for i=1, 6 do + self.mainui.status.coinamount.num[i] = self.mainui.status.coinamount:AddChild(Image("images/sehud/bignums/0.xml", "0.tex")) + self.mainui.status.coinamount.num[i]:SetPosition(i*17, 0, 0) + end + self:displaycoinamount(self.mainui.status.coinamount.num) + + self.mainui.status.level = {} + for i=1, 5 do + self.mainui.status.level[i] = self.mainui.status:AddChild(Image("images/sehud/level_dact.xml", "level_dact.tex")) + self.mainui.status.level[i]:SetPosition(-130+(i-1)*23, 87, 0) + end + + self.mainui.status.vipinfo = self.mainui.status:AddChild(Image("images/sehud/vip0.xml", "vip0.tex")) + self.mainui.status.vipinfo:SetPosition(0, 66, 0) + + self.mainui.status.swdjinfo = self.mainui.status:AddChild(Image("images/sehud/swdj_"..TUNING.SElan.."1.xml", "swdj_"..TUNING.SElan.."1.tex")) + self.mainui.status.swdjinfo:SetPosition(0, 66, 0) + + self.mainui.status.exp = self.mainui.status:AddChild(Image("images/sehud/exp_dact.xml", "exp_dact.tex")) + self.mainui.status.exp:SetPosition(-115, 64, 0) + self.mainui.status.exp:SetClickable(false) + + self.mainui.status.expact = self.mainui.status:AddChild(Image("images/sehud/exp_act.xml", "exp_act.tex")) + self.mainui.status.expact:SetPosition(self.mainui.status.exp:GetPosition().x,self.mainui.status.exp:GetPosition().y, 0) + self.mainui.status.expact:SetClickable(false) + + self.mainui.status.expmask = self.mainui.status:AddChild(Image("images/sehud/expmask.xml", "expmask.tex")) + self.mainui.status.expmask:SetPosition(0, 64, 0) + self.mainui.status.expmask:SetTint(1,1,1,0) + --self.mainui.status.expmask:SetHoverText(self.owner.secexp:value().."/"..(self.owner.seclevel:value()+1)^3*1000) + + self.mainui.status.specialitem = self.mainui.status:AddChild(Widget("specialitem")) + self.mainui.status.specialitem:SetPosition(0, -84, 0) + self.spitemslot = {} + self:spitembuild(73) + + self.mainui.wrapcoin.coinbundle = self.mainui.wrapcoin:AddChild(Widget("coinbundle")) --分钱 + self.mainui.wrapcoin.coinbundle:SetPosition(0,10,0) + self.coin_bundle = {} + self:cbbuild(100) + +self.coinamount = self:AddChild(Widget("coinamount")) + self.coinamount:SetPosition(-820, 325, 0) + self.coinamount:SetScale(.8, .8, 1) + self.coinamount:SetClickable(false) + + self.coinamount.icon = self.coinamount:AddChild(Image("images/sehud/hudcoin.xml", "hudcoin.tex")) + self.coinamount.icon:SetPosition(-10, 0, 0) + self.coinamount.icon:SetScale(.2, .2, 1) + + self.coinamount.num = {} + for i=1, 6 do + self.coinamount.num[i] = self.coinamount:AddChild(Image("images/sehud/bignums/0.xml", "0.tex")) + self.coinamount.num[i]:SetPosition(i*17, 0, 0) + end + self:displaycoinamount(self.coinamount.num) + + self.mainbutton = self:AddChild(ImageButton("images/sehud/mainbutton.xml", "mainbutton.tex")) + self.mainbutton:SetPosition(-815, 370, 0) + self.mainbutton:SetNormalScale(1,1,1) + self.mainbutton:SetFocusScale(1,1,1) + self.mainbutton:SetOnGainFocus(function() self.mainbutton:ScaleTo(1,1.15,.125) self.mainbutton.new.middle = -15 end) + self.mainbutton:SetOnLoseFocus(function() self.mainbutton:ScaleTo(1.15,1,.25) self.mainbutton.new.middle = 15 end) + self.cooldown = true + + self.mainbutton.draggable = TUNING.CanDragMainbutton + self.mainbutton.clickoffset = Vector3(0, 0, 0) + self.mainbutton.dragging = false + self.mainbutton.draggingTimer = 0 + self.mainbutton.draggingPos = {x = 0, y = 0} + self.mainbutton.moveLayerTimer = 0 + self.mainbutton.screenScale = 0.9999 + self.mainbutton.owner = self + + self.mainbutton.OnMouseButton = function(self, click, down, x, y, ...) + self._base.OnMouseButton(self, click, down, x, y, ...) + if not down and click == MOUSEBUTTON_LEFT and self.dragging then + self.dragging = false + if self.dragEndFn then + self.dragEndFn(self) + end + end + if not self.focus then + return false + end + if self.draggable and click == MOUSEBUTTON_LEFT then + if down then + self.dragging = true + self.draggingPos.x = x + self.draggingPos.y = y + end + end + end + + self.mainbutton.OnControl = function(self, control, down, ...) + if self.draggingTimer <= 0.3 then + if ImageButton._base.OnControl(self, control, down, ...) then + self:StartUpdating() + return true + end + self:StartUpdating() + end + if not self:IsEnabled() or not self.focus then + return + end + end + + self.mainbutton.OnUpdate = function(self, dt) + dt = dt or 0x0 + local WidgetPercent = GetWidgetPercent() + if WidgetPercent ~= self.screenScale then + self:SetScale(WidgetPercent) + local pos = self:GetPosition() + pos.x = pos.x * WidgetPercent / self.screenScale + pos.y = pos.y * WidgetPercent / self.screenScale + self.o_pos = pos + self:SetPosition(pos) + self.screenScale = WidgetPercent + end + if self.draggable and self.dragging then + self.draggingTimer = self.draggingTimer + dt + local x, y = GetScreenPos() + local diff_x = x - self.draggingPos.x + local diff_y = y - self.draggingPos.y + self.draggingPos.x = x + self.draggingPos.y = y + local next_pos = self:GetPosition() + next_pos.x = next_pos.x + diff_x*1.15 + next_pos.y = next_pos.y + diff_y*1.15 + self.o_pos = next_pos + self:SetPosition(next_pos) + + local next_pos_c = self.owner.coinamount:GetPosition() + next_pos_c.x = next_pos_c.x + diff_x*1.15 + next_pos_c.y = next_pos_c.y + diff_y*1.15 + self.owner.coinamount.o_pos = next_pos_c + self.owner.coinamount:SetPosition(next_pos_c) + + end + if not self.dragging then + self.draggingTimer = 0x0 + end + self.moveLayerTimer = self.moveLayerTimer + dt + if self.keepTop and self.moveLayerTimer > 0.5 then + self.moveLayerTimer = 0x0 + self:MoveToFront() + end + end + +--[[ + self.mainbutton.old_OnControl = self.mainbutton.OnControl + self.mainbutton.OnControl = function(self, control, down) + if control == self.control then + if down then + if not self.down then + self.dragging = true + self.draggingPos.x, self.draggingPos.y = GetScreenPos() + end + else + if self.down then + self.dragging = false + self.draggingPos = {x = 0, y = 0} + self.draggingTimer = 0 + end + end + end + self.old_OnControl(self, control, down) + end + + self.mainbutton.OnUpdate = function(self, dt) + dt = dt or 0x0 + if self.down then + if self.whiledown then + self.draggingTimer = self.draggingTimer + dt + self.whiledown() + end + end + end + + self.mainbutton:SetWhileDown(function() + if self.mainbutton.draggable and self.mainbutton.dragging then + local x, y = GetScreenPos() + local diff_x = x - self.mainbutton.draggingPos.x + local diff_y = y - self.mainbutton.draggingPos.y + self.mainbutton.draggingPos.x = x + self.mainbutton.draggingPos.y = y + + local next_pos = self.mainbutton:GetPosition() + print('next_pos.x='..next_pos.x..'next_y='..next_pos.y) + next_pos.x = next_pos.x + diff_x*1.15 + next_pos.y = next_pos.y + diff_y*1.15 + self.mainbutton.o_pos = next_pos + self.mainbutton:SetPosition(next_pos) + + local next_pos_c = self.coinamount:GetPosition() + next_pos_c.x = next_pos_c.x + diff_x*1.15 + next_pos_c.y = next_pos_c.y + diff_y*1.15 + self.coinamount.o_pos = next_pos_c + self.coinamount:SetPosition(next_pos_c) + end + end) + +]]-- + + self.mainbutton:SetOnClick(function() + if TheInput:IsKeyDown(KEY_CTRL) then + if self.cooldown then + if TheInput:IsKeyDown(KEY_SHIFT) then + TheNet:Say(STRINGS.LMB..STRINGS.SIMPLEECONOMY[14]..self.owner.seccoin:value()..STRINGS.SIMPLEECONOMY[15], true) + else + TheNet:Say(STRINGS.LMB..STRINGS.SIMPLEECONOMY[16]..self.owner.seccoin:value()..STRINGS.SIMPLEECONOMY[17], false) + end + self.cooldown = false + self.owner:DoTaskInTime(5, function() self.cooldown = true end) + end + else + if self.mainui.shown then + self:onclose() + else + self:onopen() + end + end + end) + + self.mainbutton.new = self.mainbutton:AddChild(Image("images/sehud/new.xml", "new.tex")) + self.mainbutton.new.middle = 15 + self.mainbutton.new:SetPosition(15, self.mainbutton.new.middle, 0) + self.mainbutton.new:SetClickable(false) + self.mainbutton.new:Hide() + self.mainbuttonnewmove = true + self.owner:DoPeriodicTask(.25, function() + if self.mainbuttonnewmove == true then + self.mainbutton.new:MoveTo(Vector3(15, self.mainbutton.new.middle-2, 0), Vector3(15, self.mainbutton.new.middle+2, 0), .25) + self.mainbuttonnewmove = false + else + self.mainbutton.new:MoveTo(Vector3(15, self.mainbutton.new.middle+2, 0), Vector3(15, self.mainbutton.new.middle-2, 0), .25) + self.mainbuttonnewmove = true + end + end) + +self.mainui.goodslist = self.mainui:AddChild(Widget("goodslist")) + self.mainui.goodslist:SetPosition(-530, 190, 0) + self.mainui.goodslist:SetScale(.99,.99,1) + self.listslot = {} + self:buildlist("food") + self.title = "food" + +self.mainui.buttonfood = self.mainui:AddChild(ImageButton("images/sehud/food_act_"..TUNING.SElan..".xml", "food_act_"..TUNING.SElan..".tex")) --下方五个按键 + self.mainui.buttonfood:SetPosition(-530, -315, 0) + self.mainui.buttonfood:SetNormalScale(1,1,1) + self.mainui.buttonfood:SetFocusScale(1,1,1) + self.mainui.buttonfood:SetOnGainFocus(function() self.mainui.buttonfood:ScaleTo(1,1.15,.125) end) + self.mainui.buttonfood:SetOnLoseFocus(function() self.mainui.buttonfood:ScaleTo(1.15,1,.25) end) + self.mainui.buttonfood:SetOnClick(function() + self.numpage = 1 + self:buildbutton("food") + end) + + self.mainui.buttonfood.uplow = self.mainui.buttonfood:AddChild(Image("images/sehud/up.xml", "up.tex")) + self.mainui.buttonfood.uplow:SetPosition(20, 20, 0) + self.mainui.buttonfood.uplow:SetClickable(false) + self.mainui.buttonfood.uplow:Hide() + self.buttonfoodmove = true + self.owner:DoPeriodicTask(.25, function() + if self.buttonfoodmove == true then + self.mainui.buttonfood.uplow:MoveTo(Vector3(20, 20-2, 0), Vector3(20, 20+2, 0), .25) + self.buttonfoodmove = false + else + self.mainui.buttonfood.uplow:MoveTo(Vector3(20, 20+2, 0), Vector3(20, 20-2, 0), .25) + self.buttonfoodmove = true + end + end) + +self.mainui.buttoncloth = self.mainui:AddChild(ImageButton("images/sehud/cloth_dact_"..TUNING.SElan..".xml", "cloth_dact_"..TUNING.SElan..".tex")) --穿戴按钮 + self.mainui.buttoncloth:SetPosition(-440, -315, 0) + self.mainui.buttoncloth:SetNormalScale(1,1,1) + self.mainui.buttoncloth:SetFocusScale(1,1,1) + self.mainui.buttoncloth:SetOnGainFocus(function() self.mainui.buttoncloth:ScaleTo(1,1.15,.125) end) + self.mainui.buttoncloth:SetOnLoseFocus(function() self.mainui.buttoncloth:ScaleTo(1.15,1,.25) end) + self.mainui.buttoncloth:SetOnClick(function() + self.numpage = 1 + self:buildbutton("cloth") + end) + + self.mainui.buttoncloth.uplow = self.mainui.buttoncloth:AddChild(Image("images/sehud/up.xml", "up.tex")) + self.mainui.buttoncloth.uplow:SetPosition(20, 20, 0) + self.mainui.buttoncloth.uplow:SetClickable(false) + self.mainui.buttoncloth.uplow:Hide() + self.buttonclothmove = true + self.owner:DoPeriodicTask(.25, function() + if self.buttonclothmove == true then + self.mainui.buttoncloth.uplow:MoveTo(Vector3(20, 20-2, 0), Vector3(20, 20+2, 0), .25) + self.buttonclothmove = false + else + self.mainui.buttoncloth.uplow:MoveTo(Vector3(20, 20+2, 0), Vector3(20, 20-2, 0), .25) + self.buttonclothmove = true + end + end) + +self.mainui.buttonsmithing = self.mainui:AddChild(ImageButton("images/sehud/smithing_dact_"..TUNING.SElan..".xml", "smithing_dact_"..TUNING.SElan..".tex")) --锻造按钮 + self.mainui.buttonsmithing:SetPosition(-350, -315, 0) + self.mainui.buttonsmithing:SetNormalScale(1,1,1) + self.mainui.buttonsmithing:SetFocusScale(1,1,1) + self.mainui.buttonsmithing:SetOnGainFocus(function() self.mainui.buttonsmithing:ScaleTo(1,1.15,.125) end) + self.mainui.buttonsmithing:SetOnLoseFocus(function() self.mainui.buttonsmithing:ScaleTo(1.15,1,.25) end) + self.mainui.buttonsmithing:SetOnClick(function() + self.numpage = 1 + self:buildbutton("smithing") + end) + + self.mainui.buttonsmithing.uplow = self.mainui.buttonsmithing:AddChild(Image("images/sehud/up.xml", "up.tex")) + self.mainui.buttonsmithing.uplow:SetPosition(20, 20, 0) + self.mainui.buttonsmithing.uplow:SetClickable(false) + self.mainui.buttonsmithing.uplow:Hide() + self.buttonsmithingmove = true + self.owner:DoPeriodicTask(.25, function() + if self.buttonsmithingmove == true then + self.mainui.buttonsmithing.uplow:MoveTo(Vector3(20, 20-2, 0), Vector3(20, 20+2, 0), .25) + self.buttonsmithingmove = false + else + self.mainui.buttonsmithing.uplow:MoveTo(Vector3(20, 20+2, 0), Vector3(20, 20-2, 0), .25) + self.buttonsmithingmove = true + end + end) + +self.mainui.buttonresource = self.mainui:AddChild(ImageButton("images/sehud/resource_dact_"..TUNING.SElan..".xml", "resource_dact_"..TUNING.SElan..".tex")) --资源按钮 + self.mainui.buttonresource:SetPosition(-260, -315, 0) + self.mainui.buttonresource:SetNormalScale(1,1,1) + self.mainui.buttonresource:SetFocusScale(1,1,1) + self.mainui.buttonresource:SetOnGainFocus(function() self.mainui.buttonresource:ScaleTo(1,1.15,.125) end) + self.mainui.buttonresource:SetOnLoseFocus(function() self.mainui.buttonresource:ScaleTo(1.15,1,.25) end) + self.mainui.buttonresource:SetOnClick(function() + self.numpage = 1 + self:buildbutton("resource") + end) + + self.mainui.buttonresource.uplow = self.mainui.buttonresource:AddChild(Image("images/sehud/up.xml", "up.tex")) + self.mainui.buttonresource.uplow:SetPosition(20, 20, 0) + self.mainui.buttonresource.uplow:SetClickable(false) + self.mainui.buttonresource.uplow:Hide() + self.buttonresourcemove = true + self.owner:DoPeriodicTask(.25, function() + if self.buttonresourcemove == true then + self.mainui.buttonresource.uplow:MoveTo(Vector3(20, 20-2, 0), Vector3(20, 20+2, 0), .25) + self.buttonresourcemove = false + else + self.mainui.buttonresource.uplow:MoveTo(Vector3(20, 20+2, 0), Vector3(20, 20-2, 0), .25) + self.buttonresourcemove = true + end + end) + +self.mainui.buttonsail = self.mainui:AddChild(ImageButton("images/sehud/sail_dact_"..TUNING.SElan..".xml", "sail_dact_"..TUNING.SElan..".tex")) --航海按钮 + self.mainui.buttonsail:SetPosition(-170, -315, 0) + self.mainui.buttonsail:SetNormalScale(1,1,1) + self.mainui.buttonsail:SetFocusScale(1,1,1) + self.mainui.buttonsail:SetOnGainFocus(function() self.mainui.buttonsail:ScaleTo(1,1.15,.125) end) + self.mainui.buttonsail:SetOnLoseFocus(function() self.mainui.buttonsail:ScaleTo(1.15,1,.25) end) + self.mainui.buttonsail:SetOnClick(function() + self.numpage = 1 + self:buildbutton("sail") + end) + + self.mainui.buttonsail.uplow = self.mainui.buttonsail:AddChild(Image("images/sehud/up.xml", "up.tex")) + self.mainui.buttonsail.uplow:SetPosition(20, 20, 0) + self.mainui.buttonsail.uplow:SetClickable(false) + self.mainui.buttonsail.uplow:Hide() + self.buttonsailmove = true + self.owner:DoPeriodicTask(.25, function() + if self.buttonsailmove == true then + self.mainui.buttonsail.uplow:MoveTo(Vector3(20, 20-2, 0), Vector3(20, 20+2, 0), .25) + self.buttonsailmove = false + else + self.mainui.buttonsail.uplow:MoveTo(Vector3(20, 20+2, 0), Vector3(20, 20-2, 0), .25) + self.buttonsailmove = true + end + end) + +self.mainui.buttonprecious = self.mainui:AddChild(ImageButton("images/sehud/precious_dact_"..TUNING.SElan..".xml", "precious_dact_"..TUNING.SElan..".tex")) --珍稀按钮 + self.mainui.buttonprecious:SetPosition(-80, -315, 0) + self.mainui.buttonprecious:SetNormalScale(1,1,1) + self.mainui.buttonprecious:SetFocusScale(1,1,1) + self.mainui.buttonprecious:SetOnGainFocus(function() self.mainui.buttonprecious:ScaleTo(1,1.15,.125) end) + self.mainui.buttonprecious:SetOnLoseFocus(function() self.mainui.buttonprecious:ScaleTo(1.15,1,.25) end) + self.mainui.buttonprecious:SetOnClick(function() + self.numpage = 1 + self:buildbutton("precious") + end) + + self.mainui.buttonprecious.new = self.mainui.buttonprecious:AddChild(Image("images/sehud/new.xml", "new.tex")) + self.mainui.buttonprecious.new:SetPosition(20, 20, 0) + self.mainui.buttonprecious.new:SetClickable(false) + self.mainui.buttonprecious.new:Hide() + self.preciousnewmove = true + self.owner:DoPeriodicTask(.25, function() + if self.preciousnewmove == true then + self.mainui.buttonprecious.new:MoveTo(Vector3(20, 20-2, 0), Vector3(20, 20+2, 0), .25) + self.preciousnewmove = false + else + self.mainui.buttonprecious.new:MoveTo(Vector3(20, 20+2, 0), Vector3(20, 20-2, 0), .25) + self.preciousnewmove = true + end + end) + + self.mainui.refresh = self.mainui:AddChild(ImageButton("images/sehud/refresh.xml", "refresh.tex")) --刷新按钮 + self.mainui.refresh:SetPosition(120, -315, 0) + self.mainui.refresh:SetNormalScale(1,1,1) + self.mainui.refresh:SetFocusScale(1,1,1) + self.mainui.refresh:SetHoverText(STRINGS.SIMPLEECONOMY[20]) + self.mainui.refresh:SetOnGainFocus(function() self.mainui.refresh:ScaleTo(1,1.15,.125) end) + self.mainui.refresh:SetOnLoseFocus(function() self.mainui.refresh:ScaleTo(1.15,1,.25) end) + self.mainui.refresh:Hide() + self.mainui.refresh:SetOnClick(function() + self:onrefresh() + end) + +self.mainui.infopage = self.mainui:AddChild(Image("images/sehud/infopage_"..TUNING.SElan..".xml", "infopage_"..TUNING.SElan..".tex")) + self.mainui.infopage:SetPosition(0, 0, 0) + self.mainui.infopage:Hide() + +self.mainui.close = self.mainui:AddChild(ImageButton("images/sehud/close.xml", "close.tex")) --关闭按钮 + self.mainui.close:SetPosition(65, -315, 0) + self.mainui.close:SetNormalScale(1,1,1) + self.mainui.close:SetFocusScale(1,1,1) + self.mainui.close:SetHoverText(STRINGS.SIMPLEECONOMY[5]) + self.mainui.close:SetOnGainFocus(function() self.mainui.close:ScaleTo(1,1.15,.125) end) + self.mainui.close:SetOnLoseFocus(function() self.mainui.close:ScaleTo(1.15,1,.25) end) + self.mainui.close:SetOnClick(function() + self:onclose() + end) + +self.mainui.infobutton = self.mainui:AddChild(ImageButton("images/sehud/infobutton.xml", "infobutton.tex")) --更多信息按钮 + self.mainui.infobutton:SetPosition(10, -315, 0) + self.mainui.infobutton:SetNormalScale(1,1,1) + self.mainui.infobutton:SetFocusScale(1,1,1) + self.mainui.infobutton:SetHoverText(STRINGS.SIMPLEECONOMY[3]) + self.mainui.infobutton:SetOnGainFocus(function() self.mainui.infobutton:ScaleTo(1,1.15,.125) end) + self.mainui.infobutton:SetOnLoseFocus(function() self.mainui.infobutton:ScaleTo(1.15,1,.25) end) + self.mainui.infobutton:SetOnClick(function() + if self.mainui.infopage.shown then + self.mainui.infobutton:SetTextures("images/sehud/infobutton.xml", "infobutton.tex") + self.mainui.infobutton:SetHoverText(STRINGS.SIMPLEECONOMY[3]) + self.mainui.goodslist:Show() + self.mainui.status:Show() + self.mainui.next:Show() + self.mainui.back:Show() + self.mainui.infopage:Hide() + else + self.mainui.infobutton:SetTextures("images/sehud/infoback.xml", "infoback.tex") + self.mainui.infobutton:SetHoverText(STRINGS.SIMPLEECONOMY[4]) + self.mainui.goodslist:Hide() + self.mainui.status:Hide() + self.mainui.next:Hide() + self.mainui.back:Hide() + self.mainui.infopage:Show() + end + end) + +self.mainui.next = self.mainui:AddChild(ImageButton("images/sehud/next.xml", "next.tex")) + self.mainui.next:SetPosition(170, -200, 0) + self.mainui.next:SetNormalScale(1,1,1) + self.mainui.next:SetFocusScale(1,1,1) + self.mainui.next:SetHoverText(STRINGS.SIMPLEECONOMY[6]) + self.mainui.next.image:SetTint(1,1,1,1) + self.mainui.next:SetOnGainFocus(function() self.mainui.next:ScaleTo(1,1.15,.125) end) + self.mainui.next:SetOnLoseFocus(function() self.mainui.next:ScaleTo(1.15,1,.25) end) + self.mainui.next:SetOnClick(function() + if self.numpage < self.maxpage then + self.numpage = self.numpage + 1 + self:buildlist(self.title) + self.mainui.back.image:SetTint(1,1,1,1) + if self.numpage >= self.maxpage then + self.mainui.next.image:SetTint(1,1,1,.5) + end + end + end) + +self.mainui.back = self.mainui:AddChild(ImageButton("images/sehud/back.xml", "back.tex")) + self.mainui.back:SetPosition(120, -200, 0) + self.mainui.back:SetNormalScale(1,1,1) + self.mainui.back:SetFocusScale(1,1,1) + self.mainui.back:SetHoverText(STRINGS.SIMPLEECONOMY[7]) + self.mainui.back.image:SetTint(1,1,1,.5) + self.mainui.back:SetOnGainFocus(function() self.mainui.back:ScaleTo(1,1.15,.125) end) + self.mainui.back:SetOnLoseFocus(function() self.mainui.back:ScaleTo(1.15,1,.25) end) + self.mainui.back:SetOnClick(function() + if self.numpage > 1 then + self.numpage = self.numpage - 1 + self:buildlist(self.title) + self.mainui.next.image:SetTint(1,1,1,1) + if self.numpage <= 1 then + self.mainui.back.image:SetTint(1,1,1,.5) + end + end + end) + +self.owner:DoTaskInTime(.2, function() + --self.numpage = 1 + --self:loadlist() + --self:loadcoinlist() + --self.maxnumpage = math.ceil(#self.achivlist/14) + --self.achivlistbg = {} + --self.achivlisttile = {} + --self.coinlistbutton = {} + --self:build() + --self:coinbuild() + self.vip = -1 + self.money = 0 + self.level = 0 + self.secpreciouschange = false + self.seasonchange = false + self.soundm = false + self:uplowchange() + self:StartUpdating() + end) +end) + +function uiseconomy:OnUpdate(dt) + if self.money ~= self.owner.seccoin:value() then + self:displaycoinamount(self.coinamount.num) + self:displaycoinamount(self.mainui.status.coinamount.num) + self.money = self.owner.seccoin:value() + end + if self.level ~= self.owner.seclevel:value() then + for i=1, 5 do + if self.owner.seclevel:value() >= i then + self.mainui.status.level[i]:SetTexture("images/sehud/level_act.xml", "level_act.tex") + else + self.mainui.status.level[i]:SetTexture("images/sehud/level_dact.xml", "level_dact.tex") + end + end + self.mainui.status.swdjinfo:SetTexture("images/sehud/swdj_"..TUNING.SElan..self.owner.seclevel:value()..".xml", "swdj_"..TUNING.SElan..self.owner.seclevel:value()..".tex") + self.mainui.status.vipinfo:SetTexture("images/sehud/vip"..(self.owner.seclevel:value()*self.owner.secvip:value())..".xml", "vip"..(self.owner.seclevel:value()*self.owner.secvip:value())..".tex") + self.level = self.owner.seclevel:value() + end + if self.vip ~= self.owner.secvip:value() then + self.mainui.status.vipinfo:SetTexture("images/sehud/vip"..(self.owner.seclevel:value()*self.owner.secvip:value())..".xml", "vip"..(self.owner.seclevel:value()*self.owner.secvip:value())..".tex") + self.vip = self.owner.secvip:value() + end + local currentexp = self.owner.secexp:value() + local maxexp = (self.owner.seclevel:value()+1)^3*1000 + if self.owner.seclevel:value() >= 5 then maxexp = self.owner.seclevel:value()^3*1000 end + local percent = math.ceil(currentexp/maxexp*100)/100 + self.mainui.status.expact:SetScale(percent, 1, 1) + self.mainui.status.expmask:SetHoverText(currentexp.."/"..maxexp) + if self.secpreciouschange ~= self.owner.secpreciouschange:value() then + if self.title == "precious" then + self:buildlist(self.title) + end + if not self.mainui.shown then + self.mainbutton.new:Show() + self.mainui.buttonprecious.new:Show() + else + self.mainui.buttonprecious.new:Show() + end + self.secpreciouschange = self.owner.secpreciouschange:value() + end + if self.seasonchange ~= TUNING.SEseasonchange then + self:uplowchange() + self.seasonchange = TUNING.SEseasonchange + end + if self.soundm ~= self.owner.secsoundm:value() then + --TheFocalPoint.SoundEmitter:PlaySound("dontstarve/HUD/research_available") + TheFrontEnd:GetSound():PlaySound("dontstarve/HUD/research_available") + self.soundm = self.owner.secsoundm:value() + end +end + +function uiseconomy:uplowchange() + local buttonname = {"food", "cloth", "smithing", "resource", "sail"} + for i=1, #buttonname do + local seasont = nil + local buttont = nil + if buttonname[i] == "food" then seasont = TUNING.seseasonfood buttont = self.mainui.buttonfood end + if buttonname[i] == "cloth" then seasont = TUNING.seseasoncloth buttont = self.mainui.buttoncloth end + if buttonname[i] == "smithing" then seasont = TUNING.seseasonsmithing buttont = self.mainui.buttonsmithing end + if buttonname[i] == "resource" then seasont = TUNING.seseasonresource buttont = self.mainui.buttonresource end + if buttonname[i] == "sail" then seasont = TUNING.seseasonsail buttont = self.mainui.buttonsail end + if seasont == 1 then + buttont.uplow:Hide() + end + if seasont == .5 then + buttont.uplow:Show() + buttont.uplow:SetTexture("images/sehud/low.xml", "low.tex") + end + if seasont == 1.5 then + buttont.uplow:Show() + buttont.uplow:SetTexture("images/sehud/up.xml", "up.tex") + end + end + self:buildlist(self.title) +end + +local function lock(checklist) + local code = 0 + + for k,v in pairs(checklist) do + code = code + v.price + end + + return code +end + +function uiseconomy:buildlist(title) --创建商品列表 + local list = {} + if title == "food" then list = TUNING.selist_food end --将打开的列表商品载入 + if title == "cloth" then list = TUNING.selist_cloth end + if title == "smithing" then list = TUNING.selist_smithing end + if title == "resource" then list = TUNING.selist_resource end + if title == "sail" then list = TUNING.selist_sail end + --if title == "precious" then list = TUNING.selist_precious end + if title == "precious" then --珍稀品 + local secp = self.owner.secprecious:value() + for i=1, 10+4*self.owner.seclevel:value() do + table.insert(list, selist_precious[secp[i]]) + end + end + + local checklist = {} + local c_secp = self.owner.secprecious:value() + for i=1, 10+4*self.owner.seclevel:value() do + table.insert(checklist, selist_precious[c_secp[i]]) + end + + self.maxpage = math.ceil(#list/48) + + self.mainui.goodslist:KillAllChildren() --清除所有之前的商品 + + local x = 0 + local y = 0 + for i = 1+48*(self.numpage-1), math.min(#list, 48*(1+self.numpage-1)) do + if math.ceil((i-48*(self.numpage-1))/10) ~= math.ceil((i-48*(self.numpage-1)-1)/10) then x = 0 else x = x + 80 end + y = -100*(math.ceil((i-48*(self.numpage-1))/10)-1) + + self.listslot[i] = self.mainui.goodslist:AddChild(ImageButton("images/sehud/slotbg_normal.xml", "slotbg_normal.tex")) + if title == "food" then + self.listslot[i]:SetTextures("images/sehud/slotbg_fresh.xml", "slotbg_fresh.tex") + end + self.listslot[i]:SetPosition(x, y, 0) + self.listslot[i]:SetNormalScale(1,1,1) + self.listslot[i]:SetFocusScale(1,1,1) + self.listslot[i]:SetOnGainFocus(function() self.listslot[i]:ScaleTo(1,1.15,.125) end) + self.listslot[i]:SetOnLoseFocus(function() self.listslot[i]:ScaleTo(1.15,1,.25) end) + self.listslot[i].im = self.listslot[i]:AddChild(Image("images/inventoryimages.xml", list[i].name..".tex")) --在所有inventoryinmages中加载图标 + self.listslot[i].im:SetPosition(0, 10, 0) + self.listslot[i].im:SetScale(.95,.95,1) + self.listslot[i].im = self.listslot[i]:AddChild(Image("images/inventoryimages1.xml", list[i].name..".tex")) + self.listslot[i].im:SetPosition(0, 10, 0) + self.listslot[i].im:SetScale(.95,.95,1) + self.listslot[i].im = self.listslot[i]:AddChild(Image("images/inventoryimages2.xml", list[i].name..".tex")) + self.listslot[i].im:SetPosition(0, 10, 0) + self.listslot[i].im:SetScale(.95,.95,1) + if list[i].name == "tomato" or list[i].name == "onion" then + self.listslot[i].im = self.listslot[i]:AddChild(Image("images/inventoryimages2.xml", "quagmire_"..list[i].name..".tex")) + self.listslot[i].im:SetPosition(0, 10, 0) + self.listslot[i].im:SetScale(.95,.95,1) + end + + if list[i].name == "blueprint" then + self.listslot[i]:SetHoverText(STRINGS.SIMPLEECONOMY[8]) + else + self.listslot[i]:SetHoverText(STRINGS.NAMES[string.upper(list[i].name)]) + end + local p1 = self.listslot[i].hovertext:GetPosition() + local p2 = self.listslot[i].hovertext_bg:GetPosition() + self.listslot[i].hovertext:SetPosition(p1.x,p1.y+30,p1.z) + self.listslot[i].hovertext_bg:SetPosition(p2.x,p2.y+30,p2.z) + + self.listslot[i].num1 = self.listslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.listslot[i].num1:SetPosition(3, -33, 0) + self.listslot[i].num1:SetScale(1.15, 1.15, 1) + self.listslot[i].num2 = self.listslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.listslot[i].num2:SetPosition(11, -33, 0) + self.listslot[i].num2:SetScale(1.15, 1.15, 1) + self.listslot[i].num3 = self.listslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.listslot[i].num3:SetPosition(19, -33, 0) + self.listslot[i].num3:SetScale(1.15, 1.15, 1) + self.listslot[i].num4 = self.listslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.listslot[i].num4:SetPosition(27, -33, 0) + self.listslot[i].num4:SetScale(1.15, 1.15, 1) + local m = list[i].price + local num1 = 0 + local num2 = 0 + local num3 = 0 + local num4 = 0 + if m >= 1000 then + num1 = math.floor(m/1000) + num2 = math.floor((m - num1*1000)/100) + num3 = math.floor((m - num1*1000 - num2*100)/10) + num4 = math.floor((m - num1*1000 - num2*100 - num3*10)/1) + end + if m >= 100 and m < 1000 then + num1 = 0 + num2 = math.floor(m/100) + num3 = math.floor((m - num2*100)/10) + num4 = math.floor((m - num2*100 - num3*10)/1) + self.listslot[i].num1:Hide() + end + if m >= 10 and m < 100 then + num1 = 0 + num2 = 0 + num3 = math.floor(m/10) + num4 = math.floor((m - num3*10)/1) + self.listslot[i].num1:Hide() + self.listslot[i].num2:Hide() + end + if m < 10 then + num1 = 0 + num2 = 0 + num3 = 0 + num4 = m + self.listslot[i].num1:Hide() + self.listslot[i].num2:Hide() + self.listslot[i].num3:Hide() + end + self.listslot[i].num1:SetTexture("images/sehud/numbers/"..num1..".xml", num1..".tex") + self.listslot[i].num2:SetTexture("images/sehud/numbers/"..num2..".xml", num2..".tex") + self.listslot[i].num3:SetTexture("images/sehud/numbers/"..num3..".xml", num3..".tex") + self.listslot[i].num4:SetTexture("images/sehud/numbers/"..num4..".xml", num4..".tex") + --self.listslot[i]:SetOnClick(function() + -- SendModRPCToServer(MOD_RPC["SimpleEconomy"]["buy"], list[i].name, list[i].price, false) + --end) + self.listslot[i].OnControl = function(self, control, down) + if not self:IsEnabled() or not self.focus or self:IsSelected() then return end + if control == CONTROL_ACCEPT or control == CONTROL_SECONDARY then + if down then + TheFrontEnd:GetSound():PlaySound("dontstarve/HUD/click_move") + self.o_pos = self:GetLocalPosition() + self:SetPosition(self.o_pos + self.clickoffset) + self.down = true + if self.whiledown then + self:StartUpdating() + end + if self.ondown then + self.ondown() + end + else + if self.down then + self.down = false + self:SetPosition(self.o_pos) + + if control == CONTROL_ACCEPT then + SendModRPCToServer(MOD_RPC["SimpleEconomy"]["buy"], list[i].name, list[i].price, false, lock(checklist)) + elseif control == CONTROL_SECONDARY then + SendModRPCToServer(MOD_RPC["SimpleEconomy"]["buy"], list[i].name, list[i].price, true, lock(checklist)) + end + self:StopUpdating() + end + end + return true + end + end + end +end + +function uiseconomy:spitembuild(distance) --特殊商品创建 + local list = TUNING.selist_special + + self.mainui.status.specialitem:KillAllChildren() + + local x = 0 + for i = 1, #list do + x = distance*(i-2.5) + + self.spitemslot[i] = self.mainui.status.specialitem:AddChild(ImageButton("images/sehud/slotbg_special.xml", "slotbg_special.tex")) + self.spitemslot[i]:SetPosition(x, 0, 0) + self.spitemslot[i]:SetNormalScale(1,1,1) + self.spitemslot[i]:SetFocusScale(1,1,1) + self.spitemslot[i]:SetOnGainFocus(function() self.spitemslot[i]:ScaleTo(1,1.15,.125) end) + self.spitemslot[i]:SetOnLoseFocus(function() self.spitemslot[i]:ScaleTo(1.15,1,.25) end) + + self.spitemslot[i].im = self.spitemslot[i]:AddChild(Image("images/inventoryimages/"..list[i].name..".xml", list[i].name..".tex")) + self.spitemslot[i].im:SetPosition(0, 10, 0) + self.spitemslot[i].im:SetScale(.95,.95,1) + + self.spitemslot[i]:SetHoverText(STRINGS.NAMES[string.upper(list[i].name)]) + local p1 = self.spitemslot[i].hovertext:GetPosition() + local p2 = self.spitemslot[i].hovertext_bg:GetPosition() + self.spitemslot[i].hovertext:SetPosition(p1.x,p1.y+30,p1.z) + self.spitemslot[i].hovertext_bg:SetPosition(p2.x,p2.y+30,p2.z) + + self.spitemslot[i].num1 = self.spitemslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.spitemslot[i].num1:SetPosition(3, -33, 0) + self.spitemslot[i].num1:SetScale(1.15, 1.15, 1) + self.spitemslot[i].num2 = self.spitemslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.spitemslot[i].num2:SetPosition(11, -33, 0) + self.spitemslot[i].num2:SetScale(1.15, 1.15, 1) + self.spitemslot[i].num3 = self.spitemslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.spitemslot[i].num3:SetPosition(19, -33, 0) + self.spitemslot[i].num3:SetScale(1.15, 1.15, 1) + self.spitemslot[i].num4 = self.spitemslot[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.spitemslot[i].num4:SetPosition(27, -33, 0) + self.spitemslot[i].num4:SetScale(1.15, 1.15, 1) + local m = list[i].price + local num1 = 0 + local num2 = 0 + local num3 = 0 + local num4 = 0 + if m >= 1000 then + num1 = math.floor(m/1000) + num2 = math.floor((m - num1*1000)/100) + num3 = math.floor((m - num1*1000 - num2*100)/10) + num4 = math.floor((m - num1*1000 - num2*100 - num3*10)/1) + end + if m >= 100 and m < 1000 then + num1 = 0 + num2 = math.floor(m/100) + num3 = math.floor((m - num2*100)/10) + num4 = math.floor((m - num2*100 - num3*10)/1) + self.spitemslot[i].num1:Hide() + end + if m >= 10 and m < 100 then + num1 = 0 + num2 = 0 + num3 = math.floor(m/10) + num4 = math.floor((m - num3*10)/1) + self.spitemslot[i].num1:Hide() + self.spitemslot[i].num2:Hide() + end + if m < 10 then + num1 = 0 + num2 = 0 + num3 = 0 + num4 = m + self.spitemslot[i].num1:Hide() + self.spitemslot[i].num2:Hide() + self.spitemslot[i].num3:Hide() + end + self.spitemslot[i].num1:SetTexture("images/sehud/numbers/"..num1..".xml", num1..".tex") + self.spitemslot[i].num2:SetTexture("images/sehud/numbers/"..num2..".xml", num2..".tex") + self.spitemslot[i].num3:SetTexture("images/sehud/numbers/"..num3..".xml", num3..".tex") + self.spitemslot[i].num4:SetTexture("images/sehud/numbers/"..num4..".xml", num4..".tex") + self.spitemslot[i]:SetOnClick(function() + --SendModRPCToServer(MOD_RPC["SimpleEconomy"][list[i].name]) + + local checklist = {} + local c_secp = self.owner.secprecious:value() + for i=1, 10+4*self.owner.seclevel:value() do + table.insert(checklist, selist_precious[c_secp[i]]) + end + + SendModRPCToServer(MOD_RPC["SimpleEconomy"]["buy"], list[i].name, list[i].price, false, lock(checklist)) + end) + end +end + +function uiseconomy:cbbuild(distance) --钱袋创建 + local list = { + [1] = {name = "100金币",price = 100,amount = 100,}, + [2] = {name = "1000金币",price = 1000,amount = 1000}, + [3] = {name = "10000金币",price = 9999,amount = 9999}, + } + + self.mainui.wrapcoin.coinbundle:KillAllChildren() + + local y = 0 + for i = 1, #list do + y = distance*(i-2.5) + + self.coin_bundle[i] = self.mainui.wrapcoin.coinbundle:AddChild(ImageButton("images/sehud/slotbg_special.xml", "slotbg_special.tex")) + self.coin_bundle[i]:SetPosition(0, y, 0) + self.coin_bundle[i]:SetNormalScale(1,1,1) + self.coin_bundle[i]:SetFocusScale(1,1,1) + self.coin_bundle[i]:SetOnGainFocus(function() self.coin_bundle[i]:ScaleTo(1,1.15,.125) end) + self.coin_bundle[i]:SetOnLoseFocus(function() self.coin_bundle[i]:ScaleTo(1.15,1,.25) end) + + self.coin_bundle[i].im = self.coin_bundle[i]:AddChild(Image("images/inventoryimages/coin_bundle.xml", "coin_bundle.tex")) + self.coin_bundle[i].im:SetPosition(0, 10, 0) + self.coin_bundle[i].im:SetScale(.95,.95,1) + + self.coin_bundle[i]:SetHoverText(list[i].name) + local p1 = self.coin_bundle[i].hovertext:GetPosition() + local p2 = self.coin_bundle[i].hovertext_bg:GetPosition() + self.coin_bundle[i].hovertext:SetPosition(p1.x,p1.y+30,p1.z) + self.coin_bundle[i].hovertext_bg:SetPosition(p2.x,p2.y+30,p2.z) + + self.coin_bundle[i].num1 = self.coin_bundle[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.coin_bundle[i].num1:SetPosition(3, -33, 0) + self.coin_bundle[i].num1:SetScale(1.15, 1.15, 1) + self.coin_bundle[i].num2 = self.coin_bundle[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.coin_bundle[i].num2:SetPosition(11, -33, 0) + self.coin_bundle[i].num2:SetScale(1.15, 1.15, 1) + self.coin_bundle[i].num3 = self.coin_bundle[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.coin_bundle[i].num3:SetPosition(19, -33, 0) + self.coin_bundle[i].num3:SetScale(1.15, 1.15, 1) + self.coin_bundle[i].num4 = self.coin_bundle[i]:AddChild(Image("images/sehud/numbers/0.xml", "0.tex")) + self.coin_bundle[i].num4:SetPosition(27, -33, 0) + self.coin_bundle[i].num4:SetScale(1.15, 1.15, 1) + local m = list[i].price + local num1 = 0 + local num2 = 0 + local num3 = 0 + local num4 = 0 + if m >= 1000 then + num1 = math.floor(m/1000) + num2 = math.floor((m - num1*1000)/100) + num3 = math.floor((m - num1*1000 - num2*100)/10) + num4 = math.floor((m - num1*1000 - num2*100 - num3*10)/1) + end + if m >= 100 and m < 1000 then + num1 = 0 + num2 = math.floor(m/100) + num3 = math.floor((m - num2*100)/10) + num4 = math.floor((m - num2*100 - num3*10)/1) + self.coin_bundle[i].num1:Hide() + end + if m >= 10 and m < 100 then + num1 = 0 + num2 = 0 + num3 = math.floor(m/10) + num4 = math.floor((m - num3*10)/1) + self.coin_bundle[i].num1:Hide() + self.coin_bundle[i].num2:Hide() + end + if m < 10 then + num1 = 0 + num2 = 0 + num3 = 0 + num4 = m + self.coin_bundle[i].num1:Hide() + self.coin_bundle[i].num2:Hide() + self.coin_bundle[i].num3:Hide() + end + self.coin_bundle[i].num1:SetTexture("images/sehud/numbers/"..num1..".xml", num1..".tex") + self.coin_bundle[i].num2:SetTexture("images/sehud/numbers/"..num2..".xml", num2..".tex") + self.coin_bundle[i].num3:SetTexture("images/sehud/numbers/"..num3..".xml", num3..".tex") + self.coin_bundle[i].num4:SetTexture("images/sehud/numbers/"..num4..".xml", num4..".tex") + self.coin_bundle[i]:SetOnClick(function() + --SendModRPCToServer(MOD_RPC["SimpleEconomy"][list[i].name]) + SendModRPCToServer(MOD_RPC["SimpleEconomy"]["wrapcoin"], list[i].amount, list[i].price) + end) + end +end + +function uiseconomy:buildbutton(title) + self.mainui.buttonfood:SetTextures("images/sehud/food_dact_"..TUNING.SElan..".xml", "food_dact_"..TUNING.SElan..".tex") + self.mainui.buttoncloth:SetTextures("images/sehud/cloth_dact_"..TUNING.SElan..".xml", "cloth_dact_"..TUNING.SElan..".tex") + self.mainui.buttonsmithing:SetTextures("images/sehud/smithing_dact_"..TUNING.SElan..".xml", "smithing_dact_"..TUNING.SElan..".tex") + self.mainui.buttonresource:SetTextures("images/sehud/resource_dact_"..TUNING.SElan..".xml", "resource_dact_"..TUNING.SElan..".tex") + self.mainui.buttonsail:SetTextures("images/sehud/sail_dact_"..TUNING.SElan..".xml", "sail_dact_"..TUNING.SElan..".tex") + self.mainui.buttonprecious:SetTextures("images/sehud/precious_dact_"..TUNING.SElan..".xml", "precious_dact_"..TUNING.SElan..".tex") + if title == "food" then + self.mainui.buttonfood:SetTextures("images/sehud/food_act_"..TUNING.SElan..".xml", "food_act_"..TUNING.SElan..".tex") + self.mainui.bg.title:SetTexture("images/sehud/title_food.xml", "title_food.tex") + if self.title == "precious" then + self.mainui.buttonprecious.new:Hide() + self.mainui.refresh:Hide() + end + --local pb = self.mainui.buttonfood:GetPosition() + --self.mainui.buttonfood:MoveTo(pb, Vector3(pb.x, pb.y-15, pb.z), .25) + end + if title == "cloth" then + self.mainui.buttoncloth:SetTextures("images/sehud/cloth_act_"..TUNING.SElan..".xml", "cloth_act_"..TUNING.SElan..".tex") + self.mainui.bg.title:SetTexture("images/sehud/title_cloth.xml", "title_cloth.tex") + if self.title == "precious" then + self.mainui.buttonprecious.new:Hide() + self.mainui.refresh:Hide() + end + --local pb = self.mainui.buttoncloth:GetPosition() + --self.mainui.buttoncloth:MoveTo(pb, Vector3(pb.x, pb.y-15, pb.z), .25) + end + if title == "smithing" then + self.mainui.buttonsmithing:SetTextures("images/sehud/smithing_act_"..TUNING.SElan..".xml", "smithing_act_"..TUNING.SElan..".tex") + self.mainui.bg.title:SetTexture("images/sehud/title_smithing.xml", "title_smithing.tex") + if self.title == "precious" then + self.mainui.buttonprecious.new:Hide() + self.mainui.refresh:Hide() + end + --local pb = self.mainui.buttonsmithing:GetPosition() + --self.mainui.buttonsmithing:MoveTo(pb, Vector3(pb.x, pb.y-15, pb.z), .25) + end + if title == "resource" then + self.mainui.buttonresource:SetTextures("images/sehud/resource_act_"..TUNING.SElan..".xml", "resource_act_"..TUNING.SElan..".tex") + self.mainui.bg.title:SetTexture("images/sehud/title_resource.xml", "title_resource.tex") + if self.title == "precious" then + self.mainui.buttonprecious.new:Hide() + self.mainui.refresh:Hide() + end + --local pb = self.mainui.buttonresource:GetPosition() + --self.mainui.buttonresource:MoveTo(pb, Vector3(pb.x, pb.y-15, pb.z), .25) + end + if title == "sail" then + self.mainui.buttonsail:SetTextures("images/sehud/sail_act_"..TUNING.SElan..".xml", "sail_act_"..TUNING.SElan..".tex") + self.mainui.bg.title:SetTexture("images/sehud/title_sail.xml", "title_sail.tex") + if self.title == "precious" then + self.mainui.buttonprecious.new:Hide() + self.mainui.refresh:Hide() + end + --local pb = self.mainui.buttonresource:GetPosition() + --self.mainui.buttonresource:MoveTo(pb, Vector3(pb.x, pb.y-15, pb.z), .25) + end + if title == "precious" then + self.mainui.buttonprecious:SetTextures("images/sehud/precious_act_"..TUNING.SElan..".xml", "precious_act_"..TUNING.SElan..".tex") + self.mainui.bg.title:SetTexture("images/sehud/title_precious.xml", "title_precious.tex") + self.mainui.buttonprecious.new:Hide() + self.mainui.refresh:Show() + --local pb = self.mainui.buttonprecious:GetPosition() + --self.mainui.buttonprecious:MoveTo(pb, Vector3(pb.x, pb.y-15, pb.z), .25) + end + + self.numpage = 1 + self.title = title + + self.mainui.goodslist:Show() + self.mainui.status:Show() + self.mainui.next:Show() + self.mainui.back:Show() + self.mainui.infopage:Hide() + self.mainui.infobutton:SetTextures("images/sehud/infobutton.xml", "infobutton.tex") + self.mainui.infobutton:SetHoverText(STRINGS.SIMPLEECONOMY[3]) + + self:buildlist(title) + self.mainui.back.image:SetTint(1,1,1,.5) + if self.numpage >= self.maxpage then + self.mainui.next.image:SetTint(1,1,1,.5) + else + self.mainui.next.image:SetTint(1,1,1,1) + end +end + +function uiseconomy:OnControl(control, down) + if uiseconomy._base.OnControl(self,control, down) then + return true + end + + if not down then + if (control == CONTROL_PAUSE or control == CONTROL_CANCEL) and self.mainui.shown then + self:onclose() + end + end + + return true +end + +function uiseconomy:onclose() + self.mainui:ScaleTo(1,.25,.25) + self.owner:DoTaskInTime(.125, function() self.mainui:Hide() end) + if self.title == "precious" then self.mainui.buttonprecious.new:Hide() end + self.mainbutton.new:Hide() +end + +function uiseconomy:onrefresh() + SendModRPCToServer(MOD_RPC["SimpleEconomy"]["refresh"]) + --self:buildlist("precious") + --self:buildbutton("precious") + self.mainui.buttonprecious.new:Show() +end + +function uiseconomy:onopen() + self.mainui:Show() + self.mainui:ScaleTo(.75,1,.125) + self.mainbutton.new:Hide() +end + +function uiseconomy:displaycoinamount(child) + local m = self.owner.seccoin:value() + local num1 = 0 + local num2 = 0 + local num3 = 0 + local num4 = 0 + local num5 = 0 + local num6 = 0 + local x = 17 + if m >= 100000 then + num1 = math.floor(m/100000) + num2 = math.floor((m - num1*100000)/10000) + num3 = math.floor((m - num1*100000 - num2*10000)/1000) + num4 = math.floor((m - num1*100000 - num2*10000 - num3*1000)/100) + num5 = math.floor((m - num1*100000 - num2*10000 - num3*1000 - num4*100)/10) + num6 = math.floor((m - num1*100000 - num2*10000 - num3*1000 - num4*100 - num5*10)/1) + child[1]:Show() + child[2]:Show() + child[3]:Show() + child[4]:Show() + child[5]:Show() + for i=1, 6 do + child[i]:SetPosition(x*(i-0),0,0) + end + end + if m >= 10000 and m < 100000 then + num1 = 0 + num2 = math.floor(m/10000) + num3 = math.floor((m - num2*10000)/1000) + num4 = math.floor((m - num2*10000 - num3*1000)/100) + num5 = math.floor((m - num2*10000 - num3*1000 - num4*100)/10) + num6 = math.floor((m - num2*10000 - num3*1000 - num4*100 - num5*10)/1) + child[1]:Hide() + child[2]:Show() + child[3]:Show() + child[4]:Show() + child[5]:Show() + for i=1, 6 do + child[i]:SetPosition(x*(i-1),0,0) + end + end + if m >= 1000 and m < 10000 then + num1 = 0 + num2 = 0 + num3 = math.floor(m/1000) + num4 = math.floor((m - num3*1000)/100) + num5 = math.floor((m - num3*1000 - num4*100)/10) + num6 = math.floor((m - num3*1000 - num4*100 - num5*10)/1) + child[1]:Hide() + child[2]:Hide() + child[3]:Show() + child[4]:Show() + child[5]:Show() + for i=1, 6 do + child[i]:SetPosition(x*(i-2),0,0) + end + end + if m >= 100 and m < 1000 then + num1 = 0 + num2 = 0 + num3 = 0 + num4 = math.floor(m/100) + num5 = math.floor((m - num4*100)/10) + num6 = math.floor((m - num4*100 - num5*10)/1) + child[1]:Hide() + child[2]:Hide() + child[3]:Hide() + child[4]:Show() + child[5]:Show() + for i=1, 6 do + child[i]:SetPosition(x*(i-3),0,0) + end + end + if m >= 10 and m < 100 then + num1 = 0 + num2 = 0 + num3 = 0 + num4 = 0 + num5 = math.floor(m/10) + num6 = math.floor((m - num5*10)/1) + child[1]:Hide() + child[2]:Hide() + child[3]:Hide() + child[4]:Hide() + child[5]:Show() + for i=1, 6 do + child[i]:SetPosition(x*(i-4),0,0) + end + end + if m < 10 then + num1 = 0 + num2 = 0 + num3 = 0 + num4 = 0 + num5 = 0 + num6 = m + child[1]:Hide() + child[2]:Hide() + child[3]:Hide() + child[4]:Hide() + child[5]:Hide() + for i=1, 6 do + child[i]:SetPosition(x*(i-5),0,0) + end + end + child[1]:SetTexture("images/sehud/bignums/"..num1..".xml", num1..".tex") + child[2]:SetTexture("images/sehud/bignums/"..num2..".xml", num2..".tex") + child[3]:SetTexture("images/sehud/bignums/"..num3..".xml", num3..".tex") + child[4]:SetTexture("images/sehud/bignums/"..num4..".xml", num4..".tex") + child[5]:SetTexture("images/sehud/bignums/"..num5..".xml", num5..".tex") + child[6]:SetTexture("images/sehud/bignums/"..num6..".xml", num6..".tex") +end + + + +--[[ + +local mainbutton = Class(Button, function(self, owner) + Button._ctor(self,"mainbutton") + self.owner = owner or {} + self.cooldown = true + + self.draggable = true + self.clickoffset = Vector3(0, 0, 0) + self.dragging = false + self.draggingTimer = 0 + self.draggingPos = {x = 0, y = 0} + + + self:SetOnClick(function() + if TheInput:IsKeyDown(KEY_CTRL) then + if self.cooldown then + if TheInput:IsKeyDown(KEY_SHIFT) then + TheNet:Say(STRINGS.LMB..STRINGS.SIMPLEECONOMY[14]..self.owner.seccoin:value()..STRINGS.SIMPLEECONOMY[15], true) + else + TheNet:Say(STRINGS.LMB..STRINGS.SIMPLEECONOMY[16]..self.owner.seccoin:value()..STRINGS.SIMPLEECONOMY[17], false) + end + self.cooldown = false + self.owner.owner:DoTaskInTime(5, function() self.cooldown = true end) + end + else + if self.owner.mainui.shown then + self:onclose() + else + self:onopen() + end + end + end) + + self:StartUpdating() + self:SetPosition(-815, 370, 0) +end) + + self.mainbutton:SetNormalScale(1,1,1) + self.mainbutton:SetFocusScale(1,1,1) + self.mainbutton:SetHoverText(STRINGS.SIMPLEECONOMY[2]) + + function mainbutton:OnGainFocus() + self.mainbutton:ScaleTo(1,1.15,.125) + self.mainbutton.new.middle = -15 + end + + function mainbutton:OnLoseFocus() + self.mainbutton:ScaleTo(1.15,1,.25) + self.mainbutton.new.middle = 15 + end + + function mainbutton:OnMouseButton(click, down, x, y,...) + self.mainbutton._base.OnMouseButton(self, click, down, x, y,...) + if not down and click == MOUSEBUTTON_LEFT and self.dragging then + self.mainbutton.dragging = false + if self.mainbutton.dragEndFn then + self.mainbutton.dragEndFn(self) + end + end + if self.mainbutton.draggable and click == MOUSEBUTTON_LEFT then + if down then + self.mainbutton.dragging = true + self.mainbutton.draggingPos.x = x + self.mainbutton.draggingPos.y = y + end + end + end + + function mainbutton:OnControl(control, down) + if self.mainbutton.draggingTimer <= 0.3 then + if self.mainbutton._base.OnControl(self, control, down) then + self.mainbutton:StartUpdating() + return true + end + self.mainbutton:StartUpdating() + if not self.mainbutton:IsEnabled() then + return + end + end + end + + function mainbutton:OnUpdate(dt) + dt = dt or 0 + local pos = self:GetPosition() + pos.x = pos.x + pos.y = pos.y + self.o_pos = pos + self:SetPosition(pos) + self.screenScale = WidgetPercent + if self.draggable and self.dragging then + self.draggingTimer = self.draggingTimer + dt + local x, y = GetScreenPos() + local diff_x = x - self.draggingPos.x + local diff_y = y - self.draggingPos.y + self.draggingPos.x = x + self.draggingPos.y = y + local next_pos = self:GetPosition() + next_pos.x = next_pos.x + diff_x; + next_pos.y = next_pos.y + diff_y + self.o_pos = next_pos + self:SetPosition(next_pos) + end + if not self.dragging then + self.draggingTimer = 0 + end + end + + uiseconomy.mainbutton = mainbutton +]]-- +return uiseconomy \ No newline at end of file