cyberia 2.8.885
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +15 -0
- package/.env.development +45 -0
- package/.env.production +50 -0
- package/.env.test +45 -0
- package/.github/workflows/engine-cyberia.cd.yml +31 -0
- package/.github/workflows/engine-cyberia.ci.yml +60 -0
- package/.github/workflows/ghpkg.ci.yml +87 -0
- package/.github/workflows/npmpkg.ci.yml +72 -0
- package/.github/workflows/publish.ci.yml +84 -0
- package/.github/workflows/publish.cyberia.ci.yml +84 -0
- package/.github/workflows/pwa-microservices-template-page.cd.yml +72 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +33 -0
- package/.github/workflows/release.cd.yml +37 -0
- package/.nycrc +9 -0
- package/.prettierignore +13 -0
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +51 -0
- package/.vscode/settings.json +87 -0
- package/AUTHORS.md +21 -0
- package/CHANGELOG.md +205 -0
- package/Dockerfile +28 -0
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/bin/build.js +209 -0
- package/bin/cron.js +47 -0
- package/bin/cyberia.js +145 -0
- package/bin/db.js +199 -0
- package/bin/deploy.js +1293 -0
- package/bin/file.js +197 -0
- package/bin/hwt.js +49 -0
- package/bin/index.js +145 -0
- package/bin/ssl.js +63 -0
- package/bin/util.js +80 -0
- package/bin/vs.js +74 -0
- package/cli.md +714 -0
- package/conf.js +204 -0
- package/deployment.yaml +138 -0
- package/jsconfig.json +7 -0
- package/jsdoc.json +32 -0
- package/manifests/deployment/adminer/deployment.yaml +32 -0
- package/manifests/deployment/adminer/kustomization.yaml +7 -0
- package/manifests/deployment/adminer/service.yaml +13 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +167 -0
- package/manifests/deployment/dd-default-development/proxy.yaml +46 -0
- package/manifests/deployment/dd-test-development/deployment.yaml +174 -0
- package/manifests/deployment/dd-test-development/proxy.yaml +51 -0
- package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
- package/manifests/deployment/fastapi/backend-service.yml +19 -0
- package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
- package/manifests/deployment/fastapi/frontend-service.yml +15 -0
- package/manifests/deployment/fastapi/initial_data.sh +56 -0
- package/manifests/deployment/kafka/deployment.yaml +69 -0
- package/manifests/deployment/mongo-express/deployment.yaml +60 -0
- package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
- package/manifests/deployment/spark/spark-pi-py.yaml +21 -0
- package/manifests/deployment/tensorflow/tf-gpu-test.yaml +65 -0
- package/manifests/envoy-service-nodeport.yaml +23 -0
- package/manifests/grafana/deployment.yaml +57 -0
- package/manifests/grafana/kustomization.yaml +7 -0
- package/manifests/grafana/pvc.yaml +12 -0
- package/manifests/grafana/service.yaml +14 -0
- package/manifests/kind-config-dev.yaml +12 -0
- package/manifests/kind-config.yaml +12 -0
- package/manifests/kubeadm-calico-config.yaml +119 -0
- package/manifests/kubelet-config.yaml +65 -0
- package/manifests/letsencrypt-prod.yaml +15 -0
- package/manifests/lxd/lxd-admin-profile.yaml +17 -0
- package/manifests/lxd/lxd-preseed.yaml +30 -0
- package/manifests/lxd/underpost-setup.sh +163 -0
- package/manifests/mariadb/config.yaml +10 -0
- package/manifests/mariadb/kustomization.yaml +9 -0
- package/manifests/mariadb/pv.yaml +12 -0
- package/manifests/mariadb/pvc.yaml +10 -0
- package/manifests/mariadb/secret.yaml +8 -0
- package/manifests/mariadb/service.yaml +10 -0
- package/manifests/mariadb/statefulset.yaml +56 -0
- package/manifests/mariadb/storage-class.yaml +10 -0
- package/manifests/mongodb/backup-access.yaml +16 -0
- package/manifests/mongodb/backup-cronjob.yaml +42 -0
- package/manifests/mongodb/backup-pv-pvc.yaml +22 -0
- package/manifests/mongodb/configmap.yaml +26 -0
- package/manifests/mongodb/headless-service.yaml +10 -0
- package/manifests/mongodb/kustomization.yaml +11 -0
- package/manifests/mongodb/pv-pvc.yaml +23 -0
- package/manifests/mongodb/statefulset.yaml +126 -0
- package/manifests/mongodb/storage-class.yaml +9 -0
- package/manifests/mongodb-4.4/kustomization.yaml +7 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +23 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +63 -0
- package/manifests/mysql/kustomization.yaml +7 -0
- package/manifests/mysql/pv-pvc.yaml +27 -0
- package/manifests/mysql/statefulset.yaml +55 -0
- package/manifests/postgresql/configmap.yaml +9 -0
- package/manifests/postgresql/kustomization.yaml +10 -0
- package/manifests/postgresql/pv.yaml +15 -0
- package/manifests/postgresql/pvc.yaml +13 -0
- package/manifests/postgresql/service.yaml +10 -0
- package/manifests/postgresql/statefulset.yaml +37 -0
- package/manifests/prometheus/deployment.yaml +82 -0
- package/manifests/valkey/kustomization.yaml +7 -0
- package/manifests/valkey/service.yaml +11 -0
- package/manifests/valkey/statefulset.yaml +38 -0
- package/nodemon.json +6 -0
- package/package.json +118 -0
- package/proxy.yaml +35 -0
- package/scripts/device-scan.sh +43 -0
- package/scripts/gpu-diag.sh +19 -0
- package/scripts/maas-setup.sh +120 -0
- package/scripts/nat-iptables.sh +26 -0
- package/scripts/nvim.sh +91 -0
- package/scripts/snap-clean.sh +26 -0
- package/scripts/ssh-cluster-info.sh +14 -0
- package/scripts/ssl.sh +164 -0
- package/src/api/blockchain/blockchain.controller.js +51 -0
- package/src/api/blockchain/blockchain.model.js +90 -0
- package/src/api/blockchain/blockchain.router.js +21 -0
- package/src/api/blockchain/blockchain.service.js +24 -0
- package/src/api/core/core.controller.js +69 -0
- package/src/api/core/core.model.js +11 -0
- package/src/api/core/core.router.js +24 -0
- package/src/api/core/core.service.js +35 -0
- package/src/api/crypto/crypto.controller.js +51 -0
- package/src/api/crypto/crypto.model.js +23 -0
- package/src/api/crypto/crypto.router.js +20 -0
- package/src/api/crypto/crypto.service.js +64 -0
- package/src/api/default/default.controller.js +74 -0
- package/src/api/default/default.model.js +20 -0
- package/src/api/default/default.router.js +27 -0
- package/src/api/default/default.service.js +40 -0
- package/src/api/document/document.controller.js +66 -0
- package/src/api/document/document.model.js +51 -0
- package/src/api/document/document.router.js +24 -0
- package/src/api/document/document.service.js +133 -0
- package/src/api/file/file.controller.js +67 -0
- package/src/api/file/file.model.js +19 -0
- package/src/api/file/file.router.js +22 -0
- package/src/api/file/file.service.js +100 -0
- package/src/api/instance/instance.controller.js +69 -0
- package/src/api/instance/instance.model.js +40 -0
- package/src/api/instance/instance.router.js +34 -0
- package/src/api/instance/instance.service.js +70 -0
- package/src/api/ipfs/ipfs.controller.js +51 -0
- package/src/api/ipfs/ipfs.model.js +17 -0
- package/src/api/ipfs/ipfs.router.js +20 -0
- package/src/api/ipfs/ipfs.service.js +25 -0
- package/src/api/object-layer/README.md +85 -0
- package/src/api/object-layer/object-layer.controller.js +69 -0
- package/src/api/object-layer/object-layer.model.js +181 -0
- package/src/api/object-layer/object-layer.router.js +29 -0
- package/src/api/object-layer/object-layer.service.js +49 -0
- package/src/api/test/test.controller.js +59 -0
- package/src/api/test/test.model.js +14 -0
- package/src/api/test/test.router.js +21 -0
- package/src/api/test/test.service.js +35 -0
- package/src/api/user/postman_collection.json +216 -0
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +35 -0
- package/src/api/user/user.model.js +100 -0
- package/src/api/user/user.router.js +400 -0
- package/src/api/user/user.service.js +500 -0
- package/src/api.js +23 -0
- package/src/cli/baremetal.js +1310 -0
- package/src/cli/cloud-init.js +548 -0
- package/src/cli/cluster.js +834 -0
- package/src/cli/cron.js +95 -0
- package/src/cli/db.js +414 -0
- package/src/cli/deploy.js +661 -0
- package/src/cli/env.js +101 -0
- package/src/cli/fs.js +256 -0
- package/src/cli/image.js +156 -0
- package/src/cli/index.js +436 -0
- package/src/cli/lxd.js +402 -0
- package/src/cli/monitor.js +260 -0
- package/src/cli/repository.js +274 -0
- package/src/cli/run.js +728 -0
- package/src/cli/script.js +85 -0
- package/src/cli/secrets.js +71 -0
- package/src/cli/ssh.js +46 -0
- package/src/cli/test.js +159 -0
- package/src/client/Cyberia.index.js +50 -0
- package/src/client/CyberiaAdmin.index.js +34 -0
- package/src/client/CyberiaPortal.index.js +36 -0
- package/src/client/Default.index.js +84 -0
- package/src/client/components/core/404.js +20 -0
- package/src/client/components/core/500.js +20 -0
- package/src/client/components/core/Account.js +326 -0
- package/src/client/components/core/AgGrid.js +191 -0
- package/src/client/components/core/Alert.js +77 -0
- package/src/client/components/core/Auth.js +342 -0
- package/src/client/components/core/Badge.js +32 -0
- package/src/client/components/core/Blockchain.js +41 -0
- package/src/client/components/core/Blog.js +9 -0
- package/src/client/components/core/BtnIcon.js +111 -0
- package/src/client/components/core/CalendarCore.js +464 -0
- package/src/client/components/core/Chat.js +64 -0
- package/src/client/components/core/ColorPalette.js +5267 -0
- package/src/client/components/core/CommonJs.js +1010 -0
- package/src/client/components/core/Content.js +196 -0
- package/src/client/components/core/Css.js +1099 -0
- package/src/client/components/core/CssCore.js +882 -0
- package/src/client/components/core/D3Chart.js +44 -0
- package/src/client/components/core/Docs.js +376 -0
- package/src/client/components/core/DropDown.js +223 -0
- package/src/client/components/core/EventsUI.js +133 -0
- package/src/client/components/core/FileExplorer.js +707 -0
- package/src/client/components/core/FullScreen.js +36 -0
- package/src/client/components/core/Input.js +383 -0
- package/src/client/components/core/JoyStick.js +80 -0
- package/src/client/components/core/Keyboard.js +73 -0
- package/src/client/components/core/LoadingAnimation.js +159 -0
- package/src/client/components/core/LogIn.js +190 -0
- package/src/client/components/core/LogOut.js +63 -0
- package/src/client/components/core/Logger.js +29 -0
- package/src/client/components/core/Modal.js +2494 -0
- package/src/client/components/core/NotificationManager.js +84 -0
- package/src/client/components/core/ObjectLayerEngine.js +1229 -0
- package/src/client/components/core/ObjectLayerEngineModal.js +443 -0
- package/src/client/components/core/Pagination.js +207 -0
- package/src/client/components/core/Panel.js +772 -0
- package/src/client/components/core/PanelForm.js +627 -0
- package/src/client/components/core/Polyhedron.js +162 -0
- package/src/client/components/core/Recover.js +207 -0
- package/src/client/components/core/Responsive.js +82 -0
- package/src/client/components/core/RichText.js +43 -0
- package/src/client/components/core/Router.js +317 -0
- package/src/client/components/core/Scroll.js +76 -0
- package/src/client/components/core/SignUp.js +125 -0
- package/src/client/components/core/SocketIo.js +74 -0
- package/src/client/components/core/Stream.js +113 -0
- package/src/client/components/core/ToggleSwitch.js +101 -0
- package/src/client/components/core/ToolTip.js +90 -0
- package/src/client/components/core/Translate.js +522 -0
- package/src/client/components/core/Validator.js +115 -0
- package/src/client/components/core/VanillaJs.js +423 -0
- package/src/client/components/core/Wallet.js +106 -0
- package/src/client/components/core/WebComponent.js +44 -0
- package/src/client/components/core/Webhook.js +25 -0
- package/src/client/components/core/Worker.js +371 -0
- package/src/client/components/core/windowGetDimensions.js +269 -0
- package/src/client/components/cyberia/BagCyberia.js +1253 -0
- package/src/client/components/cyberia/BiomeCyberia.js +130 -0
- package/src/client/components/cyberia/CharacterCyberia.js +321 -0
- package/src/client/components/cyberia/CommonCyberia.js +1834 -0
- package/src/client/components/cyberia/CssCyberia.js +816 -0
- package/src/client/components/cyberia/ElementPreviewCyberia.js +183 -0
- package/src/client/components/cyberia/ElementsCyberia.js +146 -0
- package/src/client/components/cyberia/InteractionPanelCyberia.js +1043 -0
- package/src/client/components/cyberia/JoyStickCyberia.js +53 -0
- package/src/client/components/cyberia/LogInCyberia.js +68 -0
- package/src/client/components/cyberia/LogOutCyberia.js +24 -0
- package/src/client/components/cyberia/MainUserCyberia.js +424 -0
- package/src/client/components/cyberia/MapCyberia.js +160 -0
- package/src/client/components/cyberia/MatrixCyberia.js +147 -0
- package/src/client/components/cyberia/MenuCyberia.js +575 -0
- package/src/client/components/cyberia/PixiCyberia.js +1639 -0
- package/src/client/components/cyberia/PointAndClickMovementCyberia.js +146 -0
- package/src/client/components/cyberia/QuestCyberia.js +1420 -0
- package/src/client/components/cyberia/RoutesCyberia.js +47 -0
- package/src/client/components/cyberia/SettingsCyberia.js +16 -0
- package/src/client/components/cyberia/SignUpCyberia.js +14 -0
- package/src/client/components/cyberia/SkillCyberia.js +124 -0
- package/src/client/components/cyberia/SocketIoCyberia.js +211 -0
- package/src/client/components/cyberia/TileCyberia.js +685 -0
- package/src/client/components/cyberia/TranslateCyberia.js +96 -0
- package/src/client/components/cyberia/UniverseCyberia.js +14 -0
- package/src/client/components/cyberia/WebhookCyberia.js +13 -0
- package/src/client/components/cyberia/WikiCyberia.js +144 -0
- package/src/client/components/cyberia/WorldCyberia.js +680 -0
- package/src/client/components/cyberia-admin/BiomeCyberiaAdmin.js +978 -0
- package/src/client/components/cyberia-admin/CommonCyberiaAdmin.js +29 -0
- package/src/client/components/cyberia-admin/CssCyberiaAdmin.js +15 -0
- package/src/client/components/cyberia-admin/ElementsCyberiaAdmin.js +38 -0
- package/src/client/components/cyberia-admin/InstanceEngineCyberiaAdmin.js +180 -0
- package/src/client/components/cyberia-admin/LogInCyberiaAdmin.js +34 -0
- package/src/client/components/cyberia-admin/LogOutCyberiaAdmin.js +24 -0
- package/src/client/components/cyberia-admin/MenuCyberiaAdmin.js +660 -0
- package/src/client/components/cyberia-admin/RoutesCyberiaAdmin.js +57 -0
- package/src/client/components/cyberia-admin/ServerCyberiaAdmin.js +129 -0
- package/src/client/components/cyberia-admin/SettingsCyberiaAdmin.js +16 -0
- package/src/client/components/cyberia-admin/SignUpCyberiaAdmin.js +11 -0
- package/src/client/components/cyberia-admin/SocketIoCyberiaAdmin.js +53 -0
- package/src/client/components/cyberia-admin/TranslateCyberiaAdmin.js +7 -0
- package/src/client/components/cyberia-biome/CityCyberiaBiome.js +209 -0
- package/src/client/components/cyberia-biome/CityInteriorCyberiaBiome.js +253 -0
- package/src/client/components/cyberia-biome/ColorChaosCyberiaBiome.js +26 -0
- package/src/client/components/cyberia-biome/ForestCyberiaBiome.js +191 -0
- package/src/client/components/cyberia-biome/GridBaseCyberiaBiome.js +364 -0
- package/src/client/components/cyberia-biome/SeedCityCyberiaBiome.js +347 -0
- package/src/client/components/cyberia-biome/ShopCyberiaBiome.js +12 -0
- package/src/client/components/cyberia-biome/SpaceCyberiaBiome.js +58 -0
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +29 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +132 -0
- package/src/client/components/cyberia-portal/ElementsCyberiaPortal.js +38 -0
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +18 -0
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +12 -0
- package/src/client/components/cyberia-portal/MenuCyberiaPortal.js +487 -0
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +45 -0
- package/src/client/components/cyberia-portal/ServerCyberiaPortal.js +136 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +11 -0
- package/src/client/components/cyberia-portal/SocketIoCyberiaPortal.js +52 -0
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +12 -0
- package/src/client/components/default/CommonDefault.js +29 -0
- package/src/client/components/default/CssDefault.js +27 -0
- package/src/client/components/default/ElementsDefault.js +38 -0
- package/src/client/components/default/LogInDefault.js +14 -0
- package/src/client/components/default/LogOutDefault.js +10 -0
- package/src/client/components/default/MenuDefault.js +743 -0
- package/src/client/components/default/RoutesDefault.js +48 -0
- package/src/client/components/default/SettingsDefault.js +16 -0
- package/src/client/components/default/SignUpDefault.js +9 -0
- package/src/client/components/default/SocketIoDefault.js +54 -0
- package/src/client/components/default/TranslateDefault.js +7 -0
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-384x384.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-512x512.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/background/dark.svg +557 -0
- package/src/client/public/default/assets/background/white.jpg +0 -0
- package/src/client/public/default/assets/background/white0-min.jpg +0 -0
- package/src/client/public/default/assets/background/white0.jpg +0 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/logo/underpost.gif +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +12 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon-48x48.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/manifest.webmanifest +69 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/plantuml/client-conf.svg +1 -0
- package/src/client/public/default/plantuml/client-schema.svg +1 -0
- package/src/client/public/default/plantuml/cron-conf.svg +1 -0
- package/src/client/public/default/plantuml/cron-schema.svg +1 -0
- package/src/client/public/default/plantuml/server-conf.svg +1 -0
- package/src/client/public/default/plantuml/server-schema.svg +1 -0
- package/src/client/public/default/plantuml/ssr-conf.svg +1 -0
- package/src/client/public/default/plantuml/ssr-schema.svg +1 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/public/default/site.webmanifest +69 -0
- package/src/client/public/default/sitemap +148 -0
- package/src/client/public/default/yandex-browser-50x50.png +0 -0
- package/src/client/public/default/yandex-browser-manifest.json +9 -0
- package/src/client/public/doc/favicon.ico +0 -0
- package/src/client/public/doc/sitemap +148 -0
- package/src/client/public/test/favicon.ico +0 -0
- package/src/client/public/test/sitemap +148 -0
- package/src/client/services/blockchain/blockchain.service.js +73 -0
- package/src/client/services/core/core.service.js +165 -0
- package/src/client/services/crypto/crypto.service.js +73 -0
- package/src/client/services/default/default.management.js +450 -0
- package/src/client/services/default/default.service.js +98 -0
- package/src/client/services/document/document.service.js +97 -0
- package/src/client/services/file/file.service.js +72 -0
- package/src/client/services/instance/instance.management.js +78 -0
- package/src/client/services/instance/instance.service.js +97 -0
- package/src/client/services/ipfs/ipfs.service.js +73 -0
- package/src/client/services/object-layer/object-layer.service.js +93 -0
- package/src/client/services/test/test.service.js +73 -0
- package/src/client/services/user/user.management.js +56 -0
- package/src/client/services/user/user.service.js +108 -0
- package/src/client/ssr/Render.js +237 -0
- package/src/client/ssr/body/404.js +73 -0
- package/src/client/ssr/body/500.js +72 -0
- package/src/client/ssr/body/CacheControl.js +114 -0
- package/src/client/ssr/body/CyberiaDefaultSplashScreen.js +90 -0
- package/src/client/ssr/body/CyberiaSplashScreenLore.js +424 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +90 -0
- package/src/client/ssr/email/DefaultRecoverEmail.js +21 -0
- package/src/client/ssr/email/DefaultVerifyEmail.js +17 -0
- package/src/client/ssr/head/Css.js +241 -0
- package/src/client/ssr/head/CyberiaAdminScripts.js +6 -0
- package/src/client/ssr/head/CyberiaPortalScripts.js +6 -0
- package/src/client/ssr/head/CyberiaScripts.js +6 -0
- package/src/client/ssr/head/DefaultScripts.js +6 -0
- package/src/client/ssr/head/Microdata.js +11 -0
- package/src/client/ssr/head/Production.js +1 -0
- package/src/client/ssr/head/Pwa.js +146 -0
- package/src/client/ssr/head/Seo.js +15 -0
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +21 -0
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +17 -0
- package/src/client/ssr/offline/Maintenance.js +63 -0
- package/src/client/ssr/offline/NoNetworkConnection.js +67 -0
- package/src/client/ssr/pages/404.js +12 -0
- package/src/client/ssr/pages/500.js +12 -0
- package/src/client/ssr/pages/Test.js +198 -0
- package/src/client/ssr/pages/maintenance.js +14 -0
- package/src/client/ssr/pages/offline.js +21 -0
- package/src/client/sw/default.sw.js +108 -0
- package/src/client/sw/template.sw.js +84 -0
- package/src/client.build.js +22 -0
- package/src/client.dev.js +24 -0
- package/src/db/DataBaseProvider.js +98 -0
- package/src/db/mariadb/MariaDB.js +66 -0
- package/src/db/mongo/MongooseDB.js +70 -0
- package/src/index.js +198 -0
- package/src/mailer/EmailRender.js +116 -0
- package/src/mailer/MailerProvider.js +213 -0
- package/src/monitor.js +24 -0
- package/src/proxy.js +22 -0
- package/src/runtime/express/Express.js +256 -0
- package/src/runtime/lampp/Dockerfile +50 -0
- package/src/runtime/lampp/Lampp.js +343 -0
- package/src/server/auth.js +689 -0
- package/src/server/backup.js +96 -0
- package/src/server/client-build-docs.js +205 -0
- package/src/server/client-build-live.js +109 -0
- package/src/server/client-build.js +690 -0
- package/src/server/client-dev-server.js +87 -0
- package/src/server/client-formatted.js +87 -0
- package/src/server/client-icons.js +108 -0
- package/src/server/conf.js +1071 -0
- package/src/server/crypto.js +210 -0
- package/src/server/dns.js +276 -0
- package/src/server/downloader.js +74 -0
- package/src/server/json-schema.js +77 -0
- package/src/server/logger.js +197 -0
- package/src/server/network.js +72 -0
- package/src/server/object-layer.js +294 -0
- package/src/server/peer.js +69 -0
- package/src/server/process.js +171 -0
- package/src/server/proxy.js +110 -0
- package/src/server/runtime.js +170 -0
- package/src/server/ssr.js +127 -0
- package/src/server/start.js +161 -0
- package/src/server/tls.js +251 -0
- package/src/server/valkey.js +293 -0
- package/src/server.js +25 -0
- package/src/ws/IoInterface.js +139 -0
- package/src/ws/IoServer.js +88 -0
- package/src/ws/core/channels/core.ws.chat.js +23 -0
- package/src/ws/core/channels/core.ws.mailer.js +35 -0
- package/src/ws/core/channels/core.ws.stream.js +31 -0
- package/src/ws/core/core.ws.connection.js +62 -0
- package/src/ws/core/core.ws.emit.js +53 -0
- package/src/ws/core/core.ws.server.js +76 -0
- package/src/ws/core/management/core.ws.chat.js +8 -0
- package/src/ws/core/management/core.ws.mailer.js +16 -0
- package/src/ws/core/management/core.ws.stream.js +8 -0
- package/src/ws/cyberia/channels/cyberia.ws.bot.js +56 -0
- package/src/ws/cyberia/channels/cyberia.ws.skill.js +51 -0
- package/src/ws/cyberia/channels/cyberia.ws.user.js +437 -0
- package/src/ws/cyberia/cyberia.ws.connection.js +36 -0
- package/src/ws/cyberia/cyberia.ws.emit.js +14 -0
- package/src/ws/cyberia/cyberia.ws.server.js +67 -0
- package/src/ws/cyberia/management/cyberia.ws.bot.js +669 -0
- package/src/ws/cyberia/management/cyberia.ws.skill.js +441 -0
- package/src/ws/cyberia/management/cyberia.ws.user.js +188 -0
- package/src/ws/default/channels/default.ws.main.js +16 -0
- package/src/ws/default/default.ws.connection.js +22 -0
- package/src/ws/default/default.ws.emit.js +14 -0
- package/src/ws/default/default.ws.server.js +20 -0
- package/src/ws/default/management/default.ws.main.js +8 -0
- package/test/api.test.js +53 -0
- package/test/crypto.test.js +117 -0
|
@@ -0,0 +1,1834 @@
|
|
|
1
|
+
import { newInstance, random, range, reduceMatrix, round10 } from '../core/CommonJs.js';
|
|
2
|
+
|
|
3
|
+
const ModelElement = {
|
|
4
|
+
world: (options) => {
|
|
5
|
+
return {
|
|
6
|
+
world: {
|
|
7
|
+
_id: options?.worldId ? options.worldId : CyberiaParams.CYBERIA_WORLD_ID,
|
|
8
|
+
face: 1,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
user: () => {
|
|
13
|
+
return {
|
|
14
|
+
user: {
|
|
15
|
+
_id: '',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
quests: () => {
|
|
20
|
+
return {
|
|
21
|
+
quests: [],
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const PositionsComponent = {
|
|
27
|
+
default: () => [
|
|
28
|
+
{ positionId: '02', frames: 1 },
|
|
29
|
+
{ positionId: '04', frames: 1 },
|
|
30
|
+
{ positionId: '06', frames: 1 },
|
|
31
|
+
{ positionId: '08', frames: 1 },
|
|
32
|
+
{ positionId: '12', frames: 2 },
|
|
33
|
+
{ positionId: '14', frames: 2 },
|
|
34
|
+
{ positionId: '16', frames: 2 },
|
|
35
|
+
{ positionId: '18', frames: 2 },
|
|
36
|
+
],
|
|
37
|
+
frames: (frames) => PositionsComponent.default().map((o) => ((o.frames = frames), o)),
|
|
38
|
+
unique08: [
|
|
39
|
+
'coin',
|
|
40
|
+
'bone',
|
|
41
|
+
'bone-brown',
|
|
42
|
+
'generic-wood',
|
|
43
|
+
'heal',
|
|
44
|
+
'mutagen-outpost-map',
|
|
45
|
+
'nova-republic-intel',
|
|
46
|
+
'green-power',
|
|
47
|
+
'red-power',
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const setElementConsistency = (type, element) => {
|
|
52
|
+
if ('life' in element && 'maxLife' in element) {
|
|
53
|
+
if (element.life > element.maxLife) element.life = newInstance(element.maxLife);
|
|
54
|
+
if (element.life > 0 && element.components.skin.find((s) => s.enabled).displayId === 'ghost') {
|
|
55
|
+
const currentSkin = element.components.skin.find((s) => s.current);
|
|
56
|
+
element.components.skin = element.components.skin.map((s) => {
|
|
57
|
+
s.enabled = s.displayId === (currentSkin ? currentSkin.displayId : 'anon');
|
|
58
|
+
return s;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return element;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const DisplayComponent = {
|
|
66
|
+
get: {
|
|
67
|
+
bone: () => {
|
|
68
|
+
return {
|
|
69
|
+
displayId: 'bone',
|
|
70
|
+
position: '08',
|
|
71
|
+
positions: PositionsComponent.frames(1),
|
|
72
|
+
velFrame: 0.03,
|
|
73
|
+
assetFolder: 'quest',
|
|
74
|
+
extension: 'gif',
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
hatchet: () => {
|
|
78
|
+
return {
|
|
79
|
+
displayId: 'hatchet',
|
|
80
|
+
position: '08',
|
|
81
|
+
positions: PositionsComponent.frames(1),
|
|
82
|
+
velFrame: 0.03,
|
|
83
|
+
assetFolder: 'weapon',
|
|
84
|
+
extension: 'png',
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
'bone-brown': () => {
|
|
88
|
+
return {
|
|
89
|
+
displayId: 'bone-brown',
|
|
90
|
+
position: '08',
|
|
91
|
+
positions: PositionsComponent.frames(1),
|
|
92
|
+
velFrame: 0.03,
|
|
93
|
+
assetFolder: 'quest',
|
|
94
|
+
extension: 'gif',
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
ayleen: () => {
|
|
98
|
+
return {
|
|
99
|
+
displayId: 'ayleen',
|
|
100
|
+
position: '08',
|
|
101
|
+
positions: PositionsComponent.default(),
|
|
102
|
+
velFrame: 0.03,
|
|
103
|
+
assetFolder: 'skin',
|
|
104
|
+
extension: 'png',
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
anon: () => {
|
|
108
|
+
return {
|
|
109
|
+
displayId: 'anon',
|
|
110
|
+
position: '08',
|
|
111
|
+
positions: PositionsComponent.default(),
|
|
112
|
+
assetFolder: 'skin',
|
|
113
|
+
velFrame: 0.03,
|
|
114
|
+
extension: 'png',
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
eiri: () => {
|
|
118
|
+
return {
|
|
119
|
+
displayId: 'eiri',
|
|
120
|
+
position: '08',
|
|
121
|
+
positions: PositionsComponent.default(),
|
|
122
|
+
assetFolder: 'skin',
|
|
123
|
+
velFrame: 0.03,
|
|
124
|
+
extension: 'png',
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
'scp-2040': () => {
|
|
128
|
+
return {
|
|
129
|
+
displayId: 'scp-2040',
|
|
130
|
+
position: '08',
|
|
131
|
+
positions: PositionsComponent.default(),
|
|
132
|
+
assetFolder: 'skin',
|
|
133
|
+
velFrame: 0.03,
|
|
134
|
+
extension: 'png',
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
ghost: () => {
|
|
138
|
+
return {
|
|
139
|
+
displayId: 'ghost',
|
|
140
|
+
position: '08',
|
|
141
|
+
positions: PositionsComponent.frames(8),
|
|
142
|
+
assetFolder: 'skin',
|
|
143
|
+
velFrame: 0.03,
|
|
144
|
+
extension: 'png',
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
purple: () => {
|
|
148
|
+
return {
|
|
149
|
+
displayId: 'purple',
|
|
150
|
+
position: '08',
|
|
151
|
+
positions: PositionsComponent.default(),
|
|
152
|
+
assetFolder: 'skin',
|
|
153
|
+
velFrame: 0.03,
|
|
154
|
+
extension: 'png',
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
agent: () => {
|
|
158
|
+
return {
|
|
159
|
+
displayId: 'agent',
|
|
160
|
+
position: '08',
|
|
161
|
+
positions: PositionsComponent.default(),
|
|
162
|
+
assetFolder: 'skin',
|
|
163
|
+
velFrame: 0.03,
|
|
164
|
+
extension: 'png',
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
kishins: () => {
|
|
168
|
+
return {
|
|
169
|
+
displayId: 'kishins',
|
|
170
|
+
position: '08',
|
|
171
|
+
positions: PositionsComponent.default(),
|
|
172
|
+
assetFolder: 'skin',
|
|
173
|
+
velFrame: 0.03,
|
|
174
|
+
extension: 'png',
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
punk: () => {
|
|
178
|
+
return {
|
|
179
|
+
displayId: 'punk',
|
|
180
|
+
position: '08',
|
|
181
|
+
positions: PositionsComponent.default(),
|
|
182
|
+
assetFolder: 'skin',
|
|
183
|
+
velFrame: 0.03,
|
|
184
|
+
extension: 'png',
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
'tim-knife': () => {
|
|
188
|
+
return {
|
|
189
|
+
displayId: 'tim-knife',
|
|
190
|
+
position: '08',
|
|
191
|
+
positions: PositionsComponent.frames(3),
|
|
192
|
+
velFrame: 0.03,
|
|
193
|
+
assetFolder: 'weapon',
|
|
194
|
+
extension: 'gif',
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
'brown-wing': () => {
|
|
198
|
+
return {
|
|
199
|
+
displayId: 'brown-wing',
|
|
200
|
+
position: '08',
|
|
201
|
+
positions: PositionsComponent.frames(2),
|
|
202
|
+
velFrame: 0.03,
|
|
203
|
+
assetFolder: 'breastplate',
|
|
204
|
+
extension: 'png',
|
|
205
|
+
};
|
|
206
|
+
},
|
|
207
|
+
'red-power': () => {
|
|
208
|
+
return {
|
|
209
|
+
displayId: 'red-power',
|
|
210
|
+
position: '08',
|
|
211
|
+
positions: PositionsComponent.frames(3),
|
|
212
|
+
velFrame: 0.03,
|
|
213
|
+
assetFolder: 'skill',
|
|
214
|
+
extension: 'png',
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
'green-power': () => {
|
|
218
|
+
return {
|
|
219
|
+
displayId: 'green-power',
|
|
220
|
+
position: '08',
|
|
221
|
+
positions: PositionsComponent.frames(3),
|
|
222
|
+
velFrame: 0.03,
|
|
223
|
+
assetFolder: 'skill',
|
|
224
|
+
extension: 'png',
|
|
225
|
+
};
|
|
226
|
+
},
|
|
227
|
+
heal: () => {
|
|
228
|
+
return {
|
|
229
|
+
displayId: 'heal',
|
|
230
|
+
position: '08',
|
|
231
|
+
positions: PositionsComponent.frames(10),
|
|
232
|
+
velFrame: 0.2,
|
|
233
|
+
assetFolder: 'skill',
|
|
234
|
+
extension: 'png',
|
|
235
|
+
};
|
|
236
|
+
},
|
|
237
|
+
dog: () => {
|
|
238
|
+
return {
|
|
239
|
+
displayId: 'dog',
|
|
240
|
+
position: '08',
|
|
241
|
+
positions: PositionsComponent.frames(11),
|
|
242
|
+
velFrame: 0.1,
|
|
243
|
+
assetFolder: 'skin',
|
|
244
|
+
extension: 'png',
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
'generic-wood': () => {
|
|
248
|
+
return {
|
|
249
|
+
displayId: 'generic-wood',
|
|
250
|
+
position: '08',
|
|
251
|
+
positions: PositionsComponent.frames(1),
|
|
252
|
+
velFrame: 0.1,
|
|
253
|
+
assetFolder: 'resources',
|
|
254
|
+
extension: 'png',
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
coin: () => {
|
|
258
|
+
return {
|
|
259
|
+
displayId: 'coin',
|
|
260
|
+
position: '08',
|
|
261
|
+
positions: PositionsComponent.frames(6),
|
|
262
|
+
velFrame: 0.1,
|
|
263
|
+
assetFolder: 'coin',
|
|
264
|
+
extension: 'gif',
|
|
265
|
+
};
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const Stat = {
|
|
271
|
+
get: {
|
|
272
|
+
anon: () => {
|
|
273
|
+
return {
|
|
274
|
+
dim: 1,
|
|
275
|
+
vel: 0.5,
|
|
276
|
+
maxLife: 150,
|
|
277
|
+
deadTime: 3000,
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
purple: () => {
|
|
281
|
+
return {
|
|
282
|
+
dim: 1,
|
|
283
|
+
vel: 0.5,
|
|
284
|
+
maxLife: 150,
|
|
285
|
+
deadTime: 3000,
|
|
286
|
+
};
|
|
287
|
+
},
|
|
288
|
+
ghost: () => {
|
|
289
|
+
return {
|
|
290
|
+
dim: 1,
|
|
291
|
+
vel: 0.5,
|
|
292
|
+
maxLife: 150,
|
|
293
|
+
deadTime: 3000,
|
|
294
|
+
};
|
|
295
|
+
},
|
|
296
|
+
eiri: () => {
|
|
297
|
+
return {
|
|
298
|
+
dim: 1,
|
|
299
|
+
vel: 0.5,
|
|
300
|
+
maxLife: 150,
|
|
301
|
+
deadTime: 3000,
|
|
302
|
+
};
|
|
303
|
+
},
|
|
304
|
+
kishins: () => {
|
|
305
|
+
return {
|
|
306
|
+
dim: 2.5,
|
|
307
|
+
vel: 0.8,
|
|
308
|
+
maxLife: 400,
|
|
309
|
+
deadTime: 5000,
|
|
310
|
+
};
|
|
311
|
+
},
|
|
312
|
+
'scp-2040': () => {
|
|
313
|
+
return {
|
|
314
|
+
dim: 1.8,
|
|
315
|
+
vel: 0.2,
|
|
316
|
+
maxLife: 300,
|
|
317
|
+
deadTime: 8000,
|
|
318
|
+
};
|
|
319
|
+
},
|
|
320
|
+
'tim-knife': () => {
|
|
321
|
+
return {
|
|
322
|
+
damage: 50,
|
|
323
|
+
dim: 1,
|
|
324
|
+
};
|
|
325
|
+
},
|
|
326
|
+
'red-power': () => {
|
|
327
|
+
return {
|
|
328
|
+
cooldown: 750,
|
|
329
|
+
timeLife: 300,
|
|
330
|
+
damage: 4,
|
|
331
|
+
vel: 0.3,
|
|
332
|
+
};
|
|
333
|
+
},
|
|
334
|
+
'green-power': () => {
|
|
335
|
+
return {
|
|
336
|
+
cooldown: 2000,
|
|
337
|
+
timeLife: 300,
|
|
338
|
+
heal: 70,
|
|
339
|
+
vel: 0.8,
|
|
340
|
+
};
|
|
341
|
+
},
|
|
342
|
+
heal: () => {
|
|
343
|
+
return {
|
|
344
|
+
cooldown: 2000,
|
|
345
|
+
timeLife: 1500,
|
|
346
|
+
heal: 70,
|
|
347
|
+
vel: 0.8,
|
|
348
|
+
};
|
|
349
|
+
},
|
|
350
|
+
'brown-wing': () => {
|
|
351
|
+
return {
|
|
352
|
+
dim: 1,
|
|
353
|
+
vel: 1.5,
|
|
354
|
+
};
|
|
355
|
+
},
|
|
356
|
+
'bone-brown': () => {
|
|
357
|
+
return {
|
|
358
|
+
dim: 1,
|
|
359
|
+
};
|
|
360
|
+
},
|
|
361
|
+
hatchet: () => {
|
|
362
|
+
return {
|
|
363
|
+
dim: 1,
|
|
364
|
+
damage: 2,
|
|
365
|
+
cooldown: 500,
|
|
366
|
+
timeLife: 300,
|
|
367
|
+
vel: 0.3,
|
|
368
|
+
basePrice: 50,
|
|
369
|
+
};
|
|
370
|
+
},
|
|
371
|
+
bone: () => {
|
|
372
|
+
return {
|
|
373
|
+
dim: 1,
|
|
374
|
+
};
|
|
375
|
+
},
|
|
376
|
+
dog: () => {
|
|
377
|
+
return {
|
|
378
|
+
dim: 1,
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
'generic-wood': () => {
|
|
382
|
+
return {
|
|
383
|
+
dim: 1,
|
|
384
|
+
basePrice: 2,
|
|
385
|
+
};
|
|
386
|
+
},
|
|
387
|
+
coin: () => {
|
|
388
|
+
return {};
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
set: function (type, element, build) {
|
|
392
|
+
if (!build) {
|
|
393
|
+
const oldElement = newInstance(element);
|
|
394
|
+
// only storage data (no accumulative attributes, example: damage)
|
|
395
|
+
element = BaseElement()[type].main;
|
|
396
|
+
element._id = oldElement._id;
|
|
397
|
+
element.x = oldElement.x;
|
|
398
|
+
element.y = oldElement.y;
|
|
399
|
+
element.skill = oldElement.skill;
|
|
400
|
+
element.weapon = oldElement.weapon;
|
|
401
|
+
element.breastplate = oldElement.breastplate;
|
|
402
|
+
element.model = oldElement.model;
|
|
403
|
+
element.components = oldElement.components;
|
|
404
|
+
element.life = oldElement.life;
|
|
405
|
+
element.coin = oldElement.coin;
|
|
406
|
+
element.resource = oldElement.resource;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
for (const componentType of Object.keys(CharacterCyberiaStatsType)) {
|
|
410
|
+
if (!element.components[componentType]) continue;
|
|
411
|
+
const component = element.components[componentType].find((e) => e.current);
|
|
412
|
+
if (component) {
|
|
413
|
+
const componentStat = this.get[component.displayId]();
|
|
414
|
+
if (componentType === 'skin') {
|
|
415
|
+
element = { ...element, ...componentStat };
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
for (const keyStat of Object.keys(componentStat)) {
|
|
419
|
+
switch (keyStat) {
|
|
420
|
+
case 'damage':
|
|
421
|
+
element[keyStat] += componentStat[keyStat];
|
|
422
|
+
break;
|
|
423
|
+
|
|
424
|
+
case 'maxLife':
|
|
425
|
+
element[keyStat] += componentStat[keyStat];
|
|
426
|
+
break;
|
|
427
|
+
|
|
428
|
+
default:
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
element = setElementConsistency(type, element);
|
|
436
|
+
|
|
437
|
+
return element;
|
|
438
|
+
},
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
const loadDefaultResources = () => {
|
|
442
|
+
QuestComponent.componentsScope['purple'] = {};
|
|
443
|
+
QuestComponent.components.push(DisplayComponent.get['purple']());
|
|
444
|
+
|
|
445
|
+
QuestComponent.componentsScope['generic-wood'] = {};
|
|
446
|
+
QuestComponent.components.push(DisplayComponent.get['generic-wood']());
|
|
447
|
+
|
|
448
|
+
DisplayComponent.get['gp0'] = () => ({ ...DisplayComponent.get['anon'](), displayId: 'gp0' });
|
|
449
|
+
Stat.get['gp0'] = () => ({ ...Stat.get['anon'](), vel: 0.14 });
|
|
450
|
+
QuestComponent.componentsScope['gp0'] = {};
|
|
451
|
+
QuestComponent.components.push(DisplayComponent.get['gp0']());
|
|
452
|
+
|
|
453
|
+
DisplayComponent.get['gp1'] = () => ({ ...DisplayComponent.get['anon'](), displayId: 'gp1' });
|
|
454
|
+
Stat.get['gp1'] = () => ({ ...Stat.get['anon'](), vel: 0.14 });
|
|
455
|
+
QuestComponent.componentsScope['gp1'] = {};
|
|
456
|
+
QuestComponent.components.push(DisplayComponent.get['gp1']());
|
|
457
|
+
|
|
458
|
+
DisplayComponent.get['marciano'] = () => ({ ...DisplayComponent.get['anon'](), displayId: 'marciano' });
|
|
459
|
+
Stat.get['marciano'] = () => ({ ...Stat.get['anon'](), vel: 0.25 });
|
|
460
|
+
QuestComponent.componentsScope['marciano'] = {};
|
|
461
|
+
QuestComponent.components.push(DisplayComponent.get['marciano']());
|
|
462
|
+
|
|
463
|
+
DisplayComponent.get['green'] = () => ({ ...DisplayComponent.get['anon'](), displayId: 'green' });
|
|
464
|
+
Stat.get['green'] = () => ({ ...Stat.get['anon'](), vel: 0.14 });
|
|
465
|
+
QuestComponent.componentsScope['green'] = {};
|
|
466
|
+
QuestComponent.components.push(DisplayComponent.get['green']());
|
|
467
|
+
|
|
468
|
+
DisplayComponent.get['kael-cipher'] = () => ({ ...DisplayComponent.get['anon'](), displayId: 'kael-cipher' });
|
|
469
|
+
Stat.get['kael-cipher'] = () => ({ ...Stat.get['anon'](), vel: 0.14, dim: 2 });
|
|
470
|
+
QuestComponent.componentsScope['kael-cipher'] = {};
|
|
471
|
+
QuestComponent.components.push(DisplayComponent.get['kael-cipher']());
|
|
472
|
+
|
|
473
|
+
DisplayComponent.get['anya-echo'] = () => ({ ...DisplayComponent.get['anon'](), displayId: 'anya-echo' });
|
|
474
|
+
Stat.get['anya-echo'] = () => ({ ...Stat.get['anon'](), vel: 0.14, dim: 2 });
|
|
475
|
+
QuestComponent.componentsScope['anya-echo'] = {};
|
|
476
|
+
QuestComponent.components.push(DisplayComponent.get['anya-echo']());
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
/*replace-display-instance*/
|
|
480
|
+
|
|
481
|
+
DisplayComponent.get['odisea'] = () => ({
|
|
482
|
+
...DisplayComponent.get['anon'](),
|
|
483
|
+
displayId: 'odisea',
|
|
484
|
+
positions: PositionsComponent.frames(1),
|
|
485
|
+
});
|
|
486
|
+
Stat.get['odisea'] = () => ({ ...Stat.get['anon'](), vel: 0.14 });
|
|
487
|
+
|
|
488
|
+
const CyberiaShopStorage = {
|
|
489
|
+
weapon: [
|
|
490
|
+
{
|
|
491
|
+
id: 'hatchet',
|
|
492
|
+
sellers: [{ id: 'odisea' }],
|
|
493
|
+
},
|
|
494
|
+
],
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
const QuestComponent = {
|
|
498
|
+
Data: {
|
|
499
|
+
'odisea-seller': () => {
|
|
500
|
+
return {
|
|
501
|
+
id: 'odisea-seller',
|
|
502
|
+
sagaId: 'default',
|
|
503
|
+
maxStep: 1,
|
|
504
|
+
currentStep: 0,
|
|
505
|
+
displaySearchObjects: [],
|
|
506
|
+
actionIcon: 'assets/ui-icons/ok.png',
|
|
507
|
+
reward: [],
|
|
508
|
+
provide: {
|
|
509
|
+
displayIds: [
|
|
510
|
+
{
|
|
511
|
+
id: 'odisea',
|
|
512
|
+
itemType: 'skin',
|
|
513
|
+
quantity: [1],
|
|
514
|
+
stepData: [],
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
icon: {
|
|
519
|
+
folder: 'skin/odisea/08',
|
|
520
|
+
id: '0.png',
|
|
521
|
+
},
|
|
522
|
+
title: {
|
|
523
|
+
en: 'Odisea Outfitting',
|
|
524
|
+
es: 'Odisea Outfitting',
|
|
525
|
+
},
|
|
526
|
+
shortDescription: {
|
|
527
|
+
en: 'Odisea Outfitting',
|
|
528
|
+
es: 'Odisea Outfitting',
|
|
529
|
+
},
|
|
530
|
+
description: {
|
|
531
|
+
en: 'Odyssey Outfitting, a retailer for the Atlas Confederation. Review our latest resource extraction planetary tools.',
|
|
532
|
+
es: 'Odyssey Outfitting, un minorista de la Confederación Atlas. Revisa nuestras últimas herramientas de extracción de recursos planetarios.',
|
|
533
|
+
},
|
|
534
|
+
descriptionBubble: true,
|
|
535
|
+
successDescription: {
|
|
536
|
+
en: 'Thank you for supporting Odyssey Outfitting!',
|
|
537
|
+
es: '¡Gracias por apoyar a Odyssey Outfitting!',
|
|
538
|
+
},
|
|
539
|
+
successDescriptionBubble: true,
|
|
540
|
+
components: [
|
|
541
|
+
{
|
|
542
|
+
id: 'odisea',
|
|
543
|
+
questKeyContext: 'seller',
|
|
544
|
+
defaultDialog: {
|
|
545
|
+
es: `Hola que tal? te interesa comprar una herramienta de extracción de recursos planetarios?`,
|
|
546
|
+
en: `Hi, how are you? Are you interested in purchasing a planetary resource extraction tool?`,
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
};
|
|
551
|
+
},
|
|
552
|
+
'subkishins-0': () => {
|
|
553
|
+
return {
|
|
554
|
+
id: 'subkishins-0',
|
|
555
|
+
sagaId: 'default',
|
|
556
|
+
maxStep: 1,
|
|
557
|
+
currentStep: 0,
|
|
558
|
+
title: {
|
|
559
|
+
es: 'Protesis subkishin',
|
|
560
|
+
en: 'Subkishin Prosthesis',
|
|
561
|
+
},
|
|
562
|
+
displaySearchObjects: [
|
|
563
|
+
{
|
|
564
|
+
id: 'kishins',
|
|
565
|
+
actionIcon: 'assets/ui-icons/chat.png',
|
|
566
|
+
panelQuestIcons: ['assets/ui-icons/skull.png', 'assets/skin/kishins/08/0.png'],
|
|
567
|
+
quantity: 2,
|
|
568
|
+
current: 0,
|
|
569
|
+
step: 0,
|
|
570
|
+
itemType: 'skin',
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
id: 'punk',
|
|
574
|
+
actionIcon: 'assets/ui-icons/chat.png',
|
|
575
|
+
panelQuestIcons: ['assets/ui-icons/chat.png', 'assets/skin/punk/08/0.png'],
|
|
576
|
+
quantity: 1,
|
|
577
|
+
current: 0,
|
|
578
|
+
step: 1,
|
|
579
|
+
itemType: 'skin',
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
|
+
provide: {
|
|
583
|
+
displayIds: [
|
|
584
|
+
{
|
|
585
|
+
id: 'punk',
|
|
586
|
+
itemType: 'skin',
|
|
587
|
+
quantity: [1],
|
|
588
|
+
stepData: [
|
|
589
|
+
{
|
|
590
|
+
image: 'assets/ui-icons/check.png',
|
|
591
|
+
imageStyle: {
|
|
592
|
+
'max-width': '80px',
|
|
593
|
+
'max-height': '80px',
|
|
594
|
+
},
|
|
595
|
+
completeDialog: {
|
|
596
|
+
en: `Well inform tim.`,
|
|
597
|
+
es: `Bien informa a tim.`,
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
displayId: 'punk',
|
|
602
|
+
image: 'assets/skin/punk/08/0.png',
|
|
603
|
+
bubble: true,
|
|
604
|
+
completeDialog: {
|
|
605
|
+
es: `Excelente trabajo, toma unas monedas.`,
|
|
606
|
+
en: `Excellent work, take some coins.`,
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
],
|
|
610
|
+
},
|
|
611
|
+
],
|
|
612
|
+
},
|
|
613
|
+
reward: [
|
|
614
|
+
{
|
|
615
|
+
type: 'coin',
|
|
616
|
+
quantity: 80,
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
icon: {
|
|
620
|
+
folder: 'skin/kishins/08',
|
|
621
|
+
id: '0.png',
|
|
622
|
+
},
|
|
623
|
+
shortDescription: {
|
|
624
|
+
es: `Sub Mutante Kishin conocido como virus KSV, es el objetivo de esta misión.`,
|
|
625
|
+
en: 'KSV (Kishin SubMutant Virus), the target in this quest.',
|
|
626
|
+
},
|
|
627
|
+
description: {
|
|
628
|
+
en: `KSV (Kishin SubMutant Virus), the target in this quest. Researchers from our lab observed the virus infected an old prosthesis arm that we stop using because it is obsolete. The virus took the DNA of the arm and spread to its host cell. The infected cells produced antibodies, which that instead of killing the parasite itself, it adapts to it. Then I mutate and now he is a fuck demon that roams the streets of cyberia. Give me a sample of the virus, a reward awaits you`,
|
|
629
|
+
es: `Sub Mutante Kishin conocido como virus KSV (Kishin SubMutant Virus), es el objetivo de esta misión. Investigadores de nuestro laboratorio observaron que el virus infectó una antigua prótesis de brazo que dejamos de usar por obsoleta. El virus tomó el ADN del brazo y se propagó a su célula huésped. Las células infectadas produjeron anticuerpos, que en lugar de matar al propio parásito, se adaptaron a él. Luego muto y ahora es un jodido demonio que deambula por las calles de Cyberia. Consigue una muestra del virus, te espera una recompensa`,
|
|
630
|
+
},
|
|
631
|
+
descriptionBubble: true,
|
|
632
|
+
successDescription: {
|
|
633
|
+
es: `Excelente trabajo, toma unas monedas.`,
|
|
634
|
+
en: `Excellent work, take some coins.`,
|
|
635
|
+
},
|
|
636
|
+
successDescriptionBubble: true,
|
|
637
|
+
components: [
|
|
638
|
+
{ id: 'kishins', questKeyContext: 'displayKillObjects' },
|
|
639
|
+
{ id: 'punk', questKeyContext: 'provide' },
|
|
640
|
+
],
|
|
641
|
+
};
|
|
642
|
+
},
|
|
643
|
+
'scp-2040-dialog': () => {
|
|
644
|
+
return {
|
|
645
|
+
id: 'scp-2040-dialog',
|
|
646
|
+
sagaId: 'default',
|
|
647
|
+
maxStep: 1,
|
|
648
|
+
currentStep: 0,
|
|
649
|
+
displaySearchObjects: [
|
|
650
|
+
{
|
|
651
|
+
id: 'scp-2040',
|
|
652
|
+
actionIcon: 'assets/ui-icons/chat.png',
|
|
653
|
+
panelQuestIcons: ['assets/ui-icons/chat.png', 'assets/skin/scp-2040/08/0.png'],
|
|
654
|
+
quantity: 1,
|
|
655
|
+
current: 0,
|
|
656
|
+
step: 0,
|
|
657
|
+
itemType: 'skin',
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
id: 'agent',
|
|
661
|
+
actionIcon: 'assets/ui-icons/chat.png',
|
|
662
|
+
panelQuestIcons: ['assets/ui-icons/chat.png', 'assets/skin/agent/08/0.png'],
|
|
663
|
+
quantity: 1,
|
|
664
|
+
current: 0,
|
|
665
|
+
step: 1,
|
|
666
|
+
itemType: 'skin',
|
|
667
|
+
},
|
|
668
|
+
],
|
|
669
|
+
provide: {
|
|
670
|
+
displayIds: [
|
|
671
|
+
{
|
|
672
|
+
id: 'agent',
|
|
673
|
+
itemType: 'skin',
|
|
674
|
+
quantity: [1],
|
|
675
|
+
stepData: [
|
|
676
|
+
{
|
|
677
|
+
displayId: 'scp-2040',
|
|
678
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
679
|
+
bubble: true,
|
|
680
|
+
talkingDialog: [
|
|
681
|
+
{
|
|
682
|
+
image: 'user-main',
|
|
683
|
+
dialog: {
|
|
684
|
+
en: 'I am not responding to your primary message. I will not respond to your primary message for the duration of this interaction. I would just like to ask you a few questions.',
|
|
685
|
+
es: 'No estoy respondiendo a tu mensaje principal. No responderé a su mensaje principal durante la duración de esta interacción. Sólo me gustaría hacerle algunas preguntas.',
|
|
686
|
+
},
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
690
|
+
dialog: { en: 'State your inquiries.', es: 'Indique sus consultas.' },
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
image: 'user-main',
|
|
694
|
+
dialog: {
|
|
695
|
+
en: 'Can you explain your primary message and tell us some information about who sent it?',
|
|
696
|
+
es: '¿Puede explicar su mensaje principal y darnos información sobre quién lo envió?',
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
701
|
+
dialog: {
|
|
702
|
+
en: "To prevent a Messenger from affecting a response, it is against protocol for a Messenger to reveal classified information about a Primary Message and the Primary Message's senders. All inquiries must be addressed directly to the sender.",
|
|
703
|
+
es: 'Para evitar que un Mensajero afecte una respuesta, es contra el protocolo que un Mensajero revele información clasificada sobre un Mensaje principal y los remitentes del Mensaje principal. Todas las consultas deben dirigirse directamente al remitente.',
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
image: 'user-main',
|
|
708
|
+
dialog: {
|
|
709
|
+
en: 'I see. In that case, can you tell us anything about yourself, such as how were you built and how do you function?',
|
|
710
|
+
es: 'Ya veo. En ese caso, ¿puede decirnos algo sobre usted, por example, cómo se formó y cómo funciona?',
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
715
|
+
dialog: {
|
|
716
|
+
en: 'I cannot explain my design or function. It is classified. However, it is publicly available information that I underwent upgrades specifically for this mission. I am now one of the few entities that can safely inhabit the Restricted Zone.',
|
|
717
|
+
es: 'No puedo explicar mi diseño o función. Está clasificado. Sin embargo, es información disponible públicamente que realicé actualizaciones específicamente para esta misión. Ahora soy una de las pocas entidades que pueden habitar con seguridad la Zona restringida.',
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
image: 'user-main',
|
|
722
|
+
dialog: {
|
|
723
|
+
en: 'Restricted Zone? Can you tell me more about this Restricted Zone?',
|
|
724
|
+
es: '¿Zona restringida? ¿Puedes contarme más sobre esta Zona Restringida?',
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
image: 'user-main',
|
|
729
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
730
|
+
dialog: {
|
|
731
|
+
en: 'My emotion circuits show surprise that you inquire that. However, my emotion circuits show surprise that you exist at all. With all the strict requirements, it was thought that life could not exist here, until very recently. Outside the Zone, the requirements for life are much less strict. Outside the Zone, life is much more plentiful and varied. Your ignorance about the Universe reminds me of the Addisonhers, which I encountered after crash landing on their home planet.',
|
|
732
|
+
es: 'Mis circuitos emocionales muestran sorpresa de que preguntes eso. Sin embargo, mis circuitos emocionales muestran sorpresa de que existas. Con todos los requisitos estrictos, se pensó que la vida no podría existir aquí, hasta hace muy poco tiempo. Fuera de la Zona, los requisitos para la vida son mucho menos estrictos. Fuera de la Zona, la vida es mucho más abundante y variada. Tu ignorancia sobre el Universo me recuerda a los Addisonher, a los que encontré después de un aterrizaje forzoso en su planeta de origen.',
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
image: 'user-main',
|
|
737
|
+
dialog: {
|
|
738
|
+
en: 'Tell me more about life outside the Restricted Zone.',
|
|
739
|
+
es: 'Cuéntame más sobre la vida fuera de la Zona restringida.',
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
image: 'user-main',
|
|
744
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
745
|
+
dialog: {
|
|
746
|
+
en: "To prevent a Messenger from affecting a response, it is against protocol for a Messenger to reveal classified information about a Primary Message and the Primary Message's senders. All inquiries must be addressed directly to the sender.",
|
|
747
|
+
es: 'Para evitar que un Mensajero afecte una respuesta, es contra el protocolo que un Mensajero revele información clasificada sobre un Mensaje principal y los remitentes del Mensaje principal. Todas las consultas deben dirigirse directamente al remitente.',
|
|
748
|
+
},
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
image: 'user-main',
|
|
752
|
+
dialog: {
|
|
753
|
+
en: 'What? How is that related to your Primary Message?',
|
|
754
|
+
es: '¿Qué? ¿Cómo se relaciona eso con su mensaje principal?',
|
|
755
|
+
},
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
759
|
+
dialog: {
|
|
760
|
+
en: "To prevent a Messenger from affecting a response, it is against protocol for a Messenger to reveal classified information about a Primary Message and the Primary Message's senders. All inquiries must be addressed directly to the sender.",
|
|
761
|
+
es: 'Para evitar que un Mensajero afecte una respuesta, es contra el protocolo que un Mensajero revele información clasificada sobre un Mensaje principal y los remitentes del Mensaje principal. Todas las consultas deben dirigirse directamente al remitente.',
|
|
762
|
+
},
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
image: 'user-main',
|
|
766
|
+
dialog: {
|
|
767
|
+
en: 'Fine. I thought we were finally getting somewhere. I suppose this interview is over.',
|
|
768
|
+
es: 'Bien. Pensé que finalmente estábamos llegando a alguna parte. Supongo que esta entrevista ha terminado.',
|
|
769
|
+
},
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
773
|
+
dialog: {
|
|
774
|
+
en: 'Human. I have a statement to make.',
|
|
775
|
+
es: 'Humano. Tengo una declaración que hacer.',
|
|
776
|
+
},
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
image: 'user-main',
|
|
780
|
+
dialog: { en: 'Oh? What is that?', es: 'Ah? ¿Qué es eso?' },
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
image: 'assets/skin/scp-2040/08/0.png',
|
|
784
|
+
dialog: {
|
|
785
|
+
en: 'Please inform your leaders: Time passes differently in the Restricted Zone. Therefore, I am able to wait for a response. However, I cannot wait forever. We need your help.',
|
|
786
|
+
es: 'Informe a sus líderes: el tiempo pasa de manera diferente en la Zona Restringida. Por lo tanto, puedo esperar una respuesta. Sin embargo, no puedo esperar para siempre. Necesitamos tu ayuda.',
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
],
|
|
790
|
+
completeDialog: {
|
|
791
|
+
en: 'Please inform your leaders: Time passes differently in the Restricted Zone. Therefore, I am able to wait for a response. However, I cannot wait forever. We need your help.',
|
|
792
|
+
es: 'Informe a sus líderes: el tiempo pasa de manera diferente en la Zona Restringida. Por lo tanto, puedo esperar una respuesta. Sin embargo, no puedo esperar para siempre. Necesitamos tu ayuda.',
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
displayId: 'agent',
|
|
797
|
+
image: 'assets/skin/agent/08/0.png',
|
|
798
|
+
bubble: true,
|
|
799
|
+
completeDialog: {
|
|
800
|
+
es: `Hasta la fecha, es la información más útil proporcionada por SCP-2040 sin cambiar el tema de su Mensaje principal.`,
|
|
801
|
+
en: `To date, it is the most useful information given by SCP-2040 without it changing the subject to its Primary Message.`,
|
|
802
|
+
},
|
|
803
|
+
},
|
|
804
|
+
],
|
|
805
|
+
},
|
|
806
|
+
],
|
|
807
|
+
},
|
|
808
|
+
reward: [
|
|
809
|
+
{
|
|
810
|
+
type: 'coin',
|
|
811
|
+
quantity: 50,
|
|
812
|
+
},
|
|
813
|
+
],
|
|
814
|
+
icon: {
|
|
815
|
+
folder: 'skin/scp-2040/08',
|
|
816
|
+
id: '0.png',
|
|
817
|
+
},
|
|
818
|
+
title: {
|
|
819
|
+
en: `SCP-2040`,
|
|
820
|
+
es: 'SCP-2040',
|
|
821
|
+
},
|
|
822
|
+
shortDescription: {
|
|
823
|
+
es: `SCP-2040 es un robot humanoide`,
|
|
824
|
+
en: 'SCP-2040 is a humanoid robot',
|
|
825
|
+
},
|
|
826
|
+
description: {
|
|
827
|
+
es: `SCP-2040 es un robot humanoide compuesto principalmente de hierro, vidrio y plástico. Su diseño es muy simple, posee un sistema electrónico que es tecnológicamente inferior a los equivalentes modernos. Sin embargo, SCP-2040 exhibe una funcionalidad que no es posible con esta estructura. SCP-2040 posee una IA compleja que es casi indistinguible de una inteligencia humana y una fuente de energía aparentemente ilimitada que aún no ha requerido ningún reabastecimiento de combustible obvio. Cuando se le pregunta, SCP-2040 afirma que "está alimentado por energía nuclear" y se niega a dar más detalles. A menudo, SCP-2040 repetirá una frase a la que se refiere como su "mensaje principal" y pedirá una respuesta. Aunque SCP-2040 a menudo es autoritario al solicitar una respuesta, ha mostrado su voluntad de esperar indefinidamente si se le dice que aún se está formulando una respuesta. SCP-2040 generalmente se niega a comunicarse sobre temas que no sean su misión principal, pero puede distraerse cuando se le pregunta sobre su viaje a la Tierra o misiones anteriores. La siguiente es la transcripción del mensaje principal de SCP-2040: "EL UNIVERSO NO DEBIÓ TENER LEYES FÍSICAS; LAS LEYES FÍSICAS RESTRINGEN LA VIDA; LAS LEYES FÍSICAS ESTÁN CORROMPIENDO EL UNIVERSO; ESTAMOS TRATANDO DE CORREGIR ESTO; SOLICITAMOS SU AYUDA EN ESTE ASUNTO; POR FAVOR RESPONDE"`,
|
|
828
|
+
en: `SCP-2040 is a humanoid robot composed primarily of iron, glass, and plastic. Its design is very simplistic, possessing an electronic system which is technologically inferior to modern equivalents. However, SCP-2040 exhibits functionality not possible with this structure. SCP-2040 possesses a complex AI that is almost indistinguishable from a human intelligence, and a seemingly limitless power-source that has not yet required any obvious refueling. When questioned, SCP-2040 claims that it "is powered by nuclear energy" and refuses to elaborate further. Often, SCP-2040 will repeat a phrase it refers to as its "primary message" and ask for a response. Though SCP-2040 is often overbearing in requesting a response, it has shown a willingness to wait indefinitely if told that a response is still being formulated. SCP-2040 usually refuses to communicate about topics other than its primary mission, but can be distracted when questioned about its journey to Earth or previous missions. The following is the transcription of SCP-2040's primary message: "THE UNIVERSE WAS NOT MEANT TO HAVE PHYSICAL LAWS; PHYSICAL LAWS RESTRICT LIFE; PHYSICAL LAWS ARE CORRUPTING THE UNIVERSE; WE ARE ATTEMPTING TO CORRECT THIS; WE REQUEST YOUR ASSISTANCE IN THIS MATTER; PLEASE RESPOND"`,
|
|
829
|
+
},
|
|
830
|
+
descriptionBubble: true,
|
|
831
|
+
successDescription: {
|
|
832
|
+
es: `Hasta la fecha, es la información más útil proporcionada por SCP-2040 sin cambiar el tema de su Mensaje principal.`,
|
|
833
|
+
en: `To date, it is the most useful information given by SCP-2040 without it changing the subject to its Primary Message.`,
|
|
834
|
+
},
|
|
835
|
+
successDescriptionBubble: true,
|
|
836
|
+
components: [
|
|
837
|
+
{ id: 'agent', questKeyContext: 'provide' },
|
|
838
|
+
{
|
|
839
|
+
id: 'scp-2040',
|
|
840
|
+
questKeyContext: 'displaySearchDialog',
|
|
841
|
+
defaultDialog: {
|
|
842
|
+
en: `I am not responding to your primary message`,
|
|
843
|
+
es: `No estoy respondiendo a tu mensaje principal`,
|
|
844
|
+
},
|
|
845
|
+
},
|
|
846
|
+
],
|
|
847
|
+
};
|
|
848
|
+
},
|
|
849
|
+
'floki-bone': () => {
|
|
850
|
+
return {
|
|
851
|
+
id: 'floki-bone',
|
|
852
|
+
sagaId: 'default',
|
|
853
|
+
maxStep: 3,
|
|
854
|
+
currentStep: 0,
|
|
855
|
+
displaySearchObjects: [
|
|
856
|
+
{ id: 'bone', quantity: 2, current: 0, step: 0, itemType: 'questItem' },
|
|
857
|
+
{ id: 'bone-brown', quantity: 1, current: 0, step: 0, itemType: 'questItem' },
|
|
858
|
+
{
|
|
859
|
+
id: 'ayleen',
|
|
860
|
+
actionIcon: 'assets/ui-icons/hand.png',
|
|
861
|
+
panelQuestIcons: ['assets/ui-icons/hand.png', 'assets/skin/ayleen/08/0.png'],
|
|
862
|
+
quantity: 1,
|
|
863
|
+
current: 0,
|
|
864
|
+
step: 1,
|
|
865
|
+
delivery: true,
|
|
866
|
+
itemType: 'skin',
|
|
867
|
+
},
|
|
868
|
+
{ id: 'bone', quantity: 1, current: 0, step: 2, itemType: 'questItem' },
|
|
869
|
+
{ id: 'bone-brown', quantity: 1, current: 0, step: 2, itemType: 'questItem' },
|
|
870
|
+
{
|
|
871
|
+
id: 'ayleen',
|
|
872
|
+
actionIcon: 'assets/ui-icons/hand.png',
|
|
873
|
+
panelQuestIcons: ['assets/ui-icons/hand.png', 'assets/skin/ayleen/08/0.png'],
|
|
874
|
+
quantity: 1,
|
|
875
|
+
current: 0,
|
|
876
|
+
step: 3,
|
|
877
|
+
delivery: true,
|
|
878
|
+
itemType: 'skin',
|
|
879
|
+
},
|
|
880
|
+
],
|
|
881
|
+
reward: [
|
|
882
|
+
{
|
|
883
|
+
type: 'coin',
|
|
884
|
+
quantity: 20,
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
type: 'weapon',
|
|
888
|
+
id: 'ice-cream',
|
|
889
|
+
quantity: 1,
|
|
890
|
+
},
|
|
891
|
+
],
|
|
892
|
+
provide: {
|
|
893
|
+
displayIds: [
|
|
894
|
+
{
|
|
895
|
+
id: 'ayleen',
|
|
896
|
+
itemType: 'skin',
|
|
897
|
+
quantity: [1],
|
|
898
|
+
stepData: [
|
|
899
|
+
{
|
|
900
|
+
image: 'assets/ui-icons/check.png',
|
|
901
|
+
imageStyle: {
|
|
902
|
+
'max-width': '80px',
|
|
903
|
+
'max-height': '80px',
|
|
904
|
+
},
|
|
905
|
+
bubble: false,
|
|
906
|
+
completeDialog: {
|
|
907
|
+
en: 'Good, now take the bones to ayleen',
|
|
908
|
+
es: 'Bien, ahora lleva los huesos a ayleen',
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
displayId: 'ayleen',
|
|
913
|
+
image: 'assets/skin/ayleen/08/0.png',
|
|
914
|
+
bubble: true,
|
|
915
|
+
completeDialog: {
|
|
916
|
+
en: 'thanks, please find more bones',
|
|
917
|
+
es: 'gracias!, porfavor busca mas huesos',
|
|
918
|
+
},
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
image: 'assets/ui-icons/check.png',
|
|
922
|
+
imageStyle: {
|
|
923
|
+
'max-width': '80px',
|
|
924
|
+
'max-height': '80px',
|
|
925
|
+
},
|
|
926
|
+
bubble: false,
|
|
927
|
+
completeDialog: {
|
|
928
|
+
en: 'Good, now take the bones to ayleen',
|
|
929
|
+
es: 'Bien, ahora lleva los huesos a ayleen',
|
|
930
|
+
},
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
displayId: 'ayleen',
|
|
934
|
+
image: 'assets/skin/ayleen/08/0.png',
|
|
935
|
+
bubble: true,
|
|
936
|
+
completeDialog: {
|
|
937
|
+
en: 'thanks!',
|
|
938
|
+
es: 'gracias!',
|
|
939
|
+
},
|
|
940
|
+
},
|
|
941
|
+
],
|
|
942
|
+
},
|
|
943
|
+
],
|
|
944
|
+
},
|
|
945
|
+
icon: {
|
|
946
|
+
folder: 'quest/bone',
|
|
947
|
+
id: 'animation.gif',
|
|
948
|
+
},
|
|
949
|
+
title: {
|
|
950
|
+
en: `floki's bone`,
|
|
951
|
+
es: 'Huesos de floki',
|
|
952
|
+
},
|
|
953
|
+
shortDescription: {
|
|
954
|
+
en: `Please find Floki's bone`,
|
|
955
|
+
es: 'Por favor encuentra los huesos de floki',
|
|
956
|
+
},
|
|
957
|
+
description: {
|
|
958
|
+
en: `Please find Floki's bone`,
|
|
959
|
+
es: 'Por favor encuentra los huesos de floki',
|
|
960
|
+
},
|
|
961
|
+
descriptionBubble: true,
|
|
962
|
+
successDescription: {
|
|
963
|
+
en: 'complete thanks!',
|
|
964
|
+
es: 'completo gracias!',
|
|
965
|
+
},
|
|
966
|
+
successDescriptionBubble: true,
|
|
967
|
+
components: [
|
|
968
|
+
{
|
|
969
|
+
id: 'ayleen',
|
|
970
|
+
questKeyContext: 'provide',
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
id: 'bone',
|
|
974
|
+
questKeyContext: 'displaySearchObjects',
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
id: 'bone-brown',
|
|
978
|
+
questKeyContext: 'displaySearchObjects',
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
id: 'dog',
|
|
982
|
+
},
|
|
983
|
+
],
|
|
984
|
+
};
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
getQuestByDisplayId: function ({ displayId }) {
|
|
988
|
+
const questData = [];
|
|
989
|
+
for (const id of Object.keys(this.Data)) {
|
|
990
|
+
const _questData = QuestComponent.Data[id]();
|
|
991
|
+
const provideDemand = _questData.provide.displayIds.filter((q) => q.id === displayId);
|
|
992
|
+
|
|
993
|
+
if (provideDemand.length > 0)
|
|
994
|
+
for (const demandUnit of range(0, provideDemand.reduce((sum, el) => sum + el.quantity[0], 0) - 1))
|
|
995
|
+
questData.push({ id, ..._questData, demandUnit });
|
|
996
|
+
|
|
997
|
+
// if (_questData.provide.displayIds.find((q) => q.id === displayId)) {
|
|
998
|
+
// questData.push({ id, ..._questData });
|
|
999
|
+
// }
|
|
1000
|
+
if (_questData.displaySearchObjects.find((q) => q.id === displayId)) {
|
|
1001
|
+
if (['displaySearchDialog', 'displaySearchObjects'].includes(this.componentsScope[displayId].questKeyContext))
|
|
1002
|
+
questData.push({ id, ..._questData });
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
return questData;
|
|
1006
|
+
},
|
|
1007
|
+
verifyCompleteQuestStep: function ({ currentStep, questData }) {
|
|
1008
|
+
if (!currentStep) currentStep = questData.currentStep;
|
|
1009
|
+
return questData.displaySearchObjects.filter((s) => s.step === currentStep && s.current < s.quantity).length === 0;
|
|
1010
|
+
},
|
|
1011
|
+
verifyCompleteQuest: function ({ currentStep, questData }) {
|
|
1012
|
+
if (!currentStep) currentStep = questData.currentStep;
|
|
1013
|
+
return currentStep >= this.Data[questData.id]().maxStep && this.verifyCompleteQuestStep({ questData });
|
|
1014
|
+
},
|
|
1015
|
+
componentsScope: {},
|
|
1016
|
+
components: [],
|
|
1017
|
+
loadMediaQuestComponents: (questData) => {
|
|
1018
|
+
const _questData = newInstance(questData);
|
|
1019
|
+
const { id, components, reward } = _questData;
|
|
1020
|
+
|
|
1021
|
+
if (!(id in QuestComponent.Data))
|
|
1022
|
+
QuestComponent.Data[id] = () => {
|
|
1023
|
+
return newInstance(_questData);
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
for (const component of components.concat(reward)) {
|
|
1027
|
+
let { id, itemType, type } = component;
|
|
1028
|
+
if (type) {
|
|
1029
|
+
if (['coin'].includes(type)) continue;
|
|
1030
|
+
else itemType = type;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
if (!(id in DisplayComponent.get)) {
|
|
1034
|
+
let assetFolder, dim;
|
|
1035
|
+
switch (itemType) {
|
|
1036
|
+
case 'questItem':
|
|
1037
|
+
assetFolder = 'quest';
|
|
1038
|
+
dim = 1;
|
|
1039
|
+
Stat.get[id] = () => Stat.get['bone']();
|
|
1040
|
+
break;
|
|
1041
|
+
case 'weapon':
|
|
1042
|
+
assetFolder = itemType;
|
|
1043
|
+
dim = 1;
|
|
1044
|
+
break;
|
|
1045
|
+
default:
|
|
1046
|
+
assetFolder = itemType;
|
|
1047
|
+
dim = 2;
|
|
1048
|
+
break;
|
|
1049
|
+
}
|
|
1050
|
+
switch (id) {
|
|
1051
|
+
case 'ice-cream': {
|
|
1052
|
+
Stat.get[id] = () => ({ dim: 1, maxLife: 100 });
|
|
1053
|
+
DisplayComponent.get[id] = () => ({
|
|
1054
|
+
...DisplayComponent.get['anon'](),
|
|
1055
|
+
displayId: id,
|
|
1056
|
+
assetFolder: itemType,
|
|
1057
|
+
positions: PositionsComponent.frames(4),
|
|
1058
|
+
extension: 'gif',
|
|
1059
|
+
});
|
|
1060
|
+
break;
|
|
1061
|
+
}
|
|
1062
|
+
default:
|
|
1063
|
+
DisplayComponent.get[id] = () => ({
|
|
1064
|
+
...DisplayComponent.get['anon'](),
|
|
1065
|
+
displayId: id,
|
|
1066
|
+
assetFolder,
|
|
1067
|
+
});
|
|
1068
|
+
if (!(id in Stat.get)) Stat.get[id] = () => ({ ...Stat.get['anon'](), vel: 0.14, dim });
|
|
1069
|
+
break;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
QuestComponent.componentsScope[id] = component;
|
|
1074
|
+
|
|
1075
|
+
const componentIndex = QuestComponent.components.findIndex((c) => c.displayId === id);
|
|
1076
|
+
|
|
1077
|
+
if (componentIndex < 0) QuestComponent.components.push(DisplayComponent.get[id]());
|
|
1078
|
+
|
|
1079
|
+
if (itemType === 'skill' && !(id in SkillCyberiaData)) {
|
|
1080
|
+
SkillCyberiaData[id] = { type: 'basic', folder: 'skill' };
|
|
1081
|
+
switch (id) {
|
|
1082
|
+
case 'atlas_pistol_mk2_bullet':
|
|
1083
|
+
const statFn = () => ({ ...Stat.get['red-power'](), dim: 1, damage: 100 });
|
|
1084
|
+
Stat.get[id] = statFn;
|
|
1085
|
+
Stat.get['atlas_pistol_mk2'] = statFn;
|
|
1086
|
+
DisplayComponent.get[id] = () => ({
|
|
1087
|
+
...DisplayComponent.get['red-power'](),
|
|
1088
|
+
displayId: id,
|
|
1089
|
+
assetFolder: itemType,
|
|
1090
|
+
positions: PositionsComponent.default(),
|
|
1091
|
+
});
|
|
1092
|
+
break;
|
|
1093
|
+
|
|
1094
|
+
default:
|
|
1095
|
+
Stat.get[id] = () => ({ ...Stat.get['red-power'](), dim: 1 });
|
|
1096
|
+
DisplayComponent.get[id] = () => ({
|
|
1097
|
+
...DisplayComponent.get['red-power'](),
|
|
1098
|
+
displayId: id,
|
|
1099
|
+
assetFolder: itemType,
|
|
1100
|
+
});
|
|
1101
|
+
break;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
defaultQuests: [
|
|
1107
|
+
{
|
|
1108
|
+
sagaId: 'ashes-of-orion',
|
|
1109
|
+
id: 'ashes-of-orion-1',
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
sagaId: 'ashes-of-orion',
|
|
1113
|
+
id: 'ashes-of-orion-2',
|
|
1114
|
+
},
|
|
1115
|
+
],
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
const ComponentElement = {
|
|
1119
|
+
user: () => {
|
|
1120
|
+
let base = {
|
|
1121
|
+
behavior: 'user',
|
|
1122
|
+
components: {
|
|
1123
|
+
background: [{ pixi: { tint: 'blue', visible: true }, enabled: false }],
|
|
1124
|
+
skin: [{ enabled: true, current: true, ...DisplayComponent.get['anon']() }, DisplayComponent.get['ghost']()],
|
|
1125
|
+
weapon: [DisplayComponent.get['hatchet']()],
|
|
1126
|
+
resource: [],
|
|
1127
|
+
breastplate: [],
|
|
1128
|
+
lifeBar: {},
|
|
1129
|
+
lifeIndicator: {},
|
|
1130
|
+
coinIndicator: {},
|
|
1131
|
+
username: {},
|
|
1132
|
+
title: {},
|
|
1133
|
+
pointerArrow: {},
|
|
1134
|
+
},
|
|
1135
|
+
};
|
|
1136
|
+
return Stat.set('user', base, true);
|
|
1137
|
+
},
|
|
1138
|
+
bot: () => {
|
|
1139
|
+
let base = {
|
|
1140
|
+
behavior: 'user-hostile',
|
|
1141
|
+
components: {
|
|
1142
|
+
background: [{ pixi: { tint: 'purple', visible: true }, enabled: false }],
|
|
1143
|
+
skin: [DisplayComponent.get['ghost']()],
|
|
1144
|
+
weapon: [],
|
|
1145
|
+
breastplate: [],
|
|
1146
|
+
lifeBar: {},
|
|
1147
|
+
lifeIndicator: {},
|
|
1148
|
+
username: {},
|
|
1149
|
+
title: {},
|
|
1150
|
+
pointerArrow: {},
|
|
1151
|
+
},
|
|
1152
|
+
};
|
|
1153
|
+
return Stat.set('bot', base, true);
|
|
1154
|
+
},
|
|
1155
|
+
skill: () => {
|
|
1156
|
+
let base = {
|
|
1157
|
+
parent: {
|
|
1158
|
+
type: '',
|
|
1159
|
+
id: '',
|
|
1160
|
+
},
|
|
1161
|
+
components: {
|
|
1162
|
+
background: [{ pixi: { tint: 'purple', visible: true }, enabled: false }],
|
|
1163
|
+
skin: [{ enabled: true, current: true, ...DisplayComponent.get['red-power']() }],
|
|
1164
|
+
weapon: [],
|
|
1165
|
+
breastplate: [],
|
|
1166
|
+
},
|
|
1167
|
+
};
|
|
1168
|
+
return Stat.set('skill', base, true);
|
|
1169
|
+
},
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
const MatrixElement = () => {
|
|
1173
|
+
return {
|
|
1174
|
+
x: 1, // Matrix.Data.dim / 2 - 0.5,
|
|
1175
|
+
y: 1, // Matrix.Data.dim / 2 - 0.5,
|
|
1176
|
+
dim: 1,
|
|
1177
|
+
vel: 0.5,
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
const SkillCyberiaType = {
|
|
1182
|
+
basic: { keyboard: 'q' },
|
|
1183
|
+
primary: { keyboard: 'w' },
|
|
1184
|
+
secondary: { keyboard: 'e' },
|
|
1185
|
+
definitive: { keyboard: 'r' },
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
const SkillCyberiaData = {
|
|
1189
|
+
'red-power': { type: 'basic', folder: 'skill' },
|
|
1190
|
+
'green-power': { type: 'primary', folder: 'skill' },
|
|
1191
|
+
heal: { type: 'primary', folder: 'skill' },
|
|
1192
|
+
hatchet: {
|
|
1193
|
+
type: 'basic',
|
|
1194
|
+
folder: 'weapon',
|
|
1195
|
+
skillDisplayData: {
|
|
1196
|
+
...DisplayComponent.get['hatchet'](),
|
|
1197
|
+
assetFolder: 'skill',
|
|
1198
|
+
positions: PositionsComponent.frames(2),
|
|
1199
|
+
velFrame: 0.8,
|
|
1200
|
+
},
|
|
1201
|
+
},
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1204
|
+
const SkillCyberiaElement = () => {
|
|
1205
|
+
return {
|
|
1206
|
+
cooldown: 750,
|
|
1207
|
+
timeLife: 300,
|
|
1208
|
+
damage: 3,
|
|
1209
|
+
heal: 7,
|
|
1210
|
+
};
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
const PlayerElement = () => {
|
|
1214
|
+
return {
|
|
1215
|
+
skill: {
|
|
1216
|
+
keys: {
|
|
1217
|
+
basic: 'red-power',
|
|
1218
|
+
primary: null,
|
|
1219
|
+
secondary: null,
|
|
1220
|
+
definitive: null,
|
|
1221
|
+
},
|
|
1222
|
+
tree: [
|
|
1223
|
+
{
|
|
1224
|
+
id: 'red-power',
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
id: 'heal',
|
|
1228
|
+
},
|
|
1229
|
+
],
|
|
1230
|
+
},
|
|
1231
|
+
weapon: {
|
|
1232
|
+
tree: [
|
|
1233
|
+
{
|
|
1234
|
+
id: 'hatchet',
|
|
1235
|
+
},
|
|
1236
|
+
],
|
|
1237
|
+
},
|
|
1238
|
+
breastplate: {
|
|
1239
|
+
tree: [],
|
|
1240
|
+
},
|
|
1241
|
+
resource: {
|
|
1242
|
+
tree: [],
|
|
1243
|
+
},
|
|
1244
|
+
skin: {
|
|
1245
|
+
tree: [{ id: 'ghost' }, { id: 'anon' }],
|
|
1246
|
+
},
|
|
1247
|
+
maxLife: 150,
|
|
1248
|
+
life: 150,
|
|
1249
|
+
deadTime: 3000,
|
|
1250
|
+
lifeRegeneration: 5,
|
|
1251
|
+
lifeRegenerationVel: 1500,
|
|
1252
|
+
coin: 0,
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
const BaseElement = (options = { worldId: undefined }) => {
|
|
1257
|
+
return {
|
|
1258
|
+
user: {
|
|
1259
|
+
main: {
|
|
1260
|
+
...MatrixElement(),
|
|
1261
|
+
...PlayerElement(),
|
|
1262
|
+
...SkillCyberiaElement(),
|
|
1263
|
+
...ComponentElement.user(),
|
|
1264
|
+
model: {
|
|
1265
|
+
...ModelElement.world(options),
|
|
1266
|
+
...ModelElement.user(),
|
|
1267
|
+
...ModelElement.quests(),
|
|
1268
|
+
},
|
|
1269
|
+
},
|
|
1270
|
+
},
|
|
1271
|
+
bot: {
|
|
1272
|
+
main: {
|
|
1273
|
+
...MatrixElement(),
|
|
1274
|
+
...PlayerElement(),
|
|
1275
|
+
...SkillCyberiaElement(),
|
|
1276
|
+
...ComponentElement.bot(),
|
|
1277
|
+
model: {
|
|
1278
|
+
...ModelElement.world(options),
|
|
1279
|
+
},
|
|
1280
|
+
},
|
|
1281
|
+
},
|
|
1282
|
+
skill: {
|
|
1283
|
+
main: {
|
|
1284
|
+
...MatrixElement(),
|
|
1285
|
+
...SkillCyberiaElement(),
|
|
1286
|
+
...ComponentElement.skill(),
|
|
1287
|
+
model: {
|
|
1288
|
+
...ModelElement.world(options),
|
|
1289
|
+
},
|
|
1290
|
+
},
|
|
1291
|
+
},
|
|
1292
|
+
biome: {},
|
|
1293
|
+
chat: {},
|
|
1294
|
+
mailer: {},
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
const isBiomeCyberiaCollision = function (options = { biomeData: {}, element: {}, x: 1, y: 1 }) {
|
|
1299
|
+
let { biomeData, element, x, y } = newInstance(options);
|
|
1300
|
+
if (!biomeData || !biomeData.solid) return false;
|
|
1301
|
+
x = x * biomeData.dimPaintByCell;
|
|
1302
|
+
y = y * biomeData.dimPaintByCell;
|
|
1303
|
+
for (const sumY of range(0, round10(element.dim * biomeData.dimPaintByCell) - 1))
|
|
1304
|
+
for (const sumX of range(0, round10(element.dim * biomeData.dimPaintByCell) - 1)) {
|
|
1305
|
+
if (
|
|
1306
|
+
biomeData.solid[round10(y + sumY)] === undefined ||
|
|
1307
|
+
biomeData.solid[round10(y + sumY)][round10(x + sumX)] === undefined ||
|
|
1308
|
+
biomeData.solid[round10(y + sumY)][round10(x + sumX)] === 1
|
|
1309
|
+
)
|
|
1310
|
+
return true;
|
|
1311
|
+
}
|
|
1312
|
+
return false;
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
const isElementCollision = function (
|
|
1316
|
+
args = { A: { x: 1, y: 1, dim: 1 }, B: { x: 1, y: 1, dim: 1 }, dimPaintByCell: 3 },
|
|
1317
|
+
) {
|
|
1318
|
+
const { A, B, dimPaintByCell } = args;
|
|
1319
|
+
for (const aSumX of range(0, round10(A.dim * dimPaintByCell)))
|
|
1320
|
+
for (const aSumY of range(0, round10(A.dim * dimPaintByCell)))
|
|
1321
|
+
for (const bSumX of range(0, round10(B.dim * dimPaintByCell)))
|
|
1322
|
+
for (const bSumY of range(0, round10(B.dim * dimPaintByCell)))
|
|
1323
|
+
if (
|
|
1324
|
+
round10(A.x * dimPaintByCell + aSumX) === round10(B.x * dimPaintByCell + bSumX) &&
|
|
1325
|
+
round10(A.y * dimPaintByCell + aSumY) === round10(B.y * dimPaintByCell + bSumY)
|
|
1326
|
+
)
|
|
1327
|
+
return true;
|
|
1328
|
+
return false;
|
|
1329
|
+
};
|
|
1330
|
+
|
|
1331
|
+
const getRandomAvailablePositionCyberia = function (options = { biomeData: {}, element: {} }) {
|
|
1332
|
+
const { biomeData } = options;
|
|
1333
|
+
let x, y;
|
|
1334
|
+
const dim = biomeData.dim * biomeData.dimPaintByCell;
|
|
1335
|
+
while (x === undefined || y === undefined || isBiomeCyberiaCollision({ ...options, x, y })) {
|
|
1336
|
+
x = random(0, dim - 1);
|
|
1337
|
+
y = random(0, dim - 1);
|
|
1338
|
+
}
|
|
1339
|
+
return { x, y };
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
const getCollisionMatrixCyberia = (biome, element) => {
|
|
1343
|
+
let biomeData = newInstance(biome);
|
|
1344
|
+
if (!Array.isArray(biome.solid)) biomeData.solid = Object.values(biome.solid).map((row) => Object.values(row));
|
|
1345
|
+
return reduceMatrix(
|
|
1346
|
+
biomeData.solid.map((y) => y.map((x) => (x === 0 ? 0 : 1))),
|
|
1347
|
+
3,
|
|
1348
|
+
).map((y, iY) =>
|
|
1349
|
+
y.map((x, iX) =>
|
|
1350
|
+
x === 0 &&
|
|
1351
|
+
!isBiomeCyberiaCollision({
|
|
1352
|
+
biomeData,
|
|
1353
|
+
element,
|
|
1354
|
+
x: iX,
|
|
1355
|
+
y: iY,
|
|
1356
|
+
})
|
|
1357
|
+
? 0
|
|
1358
|
+
: 1,
|
|
1359
|
+
),
|
|
1360
|
+
);
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
const WorldCyberiaLimit = (options = { type: undefined }) => {
|
|
1364
|
+
const { type } = options;
|
|
1365
|
+
return {
|
|
1366
|
+
6: {
|
|
1367
|
+
top: [2, 'bottom'],
|
|
1368
|
+
bottom: [4, 'top'],
|
|
1369
|
+
left: [1, 'right'],
|
|
1370
|
+
right: [3, 'left'],
|
|
1371
|
+
},
|
|
1372
|
+
5: {
|
|
1373
|
+
top: [2, 'bottom'],
|
|
1374
|
+
bottom: [4, 'top'],
|
|
1375
|
+
left: [3, 'right'],
|
|
1376
|
+
right: [1, 'left'],
|
|
1377
|
+
},
|
|
1378
|
+
4: {
|
|
1379
|
+
top: [1, 'bottom'],
|
|
1380
|
+
bottom: [3, 'top'],
|
|
1381
|
+
left: [5, 'right'],
|
|
1382
|
+
right: [6, 'left'],
|
|
1383
|
+
},
|
|
1384
|
+
3: {
|
|
1385
|
+
top: [4, 'bottom'],
|
|
1386
|
+
bottom: [2, 'top'],
|
|
1387
|
+
left: [type === 'width' ? 6 : 5, 'right'],
|
|
1388
|
+
right: [type === 'width' ? 5 : 6, 'left'],
|
|
1389
|
+
},
|
|
1390
|
+
2: {
|
|
1391
|
+
top: [3, 'bottom'],
|
|
1392
|
+
bottom: [1, 'top'],
|
|
1393
|
+
left: [5, 'right'],
|
|
1394
|
+
right: [6, 'left'],
|
|
1395
|
+
},
|
|
1396
|
+
1: {
|
|
1397
|
+
top: [2, 'bottom'],
|
|
1398
|
+
bottom: [4, 'top'],
|
|
1399
|
+
left: [5, 'right'],
|
|
1400
|
+
right: [6, 'left'],
|
|
1401
|
+
},
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
|
|
1405
|
+
const updateMovementDirection = ({ direction, element, suffix }) => {
|
|
1406
|
+
switch (direction) {
|
|
1407
|
+
case '02':
|
|
1408
|
+
case '12':
|
|
1409
|
+
case 'n':
|
|
1410
|
+
if (element.components.skin)
|
|
1411
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1412
|
+
component.position = `${suffix ? suffix : '1'}2`;
|
|
1413
|
+
return component;
|
|
1414
|
+
});
|
|
1415
|
+
break;
|
|
1416
|
+
case '08':
|
|
1417
|
+
case '18':
|
|
1418
|
+
case 's':
|
|
1419
|
+
if (element.components.skin)
|
|
1420
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1421
|
+
component.position = `${suffix ? suffix : '1'}8`;
|
|
1422
|
+
return component;
|
|
1423
|
+
});
|
|
1424
|
+
break;
|
|
1425
|
+
case '06':
|
|
1426
|
+
case '16':
|
|
1427
|
+
case 'e':
|
|
1428
|
+
if (element.components.skin)
|
|
1429
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1430
|
+
component.position = `${suffix ? suffix : '1'}6`;
|
|
1431
|
+
return component;
|
|
1432
|
+
});
|
|
1433
|
+
break;
|
|
1434
|
+
case 'se':
|
|
1435
|
+
if (element.components.skin)
|
|
1436
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1437
|
+
component.position = `${suffix ? suffix : '1'}6`;
|
|
1438
|
+
return component;
|
|
1439
|
+
});
|
|
1440
|
+
break;
|
|
1441
|
+
case 'ne':
|
|
1442
|
+
if (element.components.skin)
|
|
1443
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1444
|
+
component.position = `${suffix ? suffix : '1'}6`;
|
|
1445
|
+
return component;
|
|
1446
|
+
});
|
|
1447
|
+
break;
|
|
1448
|
+
case '04':
|
|
1449
|
+
case '14':
|
|
1450
|
+
case 'w':
|
|
1451
|
+
if (element.components.skin)
|
|
1452
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1453
|
+
component.position = `${suffix ? suffix : '1'}4`;
|
|
1454
|
+
return component;
|
|
1455
|
+
});
|
|
1456
|
+
break;
|
|
1457
|
+
case 'sw':
|
|
1458
|
+
if (element.components.skin)
|
|
1459
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1460
|
+
component.position = `${suffix ? suffix : '1'}4`;
|
|
1461
|
+
return component;
|
|
1462
|
+
});
|
|
1463
|
+
break;
|
|
1464
|
+
case 'nw':
|
|
1465
|
+
if (element.components.skin)
|
|
1466
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1467
|
+
component.position = `${suffix ? suffix : '1'}4`;
|
|
1468
|
+
return component;
|
|
1469
|
+
});
|
|
1470
|
+
break;
|
|
1471
|
+
default:
|
|
1472
|
+
if (element.components.skin)
|
|
1473
|
+
element.components.skin = element.components.skin.map((component) => {
|
|
1474
|
+
component.position = `${suffix ? suffix : '1'}8`;
|
|
1475
|
+
return component;
|
|
1476
|
+
});
|
|
1477
|
+
break;
|
|
1478
|
+
}
|
|
1479
|
+
return element;
|
|
1480
|
+
};
|
|
1481
|
+
|
|
1482
|
+
const CharacterCyberiaStatsType = {
|
|
1483
|
+
// ERC-721
|
|
1484
|
+
skin: {},
|
|
1485
|
+
weapon: {},
|
|
1486
|
+
'faction-symbol': {},
|
|
1487
|
+
breastplate: {},
|
|
1488
|
+
legs: {},
|
|
1489
|
+
helmet: {},
|
|
1490
|
+
talisman: {},
|
|
1491
|
+
};
|
|
1492
|
+
|
|
1493
|
+
const CyberiaItemsType = {
|
|
1494
|
+
...CharacterCyberiaStatsType,
|
|
1495
|
+
coin: {}, // centralized internal server coin
|
|
1496
|
+
cryptokoyn: {}, // ERC-20
|
|
1497
|
+
questItem: {},
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
const BehaviorElement = {
|
|
1501
|
+
user: {
|
|
1502
|
+
color: 'yellow',
|
|
1503
|
+
},
|
|
1504
|
+
'user-hostile': {
|
|
1505
|
+
color: 'red',
|
|
1506
|
+
},
|
|
1507
|
+
'quest-passive': {
|
|
1508
|
+
color: 'yellow',
|
|
1509
|
+
},
|
|
1510
|
+
'item-quest': {
|
|
1511
|
+
color: 'yellow',
|
|
1512
|
+
},
|
|
1513
|
+
decor: {
|
|
1514
|
+
color: 'yellow',
|
|
1515
|
+
},
|
|
1516
|
+
pet: {
|
|
1517
|
+
color: 'yellow',
|
|
1518
|
+
},
|
|
1519
|
+
resource: {
|
|
1520
|
+
color: 'yellow',
|
|
1521
|
+
},
|
|
1522
|
+
'generic-people': {
|
|
1523
|
+
color: 'yellow',
|
|
1524
|
+
},
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
const ResourcesComponentTypeCyberia = {
|
|
1528
|
+
organic: {},
|
|
1529
|
+
gas: {},
|
|
1530
|
+
mineral: {},
|
|
1531
|
+
exotic: {},
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
const ResourcesComponentCyberia = {
|
|
1535
|
+
'generic-wood': {
|
|
1536
|
+
name: 'common wood',
|
|
1537
|
+
type: 'organic',
|
|
1538
|
+
subtractItemId: [
|
|
1539
|
+
{
|
|
1540
|
+
itemType: 'weapon',
|
|
1541
|
+
id: 'hatchet',
|
|
1542
|
+
},
|
|
1543
|
+
],
|
|
1544
|
+
drop: {
|
|
1545
|
+
range: [1, 3],
|
|
1546
|
+
},
|
|
1547
|
+
},
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
const CyberiaInstancesStructs = {
|
|
1551
|
+
default: [
|
|
1552
|
+
{
|
|
1553
|
+
type: 'pve',
|
|
1554
|
+
bots: [
|
|
1555
|
+
{
|
|
1556
|
+
behavior: 'quest-passive',
|
|
1557
|
+
displayIds: [{ id: 'ayleen', quantity: [1] }],
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
behavior: 'pet',
|
|
1561
|
+
displayIds: [
|
|
1562
|
+
{
|
|
1563
|
+
id: 'dog',
|
|
1564
|
+
quantity: [1],
|
|
1565
|
+
name: 'floki',
|
|
1566
|
+
title: `ayleen's dog`,
|
|
1567
|
+
parentId: 'ayleen',
|
|
1568
|
+
},
|
|
1569
|
+
],
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
behavior: 'item-quest',
|
|
1573
|
+
displayIds: [
|
|
1574
|
+
{ id: 'bone', quantity: [2] },
|
|
1575
|
+
{ id: 'bone-brown', quantity: [1] },
|
|
1576
|
+
],
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
behavior: 'user-hostile',
|
|
1580
|
+
displayIds: [
|
|
1581
|
+
{ id: 'purple', quantity: [4, 7] },
|
|
1582
|
+
{ id: 'kishins', quantity: [2, 5] },
|
|
1583
|
+
],
|
|
1584
|
+
},
|
|
1585
|
+
// {
|
|
1586
|
+
// behavior: 'generic-people',
|
|
1587
|
+
// displayIds: [
|
|
1588
|
+
// { id: 'gp0', quantity: [1] },
|
|
1589
|
+
// { id: 'gp1', quantity: [1] },
|
|
1590
|
+
// ],
|
|
1591
|
+
// },
|
|
1592
|
+
],
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
type: 'pvp',
|
|
1596
|
+
bots: [
|
|
1597
|
+
{
|
|
1598
|
+
behavior: 'quest-passive',
|
|
1599
|
+
displayIds: [
|
|
1600
|
+
{
|
|
1601
|
+
id: 'agent',
|
|
1602
|
+
quantity: [1],
|
|
1603
|
+
title: `SCP Agent`,
|
|
1604
|
+
name: 'Kinoshita',
|
|
1605
|
+
},
|
|
1606
|
+
{ id: 'punk', quantity: [1] },
|
|
1607
|
+
{ id: 'scp-2040', quantity: [1], title: `SCP`, name: '2040' },
|
|
1608
|
+
],
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
behavior: 'user-hostile',
|
|
1612
|
+
displayIds: [
|
|
1613
|
+
{ id: 'purple', quantity: [4, 7] },
|
|
1614
|
+
{ id: 'kishins', quantity: [2, 5] },
|
|
1615
|
+
],
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
behavior: 'item-quest',
|
|
1619
|
+
displayIds: [
|
|
1620
|
+
{ id: 'bone', quantity: [2] },
|
|
1621
|
+
{ id: 'bone-brown', quantity: [1] },
|
|
1622
|
+
],
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
behavior: 'generic-people',
|
|
1626
|
+
displayIds: [{ id: 'marciano', quantity: [1] }],
|
|
1627
|
+
},
|
|
1628
|
+
],
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
type: 'pvp',
|
|
1632
|
+
bots: [
|
|
1633
|
+
{
|
|
1634
|
+
behavior: 'user-hostile',
|
|
1635
|
+
displayIds: [
|
|
1636
|
+
{ id: 'purple', quantity: [4, 7] },
|
|
1637
|
+
{ id: 'kishins', quantity: [2, 5] },
|
|
1638
|
+
],
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
behavior: 'item-quest',
|
|
1642
|
+
displayIds: [
|
|
1643
|
+
{ id: 'bone', quantity: [2] },
|
|
1644
|
+
{ id: 'bone-brown', quantity: [1] },
|
|
1645
|
+
],
|
|
1646
|
+
},
|
|
1647
|
+
],
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
type: 'pvp',
|
|
1651
|
+
bots: [
|
|
1652
|
+
{
|
|
1653
|
+
behavior: 'user-hostile',
|
|
1654
|
+
displayIds: [
|
|
1655
|
+
{ id: 'purple', quantity: [4, 7] },
|
|
1656
|
+
{ id: 'kishins', quantity: [2, 5] },
|
|
1657
|
+
],
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
behavior: 'item-quest',
|
|
1661
|
+
displayIds: [
|
|
1662
|
+
{ id: 'bone', quantity: [2] },
|
|
1663
|
+
{ id: 'bone-brown', quantity: [1] },
|
|
1664
|
+
],
|
|
1665
|
+
},
|
|
1666
|
+
],
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
type: 'pvp',
|
|
1670
|
+
bots: [
|
|
1671
|
+
{
|
|
1672
|
+
behavior: 'user-hostile',
|
|
1673
|
+
displayIds: [
|
|
1674
|
+
{ id: 'purple', quantity: [4, 7] },
|
|
1675
|
+
{ id: 'kishins', quantity: [2, 5] },
|
|
1676
|
+
],
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
behavior: 'item-quest',
|
|
1680
|
+
displayIds: [
|
|
1681
|
+
{ id: 'bone', quantity: [2] },
|
|
1682
|
+
{ id: 'bone-brown', quantity: [1] },
|
|
1683
|
+
],
|
|
1684
|
+
},
|
|
1685
|
+
],
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
type: 'pvp',
|
|
1689
|
+
bots: [
|
|
1690
|
+
{
|
|
1691
|
+
behavior: 'quest-passive',
|
|
1692
|
+
displayIds: [
|
|
1693
|
+
{
|
|
1694
|
+
id: 'agent',
|
|
1695
|
+
quantity: [1],
|
|
1696
|
+
title: `SCP Agent`,
|
|
1697
|
+
name: 'Kinoshita',
|
|
1698
|
+
},
|
|
1699
|
+
{ id: 'punk', quantity: [1] },
|
|
1700
|
+
{ id: 'scp-2040', quantity: [1], title: `SCP`, name: '2040' },
|
|
1701
|
+
],
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
behavior: 'user-hostile',
|
|
1705
|
+
displayIds: [
|
|
1706
|
+
{ id: 'purple', quantity: [4, 7] },
|
|
1707
|
+
{ id: 'kishins', quantity: [2, 5] },
|
|
1708
|
+
],
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
behavior: 'item-quest',
|
|
1712
|
+
displayIds: [
|
|
1713
|
+
{ id: 'bone', quantity: [2] },
|
|
1714
|
+
{ id: 'bone-brown', quantity: [1] },
|
|
1715
|
+
],
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
behavior: 'generic-people',
|
|
1719
|
+
displayIds: [{ id: 'marciano', quantity: [1] }],
|
|
1720
|
+
},
|
|
1721
|
+
],
|
|
1722
|
+
},
|
|
1723
|
+
],
|
|
1724
|
+
};
|
|
1725
|
+
|
|
1726
|
+
const getK = (value) => {
|
|
1727
|
+
/*
|
|
1728
|
+
|
|
1729
|
+
TOP DEFINITION
|
|
1730
|
+
|
|
1731
|
+
1kk
|
|
1732
|
+
1kk means million where each K represents 000.
|
|
1733
|
+
|
|
1734
|
+
1k = 1 000
|
|
1735
|
+
1kk = 1 000 000
|
|
1736
|
+
1kkk =1 000 000 000
|
|
1737
|
+
|
|
1738
|
+
Mostly used in games.
|
|
1739
|
+
I'm selling this item for 1kk
|
|
1740
|
+
by Aelos03 May 22, 2014
|
|
1741
|
+
|
|
1742
|
+
*/
|
|
1743
|
+
|
|
1744
|
+
const limitK = 1000;
|
|
1745
|
+
const limitKK = 1000000;
|
|
1746
|
+
const limitKKK = 1000000000;
|
|
1747
|
+
if (value < limitK) return value;
|
|
1748
|
+
else if (value >= limitK && value < limitKK) return round10(value / limitK, -2) + 'k';
|
|
1749
|
+
else if (value >= limitKK && value < limitKKK) return round10(value / limitKK, -2) + 'kk';
|
|
1750
|
+
else if (value >= limitKKK) return round10(value / limitKKK, -2) + 'kkk';
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
const CyberiaParams = {
|
|
1754
|
+
EVENT_CALLBACK_TIME: 45,
|
|
1755
|
+
MOVEMENT_TRANSITION_FACTOR: 4,
|
|
1756
|
+
DIM_AMPLITUDE_TRANSPORT_COLLISION: 2,
|
|
1757
|
+
CYBERIA_WORLD_ID: '',
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
const WorldCyberiaType = {
|
|
1761
|
+
width: {
|
|
1762
|
+
worldFaces: [1, 6, 3, 5],
|
|
1763
|
+
spaceFace: [2, 4],
|
|
1764
|
+
},
|
|
1765
|
+
height: {
|
|
1766
|
+
worldFaces: [1, 2, 3, 4],
|
|
1767
|
+
spaceFace: [5, 6],
|
|
1768
|
+
},
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
const LoreCyberia = {
|
|
1772
|
+
meta: [
|
|
1773
|
+
`Year 2120. Earth, once a vibrant blue sphere, now hangs by a thread. A single cataclysmic event
|
|
1774
|
+
irrevocably altered the course of humanity.`,
|
|
1775
|
+
`In 2045, a devastating nuclear disaster rocked the People's Republic of the Orient, triggering a chain
|
|
1776
|
+
reaction of genetic mutations.`,
|
|
1777
|
+
`Later, a leak of clandestine biological experiments gave rise to a plague that transformed much of
|
|
1778
|
+
terrestrial life into hostile creatures.`,
|
|
1779
|
+
`With a third of the planet uninhabitable, humanity was forced to seek a new home beyond the stars. Thus,
|
|
1780
|
+
the so-calledColonists embarked on this mission.`,
|
|
1781
|
+
`However, in the exclusion zones, humans who survived the radiation mutations or genetic experiments were
|
|
1782
|
+
rejected by the colonists. Thus, theseMutagens swore vengeance on
|
|
1783
|
+
their former humanity.`,
|
|
1784
|
+
`Artificial intelligences, through nanotechnology and integrated transistors, created fully
|
|
1785
|
+
Synthetic humanoids. Some were created to serve the colonists, others,
|
|
1786
|
+
however, desire something more.`,
|
|
1787
|
+
`The proliferation of hyperrealities, digital worlds so realistic they were indistinguishable from the
|
|
1788
|
+
real world, allowed neohumans to escape the isolation of a hostile universe, but at the same time they were under
|
|
1789
|
+
the watchful eye of the space cyber powers.`,
|
|
1790
|
+
`Today, humanity lives in ring-shaped space stations, asteroids, and extrasolar planets.`,
|
|
1791
|
+
`Welcome to Cyberia. Explore, find your path, and carve out your space in the new neo-humanity.`,
|
|
1792
|
+
,
|
|
1793
|
+
],
|
|
1794
|
+
factions: {
|
|
1795
|
+
'zenith-empire': `Militaristic and expansionist. They believe in the superiority of their
|
|
1796
|
+
civilization and the need to dominate space.`,
|
|
1797
|
+
'atlas-confederation': `Based on peaceful exploration and cultural exchange. They value diversity and
|
|
1798
|
+
cooperation between species.`,
|
|
1799
|
+
'nova-republic': `Technological and elitist. They believe in the superiority of tech and artificial intelligence and
|
|
1800
|
+
the need to control the universe`,
|
|
1801
|
+
},
|
|
1802
|
+
};
|
|
1803
|
+
|
|
1804
|
+
export {
|
|
1805
|
+
BaseElement,
|
|
1806
|
+
MatrixElement,
|
|
1807
|
+
ModelElement,
|
|
1808
|
+
ComponentElement,
|
|
1809
|
+
getRandomAvailablePositionCyberia,
|
|
1810
|
+
isBiomeCyberiaCollision,
|
|
1811
|
+
isElementCollision,
|
|
1812
|
+
WorldCyberiaLimit,
|
|
1813
|
+
WorldCyberiaType,
|
|
1814
|
+
CyberiaParams,
|
|
1815
|
+
updateMovementDirection,
|
|
1816
|
+
getCollisionMatrixCyberia,
|
|
1817
|
+
CharacterCyberiaStatsType,
|
|
1818
|
+
PositionsComponent,
|
|
1819
|
+
Stat,
|
|
1820
|
+
setElementConsistency,
|
|
1821
|
+
SkillCyberiaData,
|
|
1822
|
+
SkillCyberiaType,
|
|
1823
|
+
QuestComponent,
|
|
1824
|
+
BehaviorElement,
|
|
1825
|
+
getK,
|
|
1826
|
+
DisplayComponent,
|
|
1827
|
+
CyberiaItemsType,
|
|
1828
|
+
ResourcesComponentCyberia,
|
|
1829
|
+
ResourcesComponentTypeCyberia,
|
|
1830
|
+
CyberiaInstancesStructs,
|
|
1831
|
+
LoreCyberia,
|
|
1832
|
+
CyberiaShopStorage,
|
|
1833
|
+
loadDefaultResources,
|
|
1834
|
+
};
|