Deploying to gh-pages from @ LingASDJ/RW-API-Code@a40f877bc6 🚀
This commit is contained in:
parent
f11056b05c
commit
c2151024c9
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
node_modules
|
||||
rustedwarfareapicode/.vitepress/dist/
|
||||
rustedwarfareapicode/.vitepress/cache
|
12
api-dev.html
12
api-dev.html
File diff suppressed because one or more lines are too long
|
@ -1,961 +0,0 @@
|
|||
import{d as dn,K as fe,a2 as fn,u as hn,p as pn,k as mn,a3 as gn,a4 as bn,a5 as In,a6 as yn,a7 as En,a8 as _n,a9 as wn,aa as Tn,ab as vn,ac as An,ad as Sn,ae as Cn,af as Dn,ag as Rn}from"./chunks/framework.621e5595.js";import{t as Mn}from"./chunks/theme.5b0ed540.js";/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*//**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const ft=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},On=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=e[n++];t[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=e[n++],a=e[n++],o=e[n++],c=((i&7)<<18|(s&63)<<12|(a&63)<<6|o&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{const s=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63)}}return t.join("")},ht={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const s=e[i],a=i+1<e.length,o=a?e[i+1]:0,c=i+2<e.length,l=c?e[i+2]:0,d=s>>2,h=(s&3)<<4|o>>4;let g=(o&15)<<2|l>>6,b=l&63;c||(b=64,a||(g=64)),r.push(n[d],n[h],n[g],n[b])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(ft(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):On(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const s=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0;++i;const l=i<e.length?n[e.charAt(i)]:64;++i;const h=i<e.length?n[e.charAt(i)]:64;if(++i,s==null||o==null||l==null||h==null)throw new Nn;const g=s<<2|o>>4;if(r.push(g),l!==64){const b=o<<4&240|l>>2;if(r.push(b),h!==64){const un=l<<6&192|h;r.push(un)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Nn extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Pn=function(e){const t=ft(e);return ht.encodeByteArray(t,!0)},pt=function(e){return Pn(e).replace(/\./g,"")},Bn=function(e){try{return ht.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
|
||||
* @license
|
||||
* Copyright 2022 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function $n(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
|
||||
* @license
|
||||
* Copyright 2022 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const kn=()=>$n().__FIREBASE_DEFAULTS__,Fn=()=>{if(typeof process>"u"||typeof process.env>"u")return;const e={}.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Ln=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&Bn(e[1]);return t&&JSON.parse(t)},Un=()=>{try{return kn()||Fn()||Ln()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},xn=()=>{var e;return(e=Un())===null||e===void 0?void 0:e.config};/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class jn{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}function Vn(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function Te(){try{return typeof indexedDB=="object"}catch{return!1}}function ve(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;t(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){t(n)}})}function mt(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Hn="FirebaseError";class $ extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=Hn,Object.setPrototypeOf(this,$.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,x.prototype.create)}}class x{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},i=`${this.service}/${t}`,s=this.errors[t],a=s?zn(s,r):"Error",o=`${this.serviceName}: ${a} (${i}).`;return new $(i,o,r)}}function zn(e,t){return e.replace(Wn,(n,r)=>{const i=t[r];return i!=null?String(i):`<${r}?>`})}const Wn=/\{\$([^}]+)}/g;function H(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const s=e[i],a=t[i];if(Fe(s)&&Fe(a)){if(!H(s,a))return!1}else if(s!==a)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function Fe(e){return e!==null&&typeof e=="object"}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const qn=1e3,Gn=2,Kn=4*60*60*1e3,Xn=.5;function Le(e,t=qn,n=Gn){const r=t*Math.pow(n,e),i=Math.round(Xn*r*(Math.random()-.5)*2);return Math.min(Kn,r+i)}/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function Ae(e){return e&&e._delegate?e._delegate:e}class T{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const R="[DEFAULT]";/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class Yn{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new jn;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Qn(t))try{this.getOrInitializeService({instanceIdentifier:R})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(t=R){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=R){return this.instances.has(t)}getOptions(t=R){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,a]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(s);r===o&&a.resolve(i)}return i}onInit(t,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(t),this.onInitCallbacks.set(i,s);const a=this.instances.get(i);return a&&t(a,i),()=>{s.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Jn(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=R){return this.component?this.component.multipleInstances?t:R:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Jn(e){return e===R?void 0:e}function Qn(e){return e.instantiationMode==="EAGER"}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class Zn{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new Yn(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/var u;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(u||(u={}));const er={debug:u.DEBUG,verbose:u.VERBOSE,info:u.INFO,warn:u.WARN,error:u.ERROR,silent:u.SILENT},tr=u.INFO,nr={[u.DEBUG]:"log",[u.VERBOSE]:"log",[u.INFO]:"info",[u.WARN]:"warn",[u.ERROR]:"error"},rr=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=nr[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Se{constructor(t){this.name=t,this._logLevel=tr,this._logHandler=rr,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in u))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?er[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,u.DEBUG,...t),this._logHandler(this,u.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,u.VERBOSE,...t),this._logHandler(this,u.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,u.INFO,...t),this._logHandler(this,u.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,u.WARN,...t),this._logHandler(this,u.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,u.ERROR,...t),this._logHandler(this,u.ERROR,...t)}}const ir=(e,t)=>t.some(n=>e instanceof n);let Ue,xe;function sr(){return Ue||(Ue=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ar(){return xe||(xe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const gt=new WeakMap,he=new WeakMap,bt=new WeakMap,J=new WeakMap,Ce=new WeakMap;function or(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(v(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",s),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&>.set(n,e)}).catch(()=>{}),Ce.set(t,e),t}function cr(e){if(he.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});he.set(e,t)}let pe={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return he.get(e);if(t==="objectStoreNames")return e.objectStoreNames||bt.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return v(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function lr(e){pe=e(pe)}function ur(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Q(this),t,...n);return bt.set(r,t.sort?t.sort():[t]),v(r)}:ar().includes(e)?function(...t){return e.apply(Q(this),t),v(gt.get(this))}:function(...t){return v(e.apply(Q(this),t))}}function dr(e){return typeof e=="function"?ur(e):(e instanceof IDBTransaction&&cr(e),ir(e,sr())?new Proxy(e,pe):e)}function v(e){if(e instanceof IDBRequest)return or(e);if(J.has(e))return J.get(e);const t=dr(e);return t!==e&&(J.set(e,t),Ce.set(t,e)),t}const Q=e=>Ce.get(e);function fr(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const a=indexedDB.open(e,t),o=v(a);return r&&a.addEventListener("upgradeneeded",c=>{r(v(a.result),c.oldVersion,c.newVersion,v(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),o.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),o}const hr=["get","getKey","getAll","getAllKeys","count"],pr=["put","add","delete","clear"],Z=new Map;function je(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Z.get(t))return Z.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=pr.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||hr.includes(n)))return;const s=async function(a,...o){const c=this.transaction(a,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(o.shift())),(await Promise.all([l[n](...o),i&&c.done]))[0]};return Z.set(t,s),s}lr(e=>({...e,get:(t,n,r)=>je(t,n)||e.get(t,n,r),has:(t,n)=>!!je(t,n)||e.has(t,n)}));/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class mr{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(gr(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function gr(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const me="@firebase/app",Ve="0.9.9";/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const N=new Se("@firebase/app"),br="@firebase/app-compat",Ir="@firebase/analytics-compat",yr="@firebase/analytics",Er="@firebase/app-check-compat",_r="@firebase/app-check",wr="@firebase/auth",Tr="@firebase/auth-compat",vr="@firebase/database",Ar="@firebase/database-compat",Sr="@firebase/functions",Cr="@firebase/functions-compat",Dr="@firebase/installations",Rr="@firebase/installations-compat",Mr="@firebase/messaging",Or="@firebase/messaging-compat",Nr="@firebase/performance",Pr="@firebase/performance-compat",Br="@firebase/remote-config",$r="@firebase/remote-config-compat",kr="@firebase/storage",Fr="@firebase/storage-compat",Lr="@firebase/firestore",Ur="@firebase/firestore-compat",xr="firebase";/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const ge="[DEFAULT]",jr={[me]:"fire-core",[br]:"fire-core-compat",[yr]:"fire-analytics",[Ir]:"fire-analytics-compat",[_r]:"fire-app-check",[Er]:"fire-app-check-compat",[wr]:"fire-auth",[Tr]:"fire-auth-compat",[vr]:"fire-rtdb",[Ar]:"fire-rtdb-compat",[Sr]:"fire-fn",[Cr]:"fire-fn-compat",[Dr]:"fire-iid",[Rr]:"fire-iid-compat",[Mr]:"fire-fcm",[Or]:"fire-fcm-compat",[Nr]:"fire-perf",[Pr]:"fire-perf-compat",[Br]:"fire-rc",[$r]:"fire-rc-compat",[kr]:"fire-gcs",[Fr]:"fire-gcs-compat",[Lr]:"fire-fst",[Ur]:"fire-fst-compat","fire-js":"fire-js",[xr]:"fire-js-all"};/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const z=new Map,be=new Map;function Vr(e,t){try{e.container.addComponent(t)}catch(n){N.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function D(e){const t=e.name;if(be.has(t))return N.debug(`There were multiple attempts to register component ${t}.`),!1;be.set(t,e);for(const n of z.values())Vr(n,e);return!0}function j(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Hr={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},A=new x("app","Firebase",Hr);/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class zr{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new T("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw A.create("app-deleted",{appName:this._name})}}function It(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:ge,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw A.create("bad-app-name",{appName:String(i)});if(n||(n=xn()),!n)throw A.create("no-options");const s=z.get(i);if(s){if(H(n,s.options)&&H(r,s.config))return s;throw A.create("duplicate-app",{appName:i})}const a=new Zn(i);for(const c of be.values())a.addComponent(c);const o=new zr(n,r,a);return z.set(i,o),o}function yt(e=ge){const t=z.get(e);if(!t&&e===ge)return It();if(!t)throw A.create("no-app",{appName:e});return t}function _(e,t,n){var r;let i=(r=jr[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const s=i.match(/\s|\//),a=t.match(/\s|\//);if(s||a){const o=[`Unable to register library "${i}" with version "${t}":`];s&&o.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&o.push("and"),a&&o.push(`version name "${t}" contains illegal characters (whitespace or "/")`),N.warn(o.join(" "));return}D(new T(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Wr="firebase-heartbeat-database",qr=1,U="firebase-heartbeat-store";let ee=null;function Et(){return ee||(ee=fr(Wr,qr,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(U)}}}).catch(e=>{throw A.create("idb-open",{originalErrorMessage:e.message})})),ee}async function Gr(e){try{return(await Et()).transaction(U).objectStore(U).get(_t(e))}catch(t){if(t instanceof $)N.warn(t.message);else{const n=A.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});N.warn(n.message)}}}async function He(e,t){try{const r=(await Et()).transaction(U,"readwrite");return await r.objectStore(U).put(t,_t(e)),r.done}catch(n){if(n instanceof $)N.warn(n.message);else{const r=A.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});N.warn(r.message)}}}function _t(e){return`${e.name}!${e.options.appId}`}/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Kr=1024,Xr=30*24*60*60*1e3;class Yr{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Qr(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=ze();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const s=new Date(i.date).valueOf();return Date.now()-s<=Xr}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const t=ze(),{heartbeatsToSend:n,unsentEntries:r}=Jr(this._heartbeatsCache.heartbeats),i=pt(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function ze(){return new Date().toISOString().substring(0,10)}function Jr(e,t=Kr){const n=[];let r=e.slice();for(const i of e){const s=n.find(a=>a.agent===i.agent);if(s){if(s.dates.push(i.date),We(n)>t){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),We(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class Qr{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Te()?ve().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await Gr(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return He(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return He(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return}}function We(e){return pt(JSON.stringify({version:2,heartbeats:e})).length}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function Zr(e){D(new T("platform-logger",t=>new mr(t),"PRIVATE")),D(new T("heartbeat",t=>new Yr(t),"PRIVATE")),_(me,Ve,e),_(me,Ve,"esm2017"),_("fire-js","")}Zr("");var ei="firebase",ti="9.21.0";/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/_(ei,ti,"app");const ni=(e,t)=>t.some(n=>e instanceof n);let qe,Ge;function ri(){return qe||(qe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ii(){return Ge||(Ge=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const wt=new WeakMap,Ie=new WeakMap,Tt=new WeakMap,te=new WeakMap,De=new WeakMap;function si(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(S(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",s),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&wt.set(n,e)}).catch(()=>{}),De.set(t,e),t}function ai(e){if(Ie.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});Ie.set(e,t)}let ye={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ie.get(e);if(t==="objectStoreNames")return e.objectStoreNames||Tt.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return S(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function oi(e){ye=e(ye)}function ci(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(ne(this),t,...n);return Tt.set(r,t.sort?t.sort():[t]),S(r)}:ii().includes(e)?function(...t){return e.apply(ne(this),t),S(wt.get(this))}:function(...t){return S(e.apply(ne(this),t))}}function li(e){return typeof e=="function"?ci(e):(e instanceof IDBTransaction&&ai(e),ni(e,ri())?new Proxy(e,ye):e)}function S(e){if(e instanceof IDBRequest)return si(e);if(te.has(e))return te.get(e);const t=li(e);return t!==e&&(te.set(e,t),De.set(t,e)),t}const ne=e=>De.get(e);function ui(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const a=indexedDB.open(e,t),o=S(a);return r&&a.addEventListener("upgradeneeded",c=>{r(S(a.result),c.oldVersion,c.newVersion,S(a.transaction))}),n&&a.addEventListener("blocked",()=>n()),o.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",()=>i())}).catch(()=>{}),o}const di=["get","getKey","getAll","getAllKeys","count"],fi=["put","add","delete","clear"],re=new Map;function Ke(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(re.get(t))return re.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=fi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||di.includes(n)))return;const s=async function(a,...o){const c=this.transaction(a,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(o.shift())),(await Promise.all([l[n](...o),i&&c.done]))[0]};return re.set(t,s),s}oi(e=>({...e,get:(t,n,r)=>Ke(t,n)||e.get(t,n,r),has:(t,n)=>!!Ke(t,n)||e.has(t,n)}));const vt="@firebase/installations",Re="0.6.4";/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const At=1e4,St=`w:${Re}`,Ct="FIS_v2",hi="https://firebaseinstallations.googleapis.com/v1",pi=60*60*1e3,mi="installations",gi="Installations";/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const bi={["missing-app-config-values"]:'Missing App configuration value: "{$valueName}"',["not-registered"]:"Firebase Installation is not registered.",["installation-not-found"]:"Firebase Installation not found.",["request-failed"]:'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',["app-offline"]:"Could not process request. Application offline.",["delete-pending-registration"]:"Can't delete installation while there is a pending registration request."},P=new x(mi,gi,bi);function Dt(e){return e instanceof $&&e.code.includes("request-failed")}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function Rt({projectId:e}){return`${hi}/projects/${e}/installations`}function Mt(e){return{token:e.token,requestStatus:2,expiresIn:yi(e.expiresIn),creationTime:Date.now()}}async function Ot(e,t){const r=(await t.json()).error;return P.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function Nt({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Ii(e,{refreshToken:t}){const n=Nt(e);return n.append("Authorization",Ei(t)),n}async function Pt(e){const t=await e();return t.status>=500&&t.status<600?e():t}function yi(e){return Number(e.replace("s","000"))}function Ei(e){return`${Ct} ${e}`}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function _i({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Rt(e),i=Nt(e),s=t.getImmediate({optional:!0});if(s){const l=await s.getHeartbeatsHeader();l&&i.append("x-firebase-client",l)}const a={fid:n,authVersion:Ct,appId:e.appId,sdkVersion:St},o={method:"POST",headers:i,body:JSON.stringify(a)},c=await Pt(()=>fetch(r,o));if(c.ok){const l=await c.json();return{fid:l.fid||n,registrationStatus:2,refreshToken:l.refreshToken,authToken:Mt(l.authToken)}}else throw await Ot("Create Installation",c)}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function Bt(e){return new Promise(t=>{setTimeout(t,e)})}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function wi(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Ti=/^[cdef][\w-]{21}$/,Ee="";function vi(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const n=Ai(e);return Ti.test(n)?n:Ee}catch{return Ee}}function Ai(e){return wi(e).substr(0,22)}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function K(e){return`${e.appName}!${e.appId}`}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const $t=new Map;function kt(e,t){const n=K(e);Ft(n,t),Si(n,t)}function Ft(e,t){const n=$t.get(e);if(n)for(const r of n)r(t)}function Si(e,t){const n=Ci();n&&n.postMessage({key:e,fid:t}),Di()}let M=null;function Ci(){return!M&&"BroadcastChannel"in self&&(M=new BroadcastChannel("[Firebase] FID Change"),M.onmessage=e=>{Ft(e.data.key,e.data.fid)}),M}function Di(){$t.size===0&&M&&(M.close(),M=null)}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Ri="firebase-installations-database",Mi=1,B="firebase-installations-store";let ie=null;function Me(){return ie||(ie=ui(Ri,Mi,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(B)}}})),ie}async function W(e,t){const n=K(e),i=(await Me()).transaction(B,"readwrite"),s=i.objectStore(B),a=await s.get(n);return await s.put(t,n),await i.done,(!a||a.fid!==t.fid)&&kt(e,t.fid),t}async function Lt(e){const t=K(e),r=(await Me()).transaction(B,"readwrite");await r.objectStore(B).delete(t),await r.done}async function X(e,t){const n=K(e),i=(await Me()).transaction(B,"readwrite"),s=i.objectStore(B),a=await s.get(n),o=t(a);return o===void 0?await s.delete(n):await s.put(o,n),await i.done,o&&(!a||a.fid!==o.fid)&&kt(e,o.fid),o}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function Oe(e){let t;const n=await X(e.appConfig,r=>{const i=Oi(r),s=Ni(e,i);return t=s.registrationPromise,s.installationEntry});return n.fid===Ee?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}function Oi(e){const t=e||{fid:vi(),registrationStatus:0};return Ut(t)}function Ni(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(P.create("app-offline"));return{installationEntry:t,registrationPromise:i}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=Pi(e,n);return{installationEntry:n,registrationPromise:r}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:Bi(e)}:{installationEntry:t}}async function Pi(e,t){try{const n=await _i(e,t);return W(e.appConfig,n)}catch(n){throw Dt(n)&&n.customData.serverCode===409?await Lt(e.appConfig):await W(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}async function Bi(e){let t=await Xe(e.appConfig);for(;t.registrationStatus===1;)await Bt(100),t=await Xe(e.appConfig);if(t.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await Oe(e);return r||n}return t}function Xe(e){return X(e,t=>{if(!t)throw P.create("installation-not-found");return Ut(t)})}function Ut(e){return $i(e)?{fid:e.fid,registrationStatus:0}:e}function $i(e){return e.registrationStatus===1&&e.registrationTime+At<Date.now()}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function ki({appConfig:e,heartbeatServiceProvider:t},n){const r=Fi(e,n),i=Ii(e,n),s=t.getImmediate({optional:!0});if(s){const l=await s.getHeartbeatsHeader();l&&i.append("x-firebase-client",l)}const a={installation:{sdkVersion:St,appId:e.appId}},o={method:"POST",headers:i,body:JSON.stringify(a)},c=await Pt(()=>fetch(r,o));if(c.ok){const l=await c.json();return Mt(l)}else throw await Ot("Generate Auth Token",c)}function Fi(e,{fid:t}){return`${Rt(e)}/${t}/authTokens:generate`}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function Ne(e,t=!1){let n;const r=await X(e.appConfig,s=>{if(!xt(s))throw P.create("not-registered");const a=s.authToken;if(!t&&xi(a))return s;if(a.requestStatus===1)return n=Li(e,t),s;{if(!navigator.onLine)throw P.create("app-offline");const o=Vi(s);return n=Ui(e,o),o}});return n?await n:r.authToken}async function Li(e,t){let n=await Ye(e.appConfig);for(;n.authToken.requestStatus===1;)await Bt(100),n=await Ye(e.appConfig);const r=n.authToken;return r.requestStatus===0?Ne(e,t):r}function Ye(e){return X(e,t=>{if(!xt(t))throw P.create("not-registered");const n=t.authToken;return Hi(n)?Object.assign(Object.assign({},t),{authToken:{requestStatus:0}}):t})}async function Ui(e,t){try{const n=await ki(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await W(e.appConfig,r),n}catch(n){if(Dt(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await Lt(e.appConfig);else{const r=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await W(e.appConfig,r)}throw n}}function xt(e){return e!==void 0&&e.registrationStatus===2}function xi(e){return e.requestStatus===2&&!ji(e)}function ji(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+pi}function Vi(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function Hi(e){return e.requestStatus===1&&e.requestTime+At<Date.now()}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function zi(e){const t=e,{installationEntry:n,registrationPromise:r}=await Oe(t);return r?r.catch(console.error):Ne(t).catch(console.error),n.fid}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function Wi(e,t=!1){const n=e;return await qi(n),(await Ne(n,t)).token}async function qi(e){const{registrationPromise:t}=await Oe(e);t&&await t}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function Gi(e){if(!e||!e.options)throw se("App Configuration");if(!e.name)throw se("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw se(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function se(e){return P.create("missing-app-config-values",{valueName:e})}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const jt="installations",Ki="installations-internal",Xi=e=>{const t=e.getProvider("app").getImmediate(),n=Gi(t),r=j(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},Yi=e=>{const t=e.getProvider("app").getImmediate(),n=j(t,jt).getImmediate();return{getId:()=>zi(n),getToken:i=>Wi(n,i)}};function Ji(){D(new T(jt,Xi,"PUBLIC")),D(new T(Ki,Yi,"PRIVATE"))}Ji();_(vt,Re);_(vt,Re,"esm2017");/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const q="analytics",Qi="firebase_id",Zi="origin",es=60*1e3,ts="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Pe="https://www.googletagmanager.com/gtag/js";/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const m=new Se("@firebase/analytics");/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const ns={["already-exists"]:"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.",["already-initialized"]:"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.",["already-initialized-settings"]:"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",["interop-component-reg-failed"]:"Firebase Analytics Interop Component failed to instantiate: {$reason}",["invalid-analytics-context"]:"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",["indexeddb-unavailable"]:"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",["fetch-throttle"]:"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",["config-fetch-failed"]:"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",["no-api-key"]:'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',["no-app-id"]:'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',["no-client-id"]:'The "client_id" field is empty.',["invalid-gtag-resource"]:"Trusted Types detected an invalid gtag resource: {$gtagURL}."},y=new x("analytics","Analytics",ns);/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function rs(e){if(!e.startsWith(Pe)){const t=y.create("invalid-gtag-resource",{gtagURL:e});return m.warn(t.message),""}return e}function Vt(e){return Promise.all(e.map(t=>t.catch(n=>n)))}function is(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}function ss(e,t){const n=is("firebase-js-sdk-policy",{createScriptURL:rs}),r=document.createElement("script"),i=`${Pe}?l=${e}&id=${t}`;r.src=n?n==null?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function as(e){let t=[];return Array.isArray(window[e])?t=window[e]:window[e]=t,t}async function os(e,t,n,r,i,s){const a=r[i];try{if(a)await t[a];else{const c=(await Vt(n)).find(l=>l.measurementId===i);c&&await t[c.appId]}}catch(o){m.error(o)}e("config",i,s)}async function cs(e,t,n,r,i){try{let s=[];if(i&&i.send_to){let a=i.send_to;Array.isArray(a)||(a=[a]);const o=await Vt(n);for(const c of a){const l=o.find(h=>h.measurementId===c),d=l&&t[l.appId];if(d)s.push(d);else{s=[];break}}}s.length===0&&(s=Object.values(t)),await Promise.all(s),e("event",r,i||{})}catch(s){m.error(s)}}function ls(e,t,n,r){async function i(s,...a){try{if(s==="event"){const[o,c]=a;await cs(e,t,n,o,c)}else if(s==="config"){const[o,c]=a;await os(e,t,n,r,o,c)}else if(s==="consent"){const[o]=a;e("consent","update",o)}else if(s==="get"){const[o,c,l]=a;e("get",o,c,l)}else if(s==="set"){const[o]=a;e("set",o)}else e(s,...a)}catch(o){m.error(o)}}return i}function us(e,t,n,r,i){let s=function(...a){window[r].push(arguments)};return window[i]&&typeof window[i]=="function"&&(s=window[i]),window[i]=ls(s,e,t,n),{gtagCore:s,wrappedGtag:window[i]}}function ds(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(Pe)&&n.src.includes(e))return n;return null}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const fs=30,hs=1e3;class ps{constructor(t={},n=hs){this.throttleMetadata=t,this.intervalMillis=n}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,n){this.throttleMetadata[t]=n}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}}const Ht=new ps;function ms(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function gs(e){var t;const{appId:n,apiKey:r}=e,i={method:"GET",headers:ms(r)},s=ts.replace("{app-id}",n),a=await fetch(s,i);if(a.status!==200&&a.status!==304){let o="";try{const c=await a.json();!((t=c.error)===null||t===void 0)&&t.message&&(o=c.error.message)}catch{}throw y.create("config-fetch-failed",{httpStatus:a.status,responseMessage:o})}return a.json()}async function bs(e,t=Ht,n){const{appId:r,apiKey:i,measurementId:s}=e.options;if(!r)throw y.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw y.create("no-api-key")}const a=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},o=new Es;return setTimeout(async()=>{o.abort()},n!==void 0?n:es),zt({appId:r,apiKey:i,measurementId:s},a,o,t)}async function zt(e,{throttleEndTimeMillis:t,backoffCount:n},r,i=Ht){var s;const{appId:a,measurementId:o}=e;try{await Is(r,t)}catch(c){if(o)return m.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${c==null?void 0:c.message}]`),{appId:a,measurementId:o};throw c}try{const c=await gs(e);return i.deleteThrottleMetadata(a),c}catch(c){const l=c;if(!ys(l)){if(i.deleteThrottleMetadata(a),o)return m.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${l==null?void 0:l.message}]`),{appId:a,measurementId:o};throw c}const d=Number((s=l==null?void 0:l.customData)===null||s===void 0?void 0:s.httpStatus)===503?Le(n,i.intervalMillis,fs):Le(n,i.intervalMillis),h={throttleEndTimeMillis:Date.now()+d,backoffCount:n+1};return i.setThrottleMetadata(a,h),m.debug(`Calling attemptFetch again in ${d} millis`),zt(e,h,r,i)}}function Is(e,t){return new Promise((n,r)=>{const i=Math.max(t-Date.now(),0),s=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(s),r(y.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function ys(e){if(!(e instanceof $)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}class Es{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function _s(e,t,n,r,i){if(i&&i.global){e("event",n,r);return}else{const s=await t,a=Object.assign(Object.assign({},r),{send_to:s});e("event",n,a)}}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/async function ws(){if(Te())try{await ve()}catch(e){return m.warn(y.create("indexeddb-unavailable",{errorInfo:e==null?void 0:e.toString()}).message),!1}else return m.warn(y.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function Ts(e,t,n,r,i,s,a){var o;const c=bs(e);c.then(b=>{n[b.measurementId]=b.appId,e.options.measurementId&&b.measurementId!==e.options.measurementId&&m.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${b.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(b=>m.error(b)),t.push(c);const l=ws().then(b=>{if(b)return r.getId()}),[d,h]=await Promise.all([c,l]);ds(s)||ss(s,d.measurementId),i("js",new Date);const g=(o=a==null?void 0:a.config)!==null&&o!==void 0?o:{};return g[Zi]="firebase",g.update=!0,h!=null&&(g[Qi]=h),i("config",d.measurementId,g),d.measurementId}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class vs{constructor(t){this.app=t}_delete(){return delete L[this.app.options.appId],Promise.resolve()}}let L={},Je=[];const Qe={};let ae="dataLayer",As="gtag",Ze,Wt,et=!1;function Ss(){const e=[];if(Vn()&&e.push("This is a browser extension environment."),mt()||e.push("Cookies are not available."),e.length>0){const t=e.map((r,i)=>`(${i+1}) ${r}`).join(" "),n=y.create("invalid-analytics-context",{errorInfo:t});m.warn(n.message)}}function Cs(e,t,n){Ss();const r=e.options.appId;if(!r)throw y.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)m.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw y.create("no-api-key");if(L[r]!=null)throw y.create("already-exists",{id:r});if(!et){as(ae);const{wrappedGtag:s,gtagCore:a}=us(L,Je,Qe,ae,As);Wt=s,Ze=a,et=!0}return L[r]=Ts(e,Je,Qe,t,Ze,ae,n),new vs(e)}function Ds(e=yt()){e=Ae(e);const t=j(e,q);return t.isInitialized()?t.getImmediate():Rs(e)}function Rs(e,t={}){const n=j(e,q);if(n.isInitialized()){const i=n.getImmediate();if(H(t,n.getOptions()))return i;throw y.create("already-initialized")}return n.initialize({options:t})}function Ms(e,t,n,r){e=Ae(e),_s(Wt,L[e.app.options.appId],t,n,r).catch(i=>m.error(i))}const tt="@firebase/analytics",nt="0.10.0";function Os(){D(new T(q,(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("installations-internal").getImmediate();return Cs(r,i,n)},"PUBLIC")),D(new T("analytics-internal",e,"PRIVATE")),_(tt,nt),_(tt,nt,"esm2017");function e(t){try{const n=t.getProvider(q).getImmediate();return{logEvent:(r,i,s)=>Ms(n,r,i,s)}}catch(n){throw y.create("interop-component-reg-failed",{reason:n})}}}Os();const rt="@firebase/performance",_e="0.6.4";/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const qt=_e,Ns="FB-PERF-TRACE-START",Ps="FB-PERF-TRACE-STOP",we="FB-PERF-TRACE-MEASURE",Gt="_wt_",Kt="_fp",Xt="_fcp",Yt="_fid",Jt="@firebase/performance/config",Qt="@firebase/performance/configexpire",Bs="performance",Zt="Performance";/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const $s={["trace started"]:"Trace {$traceName} was started before.",["trace stopped"]:"Trace {$traceName} is not running.",["nonpositive trace startTime"]:"Trace {$traceName} startTime should be positive.",["nonpositive trace duration"]:"Trace {$traceName} duration should be positive.",["no window"]:"Window is not available.",["no app id"]:"App id is not available.",["no project id"]:"Project id is not available.",["no api key"]:"Api key is not available.",["invalid cc log"]:"Attempted to queue invalid cc event",["FB not default"]:"Performance can only start when Firebase app instance is the default one.",["RC response not ok"]:"RC response is not ok",["invalid attribute name"]:"Attribute name {$attributeName} is invalid.",["invalid attribute value"]:"Attribute value {$attributeValue} is invalid.",["invalid custom metric name"]:"Custom metric name {$customMetricName} is invalid",["invalid String merger input"]:"Input for String merger is invalid, contact support team to resolve.",["already initialized"]:"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."},p=new x(Bs,Zt,$s);/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const w=new Se(Zt);w.logLevel=u.INFO;/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/let oe,en;class f{constructor(t){if(this.window=t,!t)throw p.create("no window");this.performance=t.performance,this.PerformanceObserver=t.PerformanceObserver,this.windowLocation=t.location,this.navigator=t.navigator,this.document=t.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=t.localStorage),t.perfMetrics&&t.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=t.perfMetrics.onFirstInputDelay)}getUrl(){return this.windowLocation.href.split("?")[0]}mark(t){!this.performance||!this.performance.mark||this.performance.mark(t)}measure(t,n,r){!this.performance||!this.performance.measure||this.performance.measure(t,n,r)}getEntriesByType(t){return!this.performance||!this.performance.getEntriesByType?[]:this.performance.getEntriesByType(t)}getEntriesByName(t){return!this.performance||!this.performance.getEntriesByName?[]:this.performance.getEntriesByName(t)}getTimeOrigin(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)}requiredApisAvailable(){return!fetch||!Promise||!mt()?(w.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1):Te()?!0:(w.info("IndexedDB is not supported by current browswer"),!1)}setupObserver(t,n){if(!this.PerformanceObserver)return;new this.PerformanceObserver(i=>{for(const s of i.getEntries())n(s)}).observe({entryTypes:[t]})}static getInstance(){return oe===void 0&&(oe=new f(en)),oe}}function ks(e){en=e}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/let tn;function Fs(e){const t=e.getId();return t.then(n=>{tn=n}),t}function Be(){return tn}function Ls(e){const t=e.getToken();return t.then(n=>{}),t}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function it(e,t){const n=e.length-t.length;if(n<0||n>1)throw p.create("invalid String merger input");const r=[];for(let i=0;i<e.length;i++)r.push(e.charAt(i)),t.length>i&&r.push(t.charAt(i));return r.join("")}/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/let ce;class I{constructor(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=it("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=it("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}getFlTransportFullUrl(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)}static getInstance(){return ce===void 0&&(ce=new I),ce}}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/var k;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"})(k||(k={}));const Us=["firebase_","google_","ga_"],xs=new RegExp("^[a-zA-Z]\\w*$"),js=40,Vs=100;function Hs(){const e=f.getInstance().navigator;return e!=null&&e.serviceWorker?e.serviceWorker.controller?2:3:1}function nn(){switch(f.getInstance().document.visibilityState){case"visible":return k.VISIBLE;case"hidden":return k.HIDDEN;default:return k.UNKNOWN}}function zs(){const t=f.getInstance().navigator.connection;switch(t&&t.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}function Ws(e){return e.length===0||e.length>js?!1:!Us.some(n=>e.startsWith(n))&&!!e.match(xs)}function qs(e){return e.length!==0&&e.length<=Vs}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function rn(e){var t;const n=(t=e.options)===null||t===void 0?void 0:t.appId;if(!n)throw p.create("no app id");return n}function Gs(e){var t;const n=(t=e.options)===null||t===void 0?void 0:t.projectId;if(!n)throw p.create("no project id");return n}function Ks(e){var t;const n=(t=e.options)===null||t===void 0?void 0:t.apiKey;if(!n)throw p.create("no api key");return n}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Xs="0.0.1",E={loggingEnabled:!0},Ys="FIREBASE_INSTALLATIONS_AUTH";function Js(e,t){const n=Qs();return n?(st(n),Promise.resolve()):ta(e,t).then(st).then(r=>Zs(r),()=>{})}function Qs(){const e=f.getInstance().localStorage;if(!e)return;const t=e.getItem(Qt);if(!t||!na(t))return;const n=e.getItem(Jt);if(n)try{return JSON.parse(n)}catch{return}}function Zs(e){const t=f.getInstance().localStorage;!e||!t||(t.setItem(Jt,JSON.stringify(e)),t.setItem(Qt,String(Date.now()+I.getInstance().configTimeToLive*60*60*1e3)))}const ea="Could not fetch config, will use default configs";function ta(e,t){return Ls(e.installations).then(n=>{const r=Gs(e.app),i=Ks(e.app),s=`https://firebaseremoteconfig.googleapis.com/v1/projects/${r}/namespaces/fireperf:fetch?key=${i}`,a=new Request(s,{method:"POST",headers:{Authorization:`${Ys} ${n}`},body:JSON.stringify({app_instance_id:t,app_instance_id_token:n,app_id:rn(e.app),app_version:qt,sdk_version:Xs})});return fetch(a).then(o=>{if(o.ok)return o.json();throw p.create("RC response not ok")})}).catch(()=>{w.info(ea)})}function st(e){if(!e)return e;const t=I.getInstance(),n=e.entries||{};return n.fpr_enabled!==void 0?t.loggingEnabled=String(n.fpr_enabled)==="true":t.loggingEnabled=E.loggingEnabled,n.fpr_log_source?t.logSource=Number(n.fpr_log_source):E.logSource&&(t.logSource=E.logSource),n.fpr_log_endpoint_url?t.logEndPointUrl=n.fpr_log_endpoint_url:E.logEndPointUrl&&(t.logEndPointUrl=E.logEndPointUrl),n.fpr_log_transport_key?t.transportKey=n.fpr_log_transport_key:E.transportKey&&(t.transportKey=E.transportKey),n.fpr_vc_network_request_sampling_rate!==void 0?t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate):E.networkRequestsSamplingRate!==void 0&&(t.networkRequestsSamplingRate=E.networkRequestsSamplingRate),n.fpr_vc_trace_sampling_rate!==void 0?t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate):E.tracesSamplingRate!==void 0&&(t.tracesSamplingRate=E.tracesSamplingRate),t.logTraceAfterSampling=at(t.tracesSamplingRate),t.logNetworkAfterSampling=at(t.networkRequestsSamplingRate),e}function na(e){return Number(e)>Date.now()}function at(e){return Math.random()<=e}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/let $e=1,le;function sn(e){return $e=2,le=le||ia(e),le}function ra(){return $e===3}function ia(e){return sa().then(()=>Fs(e.installations)).then(t=>Js(e,t)).then(()=>ot(),()=>ot())}function sa(){const e=f.getInstance().document;return new Promise(t=>{if(e&&e.readyState!=="complete"){const n=()=>{e.readyState==="complete"&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()})}function ot(){$e=3}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const ke=10*1e3,aa=5.5*1e3,an=3,oa=1e3;let G=an,C=[],ct=!1;function ca(){ct||(Y(aa),ct=!0)}function Y(e){setTimeout(()=>{if(G!==0){if(!C.length)return Y(ke);la()}},e)}function la(){const e=C.splice(0,oa),t=e.map(r=>({source_extension_json_proto3:r.message,event_time_ms:String(r.eventTime)})),n={request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:I.getInstance().logSource,log_event:t};ua(n,e).catch(()=>{C=[...e,...C],G--,w.info(`Tries left: ${G}.`),Y(ke)})}function ua(e,t){return da(e).then(n=>(n.ok||w.info("Call to Firebase backend failed."),n.json())).then(n=>{const r=Number(n.nextRequestWaitMillis);let i=ke;isNaN(r)||(i=Math.max(r,i));const s=n.logResponseDetails;Array.isArray(s)&&s.length>0&&s[0].responseAction==="RETRY_REQUEST_LATER"&&(C=[...t,...C],w.info("Retry transport request later.")),G=an,Y(i)})}function da(e){const t=I.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}function fa(e){if(!e.eventTime||!e.message)throw p.create("invalid cc log");C=[...C,e]}function ha(e){return(...t)=>{const n=e(...t);fa({message:n,eventTime:Date.now()})}}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/let ue;function on(e,t){ue||(ue=ha(ma)),ue(e,t)}function V(e){const t=I.getInstance();!t.instrumentationEnabled&&e.isAuto||!t.dataCollectionEnabled&&!e.isAuto||f.getInstance().requiredApisAvailable()&&(e.isAuto&&nn()!==k.VISIBLE||(ra()?de(e):sn(e.performanceController).then(()=>de(e),()=>de(e))))}function de(e){if(!Be())return;const t=I.getInstance();!t.loggingEnabled||!t.logTraceAfterSampling||setTimeout(()=>on(e,1),0)}function pa(e){const t=I.getInstance();if(!t.instrumentationEnabled)return;const n=e.url,r=t.logEndPointUrl.split("?")[0],i=t.flTransportEndpointUrl.split("?")[0];n===r||n===i||!t.loggingEnabled||!t.logNetworkAfterSampling||setTimeout(()=>on(e,0),0)}function ma(e,t){return t===0?ga(e):ba(e)}function ga(e){const t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:cn(e.performanceController.app),network_request_metric:t};return JSON.stringify(n)}function ba(e){const t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};Object.keys(e.counters).length!==0&&(t.counters=e.counters);const n=e.getAttributes();Object.keys(n).length!==0&&(t.custom_attributes=n);const r={application_info:cn(e.performanceController.app),trace_metric:t};return JSON.stringify(r)}function cn(e){return{google_app_id:rn(e),app_instance_id:Be(),web_app_info:{sdk_version:qt,page_url:f.getInstance().getUrl(),service_worker_status:Hs(),visibility_state:nn(),effective_connection_type:zs()},application_process_state:0}}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Ia=100,ya="_",Ea=[Kt,Xt,Yt];function _a(e,t){return e.length===0||e.length>Ia?!1:t&&t.startsWith(Gt)&&Ea.indexOf(e)>-1||!e.startsWith(ya)}function wa(e){const t=Math.floor(e);return t<e&&w.info(`Metric value should be an Integer, setting the value as : ${t}.`),t}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class O{constructor(t,n,r=!1,i){this.performanceController=t,this.name=n,this.isAuto=r,this.state=1,this.customAttributes={},this.counters={},this.api=f.getInstance(),this.randomId=Math.floor(Math.random()*1e6),this.isAuto||(this.traceStartMark=`${Ns}-${this.randomId}-${this.name}`,this.traceStopMark=`${Ps}-${this.randomId}-${this.name}`,this.traceMeasure=i||`${we}-${this.randomId}-${this.name}`,i&&this.calculateTraceMetrics())}start(){if(this.state!==1)throw p.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(this.state!==2)throw p.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),V(this)}record(t,n,r){if(t<=0)throw p.create("nonpositive trace startTime",{traceName:this.name});if(n<=0)throw p.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(n*1e3),this.startTimeUs=Math.floor(t*1e3),r&&r.attributes&&(this.customAttributes=Object.assign({},r.attributes)),r&&r.metrics)for(const i of Object.keys(r.metrics))isNaN(Number(r.metrics[i]))||(this.counters[i]=Math.floor(Number(r.metrics[i])));V(this)}incrementMetric(t,n=1){this.counters[t]===void 0?this.putMetric(t,n):this.putMetric(t,this.counters[t]+n)}putMetric(t,n){if(_a(t,this.name))this.counters[t]=wa(n??0);else throw p.create("invalid custom metric name",{customMetricName:t})}getMetric(t){return this.counters[t]||0}putAttribute(t,n){const r=Ws(t),i=qs(n);if(r&&i){this.customAttributes[t]=n;return}if(!r)throw p.create("invalid attribute name",{attributeName:t});if(!i)throw p.create("invalid attribute value",{attributeValue:n})}getAttribute(t){return this.customAttributes[t]}removeAttribute(t){this.customAttributes[t]!==void 0&&delete this.customAttributes[t]}getAttributes(){return Object.assign({},this.customAttributes)}setStartTime(t){this.startTimeUs=t}setDuration(t){this.durationUs=t}calculateTraceMetrics(){const t=this.api.getEntriesByName(this.traceMeasure),n=t&&t[0];n&&(this.durationUs=Math.floor(n.duration*1e3),this.startTimeUs=Math.floor((n.startTime+this.api.getTimeOrigin())*1e3))}static createOobTrace(t,n,r,i){const s=f.getInstance().getUrl();if(!s)return;const a=new O(t,Gt+s,!0),o=Math.floor(f.getInstance().getTimeOrigin()*1e3);a.setStartTime(o),n&&n[0]&&(a.setDuration(Math.floor(n[0].duration*1e3)),a.putMetric("domInteractive",Math.floor(n[0].domInteractive*1e3)),a.putMetric("domContentLoadedEventEnd",Math.floor(n[0].domContentLoadedEventEnd*1e3)),a.putMetric("loadEventEnd",Math.floor(n[0].loadEventEnd*1e3)));const c="first-paint",l="first-contentful-paint";if(r){const d=r.find(g=>g.name===c);d&&d.startTime&&a.putMetric(Kt,Math.floor(d.startTime*1e3));const h=r.find(g=>g.name===l);h&&h.startTime&&a.putMetric(Xt,Math.floor(h.startTime*1e3)),i&&a.putMetric(Yt,Math.floor(i*1e3))}V(a)}static createUserTimingTrace(t,n){const r=new O(t,n,!1,n);V(r)}}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/function lt(e,t){const n=t;if(!n||n.responseStart===void 0)return;const r=f.getInstance().getTimeOrigin(),i=Math.floor((n.startTime+r)*1e3),s=n.responseStart?Math.floor((n.responseStart-n.startTime)*1e3):void 0,a=Math.floor((n.responseEnd-n.startTime)*1e3),o=n.name&&n.name.split("?")[0],c={performanceController:e,url:o,responsePayloadBytes:n.transferSize,startTimeUs:i,timeToResponseInitiatedUs:s,timeToResponseCompletedUs:a};pa(c)}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/const Ta=5e3;function ut(e){Be()&&(setTimeout(()=>Aa(e),0),setTimeout(()=>va(e),0),setTimeout(()=>Sa(e),0))}function va(e){const t=f.getInstance(),n=t.getEntriesByType("resource");for(const r of n)lt(e,r);t.setupObserver("resource",r=>lt(e,r))}function Aa(e){const t=f.getInstance(),n=t.getEntriesByType("navigation"),r=t.getEntriesByType("paint");if(t.onFirstInputDelay){let i=setTimeout(()=>{O.createOobTrace(e,n,r),i=void 0},Ta);t.onFirstInputDelay(s=>{i&&(clearTimeout(i),O.createOobTrace(e,n,r,s))})}else O.createOobTrace(e,n,r)}function Sa(e){const t=f.getInstance(),n=t.getEntriesByType("measure");for(const r of n)dt(e,r);t.setupObserver("measure",r=>dt(e,r))}function dt(e,t){const n=t.name;n.substring(0,we.length)!==we&&O.createUserTimingTrace(e,n)}/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/class Ca{constructor(t,n){this.app=t,this.installations=n,this.initialized=!1}_init(t){this.initialized||((t==null?void 0:t.dataCollectionEnabled)!==void 0&&(this.dataCollectionEnabled=t.dataCollectionEnabled),(t==null?void 0:t.instrumentationEnabled)!==void 0&&(this.instrumentationEnabled=t.instrumentationEnabled),f.getInstance().requiredApisAvailable()?ve().then(n=>{n&&(ca(),sn(this).then(()=>ut(this),()=>ut(this)),this.initialized=!0)}).catch(n=>{w.info(`Environment doesn't support IndexedDB: ${n}`)}):w.info('Firebase Performance cannot start if the browser does not support "Fetch" and "Promise", or cookies are disabled.'))}set instrumentationEnabled(t){I.getInstance().instrumentationEnabled=t}get instrumentationEnabled(){return I.getInstance().instrumentationEnabled}set dataCollectionEnabled(t){I.getInstance().dataCollectionEnabled=t}get dataCollectionEnabled(){return I.getInstance().dataCollectionEnabled}}const Da="[DEFAULT]";function Ra(e=yt()){return e=Ae(e),j(e,"performance").getImmediate()}const Ma=(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("installations-internal").getImmediate();if(n.name!==Da)throw p.create("FB not default");if(typeof window>"u")throw p.create("no window");ks(window);const i=new Ca(n,r);return i._init(t),i};function Oa(){D(new T("performance",Ma,"PUBLIC")),_(rt,_e),_(rt,_e,"esm2017")}Oa();const Na=()=>{const t=It({apiKey:"AIzaSyANVvapu0ihi1cM8ZzuXTkwjx9lM_J1RyQ",authDomain:"rw-api-code-d0779.firebaseapp.com",projectId:"rw-api-code-d0779",storageBucket:"rw-api-code-d0779.appspot.com",messagingSenderId:"363611843335",appId:"1:363611843335:web:f15aef7ab427f52b4033a2",measurementId:"G-XJH5TKP5VL"});return Ds(t),Ra(t),"Firebase initialized successfully"};(async function(){try{const e=await Na();console.log(e)}catch(e){console.error(e)}})();function Pa(e){return new Promise(t=>setTimeout(t,e))}async function Ba(){try{await navigator.permissions.query({name:"clipboard-write"})}catch(e){console.error(e)}}async function $a(){try{await Pa(1e3);const e=document.getElementsByClassName("copy");for(let t=0;t<e.length;t++){const n=e[t];n.addEventListener("touchend",async()=>{await Ba();const s=[...n.parentNode.querySelector("code").querySelectorAll("span")],a=[...new Set(s.map(o=>o.textContent))].join("");try{await navigator.clipboard.writeText(a)}catch{const c=document.createElement("textarea");c.value=a,document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c)}})}}catch(e){console.error(e)}}$a();function ln(e){if(e.extends){const t=ln(e.extends);return{...t,...e,async enhanceApp(n){t.enhanceApp&&await t.enhanceApp(n),e.enhanceApp&&await e.enhanceApp(n)}}}return e}const F=ln(Mn),ka=dn({name:"VitePressApp",setup(){const{site:e}=hn();return pn(()=>{mn(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),gn(),bn(),In(),F.setup&&F.setup(),()=>yn(F.Layout)}});async function Fa(){const e=Ua(),t=La();t.provide(En,e);const n=_n(e.route);return t.provide(wn,n),t.component("Content",Tn),t.component("ClientOnly",vn),Object.defineProperties(t.config.globalProperties,{$frontmatter:{get(){return n.frontmatter.value}},$params:{get(){return n.page.value.params}}}),F.enhanceApp&&await F.enhanceApp({app:t,router:e,siteData:An}),{app:t,router:e,data:n}}function La(){return Sn(ka)}function Ua(){let e=fe,t;return Cn(n=>{let r=Dn(n);return e&&(t=r),(e||t===r)&&(r=r.replace(/\.js$/,".lean.js")),fe&&(e=!1),Rn(()=>import(r),[])},F.NotFound)}fe&&Fa().then(({app:e,router:t,data:n})=>{t.go().then(()=>{fn(t.route,n.site),e.mount("#app")})});export{Fa as createApp};
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
import{_ as e,c as t,o as a}from"./chunks/framework.621e5595.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","action":null,"hero":{"name":"铁锈战争-API-Code","text":"轻松编码,轻松学习","tagline":"学习Mod,制作Mod,创新Mod","image":{"src":"https://rustedwarfareapicode.top/src/assets/logo.png","alt":"RW-API-Code"},"actions":[{"theme":"alt","text":"编写指南","link":"/api-dev"},{"theme":"brand","text":"Github","link":"https://github.com/LingASDJ/RW-API-Code"}]},"features":[{"title":"单位代码表","details":"学习最基础的铁锈单位API-Code","link":"/src/Unit/core","linkText":"让我们立刻开始吧!"},{"title":"地图代码表","details":"学习铁锈的地图TMX代码表","linkText":"让我们立刻开始吧![开发中]"},{"title":"调试代码表","details":"学习铁锈的高级调试代码表(仅Android)","linkText":"让我们立刻开始吧![开发中]"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function o(n,d,s,r,l,c){return a(),t("div")}const x=e(i,[["render",o]]);export{m as __pageData,x as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as e,c as t,o as a}from"./chunks/framework.621e5595.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","action":null,"hero":{"name":"铁锈战争-API-Code","text":"轻松编码,轻松学习","tagline":"学习Mod,制作Mod,创新Mod","image":{"src":"https://rustedwarfareapicode.top/src/assets/logo.png","alt":"RW-API-Code"},"actions":[{"theme":"alt","text":"编写指南","link":"/api-dev"},{"theme":"brand","text":"Github","link":"https://github.com/LingASDJ/RW-API-Code"}]},"features":[{"title":"单位代码表","details":"学习最基础的铁锈单位API-Code","link":"/src/Unit/core","linkText":"让我们立刻开始吧!"},{"title":"地图代码表","details":"学习铁锈的地图TMX代码表","linkText":"让我们立刻开始吧![开发中]"},{"title":"调试代码表","details":"学习铁锈的高级调试代码表(仅Android)","linkText":"让我们立刻开始吧![开发中]"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function o(n,d,s,r,l,c){return a(),t("div")}const x=e(i,[["render",o]]);export{m as __pageData,x as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{_ as n,c as i,z as s,a,E as o,B as c,O as e,G as t,o as p}from"./chunks/framework.621e5595.js";const _=JSON.parse('{"title":"[canBuild]建造组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/canbuild.md","filePath":"src/Unit/canbuild.md"}'),r={name:"src/Unit/canbuild.md"},d=e(`<h1 id="canbuild-建造组" tabindex="-1"><strong>[canBuild]建造组</strong> <a class="header-anchor" href="#canbuild-建造组" aria-label="Permalink to "**[canBuild]建造组**""></a></h1><h3 id="canbuild-name" tabindex="-1">[canBuild_NAME] <a class="header-anchor" href="#canbuild-name" aria-label="Permalink to "[canBuild_NAME]""></a></h3><h4 id="canbuild-name-代码简介" tabindex="-1">[canBuild_NAME]-代码简介 <a class="header-anchor" href="#canbuild-name-代码简介" aria-label="Permalink to "[canBuild_NAME]-代码简介""></a></h4><p>代码: [canBuild_NAME] 中文释义:可建造_名字 类型:字符型 canBuild_NAME = 组名 如果不填写此组名 将默认拥有一个命名为空格的组名。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>建议将NAME命名为此组的描述或可建造单位的昵称。<br> 以便于阅读代码。</p></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-a6oT8" id="tab-a282k7G" checked="checked"><label for="tab-a282k7G">allureluoli</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_造小坦</span><span style="color:#89DDFF;">]</span></span>
|
||||
import{_ as n,c as i,z as s,a,E as o,B as c,O as e,G as t,o as p}from"./chunks/framework.621e5595.js";const _=JSON.parse('{"title":"[canBuild]建造组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/canbuild.md","filePath":"src/Unit/canbuild.md"}'),r={name:"src/Unit/canbuild.md"},d=e(`<h1 id="canbuild-建造组" tabindex="-1"><strong>[canBuild]建造组</strong> <a class="header-anchor" href="#canbuild-建造组" aria-label="Permalink to "**[canBuild]建造组**""></a></h1><h3 id="canbuild-name" tabindex="-1">[canBuild_NAME] <a class="header-anchor" href="#canbuild-name" aria-label="Permalink to "[canBuild_NAME]""></a></h3><h4 id="canbuild-name-代码简介" tabindex="-1">[canBuild_NAME]-代码简介 <a class="header-anchor" href="#canbuild-name-代码简介" aria-label="Permalink to "[canBuild_NAME]-代码简介""></a></h4><p>代码: [canBuild_NAME] 中文释义:可建造_名字 类型:字符型 canBuild_NAME = 组名 如果不填写此组名 将默认拥有一个命名为空格的组名。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>建议将NAME命名为此组的描述或可建造单位的昵称。<br> 以便于阅读代码。</p></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-xTp3g" id="tab-Qca55e8" checked="checked"><label for="tab-Qca55e8">allureluoli</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_造小坦</span><span style="color:#89DDFF;">]</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_SmallTank</span><span style="color:#89DDFF;">]</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_建造科技</span><span style="color:#89DDFF;">]</span></span></code></pre></div></div></div><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>[canBuild_NAME] 中的NAME命名禁止重复,否则会引发报错。<br> 其中下划线作为分隔符也是重要的,如果没有将引发报错。</p></div><h4 id="canbuild-name-演示例子" tabindex="-1">[canBuild_NAME]-演示例子 <a class="header-anchor" href="#canbuild-name-演示例子" aria-label="Permalink to "[canBuild_NAME]-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#英文命名</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_小坦克]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#中文命名</span></span>
|
|
@ -1,33 +0,0 @@
|
|||
import{_ as n,c as i,z as s,a,E as o,B as c,O as e,G as t,o as p}from"./chunks/framework.621e5595.js";const _=JSON.parse('{"title":"[canBuild]建造组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/canbuild.md","filePath":"src/Unit/canbuild.md"}'),r={name:"src/Unit/canbuild.md"},d=e(`<h1 id="canbuild-建造组" tabindex="-1"><strong>[canBuild]建造组</strong> <a class="header-anchor" href="#canbuild-建造组" aria-label="Permalink to "**[canBuild]建造组**""></a></h1><h3 id="canbuild-name" tabindex="-1">[canBuild_NAME] <a class="header-anchor" href="#canbuild-name" aria-label="Permalink to "[canBuild_NAME]""></a></h3><h4 id="canbuild-name-代码简介" tabindex="-1">[canBuild_NAME]-代码简介 <a class="header-anchor" href="#canbuild-name-代码简介" aria-label="Permalink to "[canBuild_NAME]-代码简介""></a></h4><p>代码: [canBuild_NAME] 中文释义:可建造_名字 类型:字符型 canBuild_NAME = 组名 如果不填写此组名 将默认拥有一个命名为空格的组名。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>建议将NAME命名为此组的描述或可建造单位的昵称。<br> 以便于阅读代码。</p></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-VrysK" id="tab-EgBPAkl" checked="checked"><label for="tab-EgBPAkl">allureluoli</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_造小坦</span><span style="color:#89DDFF;">]</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_SmallTank</span><span style="color:#89DDFF;">]</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">canBuild_建造科技</span><span style="color:#89DDFF;">]</span></span></code></pre></div></div></div><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>[canBuild_NAME] 中的NAME命名禁止重复,否则会引发报错。<br> 其中下划线作为分隔符也是重要的,如果没有将引发报错。</p></div><h4 id="canbuild-name-演示例子" tabindex="-1">[canBuild_NAME]-演示例子 <a class="header-anchor" href="#canbuild-name-演示例子" aria-label="Permalink to "[canBuild_NAME]-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#英文命名</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_小坦克]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#中文命名</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_%TK]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#符号命名</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_P P]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#字母与空格的组合也会被视为单独的组名</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_/(ㄒoㄒ)/~~]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#多种字符</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_🆒]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#甚至是emoji</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_ ]</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">#仅用一个空格作为组名 但是多个空格会被视为和一个空格相同</span></span></code></pre></div><h3 id="name" tabindex="-1">name <a class="header-anchor" href="#name" aria-label="Permalink to "name""></a></h3><h4 id="name-代码简介" tabindex="-1">name-代码简介 <a class="header-anchor" href="#name-代码简介" aria-label="Permalink to "name-代码简介""></a></h4><p>代码:name 中文释义:名字 类型:字符型</p><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>如果没有name而填入其他代码将引发报错,且name:不能不填<br> 需要为空可以填写 name:NONE</p></div><h4 id="name-用法" tabindex="-1">name-用法 <a class="header-anchor" href="#name-用法" aria-label="Permalink to "name-用法""></a></h4><p>name应填写单位[core]内中 name属性的名称, 它决定了需要建造哪个单位。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>注意! 如果你填了两个相同的name,建造栏会自动合并,建造栏中不会出现两个相同的单位。<br> 其中根据代码自上而下的先后顺序判断优先级。</p></div><h4 id="name-示例" tabindex="-1">name-示例 <a class="header-anchor" href="#name-示例" aria-label="Permalink to "name-示例""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">name: SmallTank</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_小坦克]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">name: 小坦克</span></span></code></pre></div><h3 id="pos" tabindex="-1">pos <a class="header-anchor" href="#pos" aria-label="Permalink to "pos""></a></h3><h4 id="pos-代码简介" tabindex="-1">pos-代码简介 <a class="header-anchor" href="#pos-代码简介" aria-label="Permalink to "pos-代码简介""></a></h4><p>代码:pos 英文全称:position 中文释义:名次 类型:浮点数</p><h4 id="pos-用法" tabindex="-1">pos-用法 <a class="header-anchor" href="#pos-用法" aria-label="Permalink to "pos-用法""></a></h4><p>pos:属性数值表示排序的序号,其中越小的越靠前。</p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>如果没有填写pos,将默认为1,并按照代码顺序依次递增。<br> 其中数值可以为小数,可以为负,也可以为整数。</p></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>小数点后位数过长将会影响判断,建议用整数。</p></div><h4 id="pos-演示例子" tabindex="-1">pos-演示例子 <a class="header-anchor" href="#pos-演示例子" aria-label="Permalink to "pos-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">pos:0.1</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_小坦克]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">pos:-2</span></span></code></pre></div><h3 id="tech" tabindex="-1">tech <a class="header-anchor" href="#tech" aria-label="Permalink to "tech""></a></h3><h4 id="tech-代码简介" tabindex="-1">tech-代码简介 <a class="header-anchor" href="#tech-代码简介" aria-label="Permalink to "tech-代码简介""></a></h4><p>代码:tech 英文全称:technology 中文释义:科技 类型:整数</p><h4 id="tech-用法" tabindex="-1">tech-用法 <a class="header-anchor" href="#tech-用法" aria-label="Permalink to "tech-用法""></a></h4><p>填写数字设置单位的科技等级,共有3个级别,1级GUI显示为绿色,2、3级显示为黄色。</p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>与[core]中的科技等级不同的是,超过3或者为负也不会报错。<br> 而且会受到原单位科技等级的影响,优先级低于原单位设置的科技等级。</p></div><h4 id="tech-演示例子" tabindex="-1">tech-演示例子 <a class="header-anchor" href="#tech-演示例子" aria-label="Permalink to "tech-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">tech: -1</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[canBuild_小坦克]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">tech: 2</span></span></code></pre></div><h3 id="forcenano" tabindex="-1">forceNano <a class="header-anchor" href="#forcenano" aria-label="Permalink to "forceNano""></a></h3><h4 id="forcenano-代码简介" tabindex="-1">forceNano-代码简介 <a class="header-anchor" href="#forcenano-代码简介" aria-label="Permalink to "forceNano-代码简介""></a></h4><p>代码:forceNano 中文释义: 建造方式 类型: 布尔值</p><h4 id="forcenano-用法" tabindex="-1">forceNano-用法 <a class="header-anchor" href="#forcenano-用法" aria-label="Permalink to "forceNano-用法""></a></h4><p>当属性设置为true时,则将目标当作是建筑物建造。 (即使是一个单位)</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认为 false。<br> 对于没有建筑能力的单位将会在地图上凭空生成一个虚影而不会继续建造。</p></div><h4 id="forcenano-演示例子" tabindex="-1">forceNano-演示例子 <a class="header-anchor" href="#forcenano-演示例子" aria-label="Permalink to "forceNano-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">forceNano: true</span></span></code></pre></div><h3 id="isvisible" tabindex="-1">isVisible <a class="header-anchor" href="#isvisible" aria-label="Permalink to "isVisible""></a></h3><h4 id="isvisible-代码简介" tabindex="-1">isVisible-代码简介 <a class="header-anchor" href="#isvisible-代码简介" aria-label="Permalink to "isVisible-代码简介""></a></h4><p>代码:isVisible 中文释义: 可见条件 类型: 逻辑布尔值</p><h4 id="isvisible-用法" tabindex="-1">isVisible-用法 <a class="header-anchor" href="#isvisible-用法" aria-label="Permalink to "isVisible-用法""></a></h4><p>当属性设置为true时,则使单位建造可见。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>其中可以将属性设置为条件判断语句。<br> 如果满足条件,则从界面中显示此单位。<br> 默认为true。</p></div><h4 id="isvisible-演示例子" tabindex="-1">isVisible-演示例子 <a class="header-anchor" href="#isvisible-演示例子" aria-label="Permalink to "isVisible-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isVisible: if self.hp() > 50</span></span></code></pre></div><h3 id="islocked" tabindex="-1">isLocked <a class="header-anchor" href="#islocked" aria-label="Permalink to "isLocked""></a></h3><h4 id="islocked-代码简介" tabindex="-1">isLocked-代码简介 <a class="header-anchor" href="#islocked-代码简介" aria-label="Permalink to "isLocked-代码简介""></a></h4><p>代码:isLocked 中文释义: 锁定 类型: 逻辑布尔值</p><h4 id="islocked-用法" tabindex="-1">isLocked-用法 <a class="header-anchor" href="#islocked-用法" aria-label="Permalink to "isLocked-用法""></a></h4><p>当属性设置为true时,则使单位锁定。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>其中可以将属性设置为条件判断语句。<br> 如果满足条件,则使单位锁定。<br> 默认为false。</p></div><h4 id="islocked-演示例子" tabindex="-1">isLocked-演示例子 <a class="header-anchor" href="#islocked-演示例子" aria-label="Permalink to "isLocked-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLocked: if self.hp() < 50</span></span></code></pre></div><h3 id="islockedmessage" tabindex="-1">isLockedMessage <a class="header-anchor" href="#islockedmessage" aria-label="Permalink to "isLockedMessage""></a></h3><h4 id="islockedmessage-代码简介" tabindex="-1">isLockedMessage-代码简介 <a class="header-anchor" href="#islockedmessage-代码简介" aria-label="Permalink to "isLockedMessage-代码简介""></a></h4><p>代码:isLockedMessage 中文释义: 锁定消息 类型: 字符串</p><h4 id="islockedmessage-用法" tabindex="-1">isLockedMessage-用法 <a class="header-anchor" href="#islockedmessage-用法" aria-label="Permalink to "isLockedMessage-用法""></a></h4><p>填写被锁定时显示的文本。</p>`,64),h={class:"tip custom-block"},u=s("p",{class:"custom-block-title"},"TIP",-1),k=s("br",null,null,-1),b=e(`<h4 id="islockedmessage-演示例子" tabindex="-1">isLockedMessage-演示例子 <a class="header-anchor" href="#islockedmessage-演示例子" aria-label="Permalink to "isLockedMessage-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLockedMessage: 因为你太菜这个单位不给你用嗷。\\n 想用的话就努力变强吧!</span></span></code></pre></div><h3 id="islockedmessage-lang" tabindex="-1">isLockedMessage_{LANG} <br> <a class="header-anchor" href="#islockedmessage-lang" aria-label="Permalink to "isLockedMessage_{LANG} <br>""></a></h3><h4 id="islockedmessage-lang-代码简介" tabindex="-1">isLockedMessage-{LANG}代码简介 <a class="header-anchor" href="#islockedmessage-lang-代码简介" aria-label="Permalink to "isLockedMessage-{LANG}代码简介""></a></h4><p>代码:isLockedMessage 中文释义: 锁定消息 类型: 字符串 是isLockedMessage的多语言版本,用于设置在不同语言下显示的锁定内容,用法一致。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>将{LANG}替换为语言文字的缩写即可,例如:<br> zh 代表简体中文,es,代表英文。</p></div><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLockedMessage_es: You are BAKA! \\n if think use it ,go get stronger.</span></span></code></pre></div><h3 id="islockedalt" tabindex="-1">isLockedAlt <a class="header-anchor" href="#islockedalt" aria-label="Permalink to "isLockedAlt""></a></h3><h4 id="islockedalt-代码简介" tabindex="-1">isLockedAlt-代码简介 <a class="header-anchor" href="#islockedalt-代码简介" aria-label="Permalink to "isLockedAlt-代码简介""></a></h4><p>代码:isLockedAlt 中文释义: 另外的锁定 类型: 逻辑布尔值</p><h4 id="islockedalt-用法" tabindex="-1">isLockedAlt-用法 <a class="header-anchor" href="#islockedalt-用法" aria-label="Permalink to "isLockedAlt-用法""></a></h4><p>和isLocked完全一样,只是为了多一个锁定的条件。</p><h4 id="islockedalt-演示例子" tabindex="-1">isLockedAlt-演示例子 <a class="header-anchor" href="#islockedalt-演示例子" aria-label="Permalink to "isLockedAlt-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLockedAlt: if self.energy(</span><span style="color:#F07178;">greaterThan</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">90)</span></span></code></pre></div><h3 id="islockedaltmessage" tabindex="-1">isLockedAltMessage <a class="header-anchor" href="#islockedaltmessage" aria-label="Permalink to "isLockedAltMessage""></a></h3><h4 id="islockedaltmessage-代码简介" tabindex="-1">isLockedAltMessage-代码简介 <a class="header-anchor" href="#islockedaltmessage-代码简介" aria-label="Permalink to "isLockedAltMessage-代码简介""></a></h4><p>代码:isLockedAltMessage 中文释义: 另外的锁定消息 类型: 字符串</p><h4 id="islockedaltmessage-用法" tabindex="-1">isLockedAltMessage-用法 <a class="header-anchor" href="#islockedaltmessage-用法" aria-label="Permalink to "isLockedAltMessage-用法""></a></h4><p>和isLockedMessage的完全一样,只是为了表达另一个的原因。 用来描述isLockedAlt。</p><h4 id="islockedaltmessage-演示例子" tabindex="-1">isLockedAltMessage-演示例子 <a class="header-anchor" href="#islockedaltmessage-演示例子" aria-label="Permalink to "isLockedAltMessage-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLockedAltMessage: 还有因为这个单位丑拒。</span></span></code></pre></div><h3 id="islockedalt2" tabindex="-1">isLockedAlt2 <a class="header-anchor" href="#islockedalt2" aria-label="Permalink to "isLockedAlt2""></a></h3><h4 id="islockedalt2-代码简介" tabindex="-1">isLockedAlt2-代码简介 <a class="header-anchor" href="#islockedalt2-代码简介" aria-label="Permalink to "isLockedAlt2-代码简介""></a></h4><p>代码:isLockedAlt2 中文释义: 另外的锁定2 类型: 逻辑布尔值</p><h4 id="islockedalt2-用法" tabindex="-1">isLockedAlt2-用法 <a class="header-anchor" href="#islockedalt2-用法" aria-label="Permalink to "isLockedAlt2-用法""></a></h4><p>和isLocked完全一样,评价就是梅开二度。</p><h4 id="islockedalt2-演示例子" tabindex="-1">isLockedAlt2-演示例子 <a class="header-anchor" href="#islockedalt2-演示例子" aria-label="Permalink to "isLockedAlt2-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLockedAlt2: if self.energy() < 100</span></span></code></pre></div><h3 id="islockedalt2message" tabindex="-1">isLockedAlt2Message <a class="header-anchor" href="#islockedalt2message" aria-label="Permalink to "isLockedAlt2Message""></a></h3><h4 id="islockedalt2message-代码简介" tabindex="-1">isLockedAlt2Message-代码简介 <a class="header-anchor" href="#islockedalt2message-代码简介" aria-label="Permalink to "isLockedAlt2Message-代码简介""></a></h4><p>代码:isLockedAlt2Message 中文释义: 另外的锁定消息2 类型: 字符串</p><h4 id="islockedalt2message-用法" tabindex="-1">isLockedAlt2Message-用法 <a class="header-anchor" href="#islockedalt2message-用法" aria-label="Permalink to "isLockedAlt2Message-用法""></a></h4><p>和isLockedMessage的完全一样。 用来描述isLockedAlt2。</p><h4 id="islockedalt2message-演示例子" tabindex="-1">isLockedAlt2Message-演示例子 <a class="header-anchor" href="#islockedalt2message-演示例子" aria-label="Permalink to "isLockedAlt2Message-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isLockedAlt2Message: 第三个原因是我觉得你应该把雪糕分我一半吃。</span></span></code></pre></div><h3 id="addresources" tabindex="-1">addResources <a class="header-anchor" href="#addresources" aria-label="Permalink to "addResources""></a></h3><h4 id="addresources-代码简介" tabindex="-1">addResources-代码简介 <a class="header-anchor" href="#addresources-代码简介" aria-label="Permalink to "addResources-代码简介""></a></h4><p>代码:addResources 中文释义: 增加资源 类型: 资源</p><h4 id="addresources-用法" tabindex="-1">addResources-用法 <a class="header-anchor" href="#addresources-用法" aria-label="Permalink to "addResources-用法""></a></h4><p>填写所需的资源名和数量,在放置建筑物或生产单位时,将这些资源添加到自身中。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使用逗号分隔,可以添加多种资源。</p></div><h4 id="addresources-演示例子" tabindex="-1">addResources-演示例子 <a class="header-anchor" href="#addresources-演示例子" aria-label="Permalink to "addResources-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">addResources: </span><span style="color:#F07178;">ammo</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">5, </span><span style="color:#F07178;">setFlag</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">1</span></span></code></pre></div><h3 id="price" tabindex="-1">price <a class="header-anchor" href="#price" aria-label="Permalink to "price""></a></h3><h4 id="price-代码简介" tabindex="-1">price-代码简介 <a class="header-anchor" href="#price-代码简介" aria-label="Permalink to "price-代码简介""></a></h4><p>代码:price 中文释义: 价格 类型: 资源</p><h4 id="price-用法" tabindex="-1">price-用法 <a class="header-anchor" href="#price-用法" aria-label="Permalink to "price-用法""></a></h4><p>填写所需的资源名和数量,会覆盖默认需要的资源和价格。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>用处如建造一个建筑时候附送一个单位。此代码可用设定为两者价钱之和,矿场600,送矿车1400,而建造时花2000,送1400,卖600,可避免玩家刷钱。(抄自HX代码表)</p></div><h4 id="price-演示例子" tabindex="-1">price-演示例子 <a class="header-anchor" href="#price-演示例子" aria-label="Permalink to "price-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">price: 5000,</span><span style="color:#F07178;">ammo</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">5</span></span></code></pre></div><h3 id="isguiblinking" tabindex="-1">isGuiBlinking <a class="header-anchor" href="#isguiblinking" aria-label="Permalink to "isGuiBlinking""></a></h3><h4 id="isguiblinking-代码简介" tabindex="-1">isGuiBlinking-代码简介 <a class="header-anchor" href="#isguiblinking-代码简介" aria-label="Permalink to "isGuiBlinking-代码简介""></a></h4><p>代码:isGuiBlinking 中文释义: 界面闪烁 类型: 逻辑布尔值</p><h4 id="isguiblinking-用法" tabindex="-1">isGuiBlinking-用法 <a class="header-anchor" href="#isguiblinking-用法" aria-label="Permalink to "isGuiBlinking-用法""></a></h4><p>为true时在UI中拥有闪烁效果。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>可以添加条件判断语句。<br> 满足某些条件时闪烁此UI,用来提示某些单位可以建造了。</p></div><h4 id="isguiblinking-演示例子" tabindex="-1">isGuiBlinking-演示例子 <a class="header-anchor" href="#isguiblinking-演示例子" aria-label="Permalink to "isGuiBlinking-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[canBuild_SmallTank]</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isGuiBlinking:true</span></span></code></pre></div>`,59);function m(g,A,y,C,q,D){const l=t("font");return p(),i("div",null,[d,s("div",h,[u,s("p",null,[a("可以用来告知玩家被锁定原因。"),k,a(" 能够通过转义字符 "),o(l,{color:"red"},{default:c(()=>[a("\\n")]),_:1}),a(" 实现文本换行。")])]),b])}const v=n(r,[["render",m]]);export{_ as __pageData,v as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as n,c as i,z as s,a,E as o,B as c,O as e,G as t,o as p}from"./chunks/framework.621e5595.js";const _=JSON.parse('{"title":"[canBuild]建造组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/canbuild.md","filePath":"src/Unit/canbuild.md"}'),r={name:"src/Unit/canbuild.md"},d=e("",64),h={class:"tip custom-block"},u=s("p",{class:"custom-block-title"},"TIP",-1),k=s("br",null,null,-1),b=e("",59);function m(g,A,y,C,q,D){const l=t("font");return p(),i("div",null,[d,s("div",h,[u,s("p",null,[a("可以用来告知玩家被锁定原因。"),k,a(" 能够通过转义字符 "),o(l,{color:"red"},{default:c(()=>[a("\\n")]),_:1}),a(" 实现文本换行。")])]),b])}const v=n(r,[["render",m]]);export{_ as __pageData,v as default};
|
|
@ -1,119 +0,0 @@
|
|||
import{_ as t,c as o,z as e,a,E as n,B as l,O as i,G as r,o as c}from"./chunks/framework.621e5595.js";const E=JSON.parse('{"title":"[core]组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/core.md","filePath":"src/Unit/core.md"}'),p={name:"src/Unit/core.md"},d=i(`<h1 id="core-组" tabindex="-1"><strong>[core]组</strong> <a class="header-anchor" href="#core-组" aria-label="Permalink to "**[core]组**""></a></h1><h2 id="第一类-通用代码组" tabindex="-1">第一类-通用代码组 <a class="header-anchor" href="#第一类-通用代码组" aria-label="Permalink to "第一类-通用代码组""></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>以下的代码为<code>通用代码</code>,多半是必要的代码,如果不包括这些,可能在<code>绝大多数情况下导致错误</code>。</p></div><h3 id="name" tabindex="-1">name <a class="header-anchor" href="#name" aria-label="Permalink to "name""></a></h3><h4 id="name-代码简介" tabindex="-1">name-代码简介 <a class="header-anchor" href="#name-代码简介" aria-label="Permalink to "name-代码简介""></a></h4><p>代码:name 中文释义:名字 类型:字符型 隶属于:通用代码组</p><h4 id="name-要点指示" tabindex="-1">name-要点指示 <a class="header-anchor" href="#name-要点指示" aria-label="Permalink to "name-要点指示""></a></h4><hr><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-ERrYb" id="tab-9-p7MGb" checked="checked"><label for="tab-9-p7MGb">JDSALing</label><input type="radio" name="group-ERrYb" id="tab-A9k7I1T"><label for="tab-A9k7I1T">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">定义单位原始名称,可以是中文。</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">游戏使用它区分其它单位。</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">如果没有在[displayText或者语言文件设置显示名称],</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">那么它也将作为单位的显示名称。</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">具体描述文件位置(内部</span><span style="color:#A6ACCD;">):</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">1.assets/translationsStrings_zh.properties</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">格式:units.单位名称.name</span><span style="color:#A6ACCD;">=写单位显示的名称</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">units.单位名称.description</span><span style="color:#A6ACCD;">= [[填单位显示的描述]]</span></span></code></pre></div><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">ini文件的单独定义(外部-推荐</span><span style="color:#A6ACCD;">):</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">2.displayText:</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">-单位的标题</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">displayDescription:</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">-单位的描述</span></span></code></pre></div></div></div><p>特别提醒:<code>displayText支持本地化</code>,例如如果要写一个<code>多语言的单位描述</code>,可以通过以下例子:</p><h4 id="name-演示例子" tabindex="-1">name-演示例子 <a class="header-anchor" href="#name-演示例子" aria-label="Permalink to "name-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">name: Ling</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayText: English Title Text</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayText_zh:中文标题</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription: -English Description</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription_zh:-中文描述</span></span></code></pre></div><hr><h3 id="price" tabindex="-1">price <a class="header-anchor" href="#price" aria-label="Permalink to "price""></a></h3><h4 id="price-代码简介" tabindex="-1">price-代码简介 <a class="header-anchor" href="#price-代码简介" aria-label="Permalink to "price-代码简介""></a></h4><p>代码:price 中文释义:价格 类型:整数 隶属于:通用代码组</p><h4 id="price-要点指示" tabindex="-1">price-要点指示 <a class="header-anchor" href="#price-要点指示" aria-label="Permalink to "price-要点指示""></a></h4><p>定义单位的价格,显示在单位信息中,建造时也以此价格为准。</p><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-wFAmi" id="tab-jonv5Dh" checked="checked"><label for="tab-jonv5Dh">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">默认情况下,price只需要填写一个整数,此时使用的是游戏内自带的资金credit;</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">想要更改资源类型,可以使用:</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">\`</span><span style="color:#FFCB6B;">price:资源1</span><span style="color:#C3E88D;">=数值1,资源2=数值2,资源3=数值3,……</span><span style="color:#89DDFF;">\`</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">的格式</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">(前提是此资源要在使用的单位进行定义)。</span></span></code></pre></div></div></div><h4 id="price-演示例子" tabindex="-1">price-演示例子 <a class="header-anchor" href="#price-演示例子" aria-label="Permalink to "price-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">price:120,石油=80,铁=60</span></span></code></pre></div><hr><h3 id="radius" tabindex="-1">radius <a class="header-anchor" href="#radius" aria-label="Permalink to "radius""></a></h3><h4 id="radius-代码简介" tabindex="-1">radius-代码简介 <a class="header-anchor" href="#radius-代码简介" aria-label="Permalink to "radius-代码简介""></a></h4><p>代码:radius 中文释义:半径 类型:整数 隶属于:通用代码组</p><h4 id="radius-要点指示" tabindex="-1">radius-要点指示 <a class="header-anchor" href="#radius-要点指示" aria-label="Permalink to "radius-要点指示""></a></h4><p>半径定义单位的<code>实际碰撞体积和显示范围</code>,在未设置<code>选择框大小</code>时,半径决定是单位选择框的大小。 半径的单位是像素(px)。</p><h4 id="radius-演示例子" tabindex="-1">radius-演示例子 <a class="header-anchor" href="#radius-演示例子" aria-label="Permalink to "radius-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">radius:20</span></span></code></pre></div><hr><h3 id="mass" tabindex="-1">mass <a class="header-anchor" href="#mass" aria-label="Permalink to "mass""></a></h3><h4 id="mass-代码简介" tabindex="-1">mass-代码简介 <a class="header-anchor" href="#mass-代码简介" aria-label="Permalink to "mass-代码简介""></a></h4><p>代码:mass 中文释义:质量 类型:整数 隶属于:通用代码组</p><h4 id="mass-要点指示" tabindex="-1">mass-要点指示 <a class="header-anchor" href="#mass-要点指示" aria-label="Permalink to "mass-要点指示""></a></h4><p>质量决定单位在各种碰撞时的效果。<code>质量越大,其他单位越难推动</code>。</p><h4 id="mass-演示例子" tabindex="-1">mass-演示例子 <a class="header-anchor" href="#mass-演示例子" aria-label="Permalink to "mass-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">mass:2000</span></span></code></pre></div><hr><h3 id="maxhp" tabindex="-1">maxHp <a class="header-anchor" href="#maxhp" aria-label="Permalink to "maxHp""></a></h3><h4 id="maxhp-代码简介" tabindex="-1">maxHp-代码简介 <a class="header-anchor" href="#maxhp-代码简介" aria-label="Permalink to "maxHp-代码简介""></a></h4><p>代码:maxHp 中文释义:最大生命值 类型:整数 隶属于:通用代码组</p><h4 id="maxhp-要点指示" tabindex="-1">maxHp-要点指示 <a class="header-anchor" href="#maxhp-要点指示" aria-label="Permalink to "maxHp-要点指示""></a></h4><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-FmptM" id="tab-88_d8vs" checked="checked"><label for="tab-88_d8vs">tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">最大生命值定义单位在不修改它时最多能够有多少血量,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">单位默认生成时即是这个血量。</span></span>
|
||||
<span class="line"><span style="color:#82AAFF;">maxHp可以通过单位参考.maxHp</span><span style="color:#89DDFF;">()</span><span style="color:#A6ACCD;">来获取,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">也可以通过[action]进行修改。</span></span></code></pre></div></div></div><h4 id="maxhp-演示例子" tabindex="-1">maxHp-演示例子 <a class="header-anchor" href="#maxhp-演示例子" aria-label="Permalink to "maxHp-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">maxHp:600</span></span></code></pre></div><h3 id="altnames" tabindex="-1">altNames <a class="header-anchor" href="#altnames" aria-label="Permalink to "altNames""></a></h3><h4 id="altnames-代码简介" tabindex="-1">altNames-代码简介 <a class="header-anchor" href="#altnames-代码简介" aria-label="Permalink to "altNames-代码简介""></a></h4><p>代码:altNames 中文释义:别名/曾用名 类型:字符型 隶属于:通用代码组</p><h4 id="altnames-要点指示" tabindex="-1">altNames-要点指示 <a class="header-anchor" href="#altnames-要点指示" aria-label="Permalink to "altNames-要点指示""></a></h4><p>altNames代码要点指示:</p><h4 id="jdsaling的小提示" tabindex="-1"><strong>JDSALing的小提示</strong> <a class="header-anchor" href="#jdsaling的小提示" aria-label="Permalink to "**JDSALing的小提示**""></a></h4>`,51),h=e("br",null,null,-1),u=i(`<h4 id="altnames-演示例子" tabindex="-1">altNames-演示例子 <a class="header-anchor" href="#altnames-演示例子" aria-label="Permalink to "altNames-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">altNames:ling,tobby3600,coldmint</span></span></code></pre></div><hr><h3 id="class" tabindex="-1">class <a class="header-anchor" href="#class" aria-label="Permalink to "class""></a></h3><h4 id="class-代码简介" tabindex="-1">class-代码简介 <a class="header-anchor" href="#class-代码简介" aria-label="Permalink to "class-代码简介""></a></h4><p>代码:class 中文释义:类 类型:字符型 隶属于:通用代码组</p><p>无实际用处,可以删除。<br> Luke:保留供将来使用,默认情况下必须为<code>CustomUnitMetadata</code>。由于该代码无实际用途,可以忽略该代码<br> 该代码后面什么都可以输,但没有实际用途。或许在未来会有用。</p><h4 id="class-演示例子" tabindex="-1">class-演示例子 <a class="header-anchor" href="#class-演示例子" aria-label="Permalink to "class-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">class:CustomUnitMetadata</span></span></code></pre></div><hr><h3 id="strictlevel" tabindex="-1">strictLevel <a class="header-anchor" href="#strictlevel" aria-label="Permalink to "strictLevel""></a></h3><h4 id="strictlevel-代码简介" tabindex="-1">strictLevel-代码简介 <a class="header-anchor" href="#strictlevel-代码简介" aria-label="Permalink to "strictLevel-代码简介""></a></h4><p>代码:strictLevel 中文释义:严格级别 类型:数字固定型 隶属于:通用代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>建议添加到"all-units.template"以应用于所有单位,进行统一查错。<br> 默认值为0,忽略代码重复。设为1时如果当前单位内有重复代码,则报错。</p></div><h4 id="strictlevel-演示例子" tabindex="-1">strictLevel-演示例子 <a class="header-anchor" href="#strictlevel-演示例子" aria-label="Permalink to "strictLevel-演示例子""></a></h4><div class="language-all-units.template,ini"><button title="Copy Code" class="copy"></button><span class="lang">all-units.template,ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">strictLevel:1</span></span></code></pre></div><hr><h3 id="techlevel" tabindex="-1">techLevel <a class="header-anchor" href="#techlevel" aria-label="Permalink to "techLevel""></a></h3><h4 id="techlevel-代码简介" tabindex="-1">techLevel-代码简介 <a class="header-anchor" href="#techlevel-代码简介" aria-label="Permalink to "techLevel-代码简介""></a></h4><p>代码:techLevel 中文释义:科技等级 类型:数字固定型 隶属于:通用代码组</p>`,20),b={class:"tip custom-block"},g=e("p",{class:"custom-block-title"},"TIP",-1),m=e("br",null,null,-1),y=e("br",null,null,-1),C=i(`<h4 id="techlevel-演示例子" tabindex="-1">techLevel-演示例子 <a class="header-anchor" href="#techlevel-演示例子" aria-label="Permalink to "techLevel-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">techLevel:2</span></span></code></pre></div><hr><h3 id="buildspeed" tabindex="-1">buildSpeed <a class="header-anchor" href="#buildspeed" aria-label="Permalink to "buildSpeed""></a></h3><h4 id="buildspeed-代码简介" tabindex="-1">buildSpeed-代码简介 <a class="header-anchor" href="#buildspeed-代码简介" aria-label="Permalink to "buildSpeed-代码简介""></a></h4><p>代码:buildSpeed 中文释义:建造速度 类型:浮点/秒型 隶属于:通用代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>建造此单位需要的时间,填秒。<br> 以前的计算方式为:此处所填时间=1÷(60x你需要的秒)如果定义了工厂速率则需要乘以建造乘数。</p></div><h4 id="buildspeed-演示例子" tabindex="-1">buildSpeed-演示例子 <a class="header-anchor" href="#buildspeed-演示例子" aria-label="Permalink to "buildSpeed-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">buildSpeed:30s</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#或者:</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">## 下方可能有误差</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">buildSpeed:0.0006</span></span></code></pre></div><hr><h3 id="isbio" tabindex="-1">isBio <a class="header-anchor" href="#isbio" aria-label="Permalink to "isBio""></a></h3><h4 id="isbio-代码简介" tabindex="-1">isBio-代码简介 <a class="header-anchor" href="#isbio-代码简介" aria-label="Permalink to "isBio-代码简介""></a></h4><p>代码:isBio 中文释义:是生物 类型:布尔型 隶属于:通用代码组</p>`,13),k={class:"tip custom-block"},f=e("p",{class:"custom-block-title"},"TIP",-1),q=e("br",null,null,-1),v=e("br",null,null,-1),x=i(`<h4 id="isbio-演示例子" tabindex="-1">isBio-演示例子 <a class="header-anchor" href="#isbio-演示例子" aria-label="Permalink to "isBio-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isBio:true</span></span></code></pre></div><hr><h3 id="isbug" tabindex="-1">isBug <a class="header-anchor" href="#isbug" aria-label="Permalink to "isBug""></a></h3><h4 id="isbug-代码简介" tabindex="-1">isBug-代码简介 <a class="header-anchor" href="#isbug-代码简介" aria-label="Permalink to "isBug-代码简介""></a></h4><p>代码:isBug 中文释义:是虫子 类型:布尔型 隶属于:通用代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>若设置成true,则会认定为虫子,用于沙盒中的单独分类。</p></div><h4 id="isbug-演示例子" tabindex="-1">isBug-演示例子 <a class="header-anchor" href="#isbug-演示例子" aria-label="Permalink to "isBug-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isBug:true</span></span></code></pre></div><hr><h3 id="isbuilder" tabindex="-1">isBuilder <a class="header-anchor" href="#isbuilder" aria-label="Permalink to "isBuilder""></a></h3><h4 id="isbuilder-代码简介" tabindex="-1">isBuilder-代码简介 <a class="header-anchor" href="#isbuilder-代码简介" aria-label="Permalink to "isBuilder-代码简介""></a></h4><p>代码:isBuilder 中文释义:是建造者 类型:布尔型 隶属于:通用代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>若设置成true,则会需要此单位建造建筑物,则通常需要此代码。 并且默认设为[ai] useAsBuilder。</p></div><h4 id="isbuilder-演示例子" tabindex="-1">isBuilder-演示例子 <a class="header-anchor" href="#isbuilder-演示例子" aria-label="Permalink to "isBuilder-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isBuilder:true</span></span></code></pre></div><hr><h3 id="streamingcost" tabindex="-1">streamingCost <a class="header-anchor" href="#streamingcost" aria-label="Permalink to "streamingCost""></a></h3><h4 id="streamingcost-代码简介" tabindex="-1">streamingCost-代码简介 <a class="header-anchor" href="#streamingcost-代码简介" aria-label="Permalink to "streamingCost-代码简介""></a></h4><p>代码:streamingCost 中文释义:流式资金 类型:整数型 隶属于:通用代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>和价格一样,但在建造时逐渐消耗资金,如果在构建过程中资源耗尽,<br> 建造或生产队列将暂停。就像是红警中那样。铁锈默认是预先扣除资金。<br> 若使用该代码,则玩家的每秒资金将会根据流式资金的算法进行扣减。</p></div><h4 id="streamingcost-演示例子" tabindex="-1">streamingCost-演示例子 <a class="header-anchor" href="#streamingcost-演示例子" aria-label="Permalink to "streamingCost-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">streamingCost:1145</span></span></code></pre></div><hr><h3 id="switchpricewithstreamingcost" tabindex="-1">switchPriceWithStreamingCost <a class="header-anchor" href="#switchpricewithstreamingcost" aria-label="Permalink to "switchPriceWithStreamingCost""></a></h3><h4 id="switchpricewithstreamingcost-代码简介" tabindex="-1">switchPriceWithStreamingCost-代码简介 <a class="header-anchor" href="#switchpricewithstreamingcost-代码简介" aria-label="Permalink to "switchPriceWithStreamingCost-代码简介""></a></h4><p>代码:switchPriceWithStreamingCost(S.P.S.C.)<br> 中文释义:流式资金模式全局切换 类型:布尔型 隶属于:通用代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>快捷设置为默认资金消耗方式或为流式建造方式。 建议使用模板快速将一个模组为所有单位切换流资源。 例如all-units.template.</p></div><h4 id="switchpricewithstreamingcost-演示例子" tabindex="-1">switchPriceWithStreamingCost-演示例子 <a class="header-anchor" href="#switchpricewithstreamingcost-演示例子" aria-label="Permalink to "switchPriceWithStreamingCost-演示例子""></a></h4><div class="language-ini,all-units.template"><button title="Copy Code" class="copy"></button><span class="lang">ini,all-units.template</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">switchPriceWithStreamingCost:true</span></span></code></pre></div><h2 id="第二类-单位统计代码组" tabindex="-1">第二类-单位统计代码组 <a class="header-anchor" href="#第二类-单位统计代码组" aria-label="Permalink to "第二类-单位统计代码组""></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>非必须存在的代码,请根据情况自行使用</p></div><h3 id="selfregenrate" tabindex="-1">selfRegenRate <a class="header-anchor" href="#selfregenrate" aria-label="Permalink to "selfRegenRate""></a></h3><h4 id="selfregenrate-代码简介" tabindex="-1">selfRegenRate-代码简介 <a class="header-anchor" href="#selfregenrate-代码简介" aria-label="Permalink to "selfRegenRate-代码简介""></a></h4><p>代码:selfRegenRate 中文释义:生命恢复速度 类型:浮点型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>此数值决定每帧增加血量。游戏内默认速度下,一秒为60逻辑帧,而你看到的FPS帧数为渲染帧,所以电脑上几百帧和手机上60帧和省电模式下30帧并不影响计算。所以不要写太大。可以写负值用于自毁。</p></div><h4 id="selfregenrate-演示例子" tabindex="-1">selfRegenRate-演示例子 <a class="header-anchor" href="#selfregenrate-演示例子" aria-label="Permalink to "selfRegenRate-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">maxHp:500</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">selfRegenRate:0.5</span></span></code></pre></div><hr><h3 id="maxshield" tabindex="-1">maxShield <a class="header-anchor" href="#maxshield" aria-label="Permalink to "maxShield""></a></h3><h4 id="maxshield-代码简介" tabindex="-1">maxShield-代码简介 <a class="header-anchor" href="#maxshield-代码简介" aria-label="Permalink to "maxShield-代码简介""></a></h4><p>代码:maxShield 中文释义:护盾值 类型:整型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>单位最大护盾值,默认生成时即为此值。如果设置了startShieldAtZero:true,则初始为0.</p></div><h4 id="maxshield-演示例子" tabindex="-1">maxShield-演示例子 <a class="header-anchor" href="#maxshield-演示例子" aria-label="Permalink to "maxShield-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">maxShield:3000</span></span></code></pre></div><hr><h3 id="startshieldatzero" tabindex="-1">startShieldAtZero <a class="header-anchor" href="#startshieldatzero" aria-label="Permalink to "startShieldAtZero""></a></h3><h4 id="startshieldatzero-代码简介" tabindex="-1">startShieldAtZero-代码简介 <a class="header-anchor" href="#startshieldatzero-代码简介" aria-label="Permalink to "startShieldAtZero-代码简介""></a></h4><p>代码:startShieldAtZero 中文释义:护盾初始值为0 类型:布尔型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果为true,则单位护盾值从0开始增加。</p></div><h4 id="startshieldatzero-演示例子" tabindex="-1">startShieldAtZero-演示例子 <a class="header-anchor" href="#startshieldatzero-演示例子" aria-label="Permalink to "startShieldAtZero-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">maxShield:3000</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">startShieldAtZero:true</span></span></code></pre></div><hr><h3 id="shieldregen" tabindex="-1">shieldRegen <a class="header-anchor" href="#shieldregen" aria-label="Permalink to "shieldRegen""></a></h3><h4 id="shieldregen-代码简介" tabindex="-1">shieldRegen-代码简介 <a class="header-anchor" href="#shieldregen-代码简介" aria-label="Permalink to "shieldRegen-代码简介""></a></h4><p>代码:shieldRegen 中文释义:护盾恢复速度 类型:浮点型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>此数值决定每帧增加护盾值,游戏内一秒为60帧,所以不要写太大。可以写负值。</p></div><h4 id="shieldregen-演示例子" tabindex="-1">shieldRegen-演示例子 <a class="header-anchor" href="#shieldregen-演示例子" aria-label="Permalink to "shieldRegen-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">maxShield:3000</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">shieldRegen:0.5</span></span></code></pre></div><hr><h3 id="energymax" tabindex="-1">energyMax <a class="header-anchor" href="#energymax" aria-label="Permalink to "energyMax""></a></h3><h4 id="energymax-代码简介" tabindex="-1">energyMax-代码简介 <a class="header-anchor" href="#energymax-代码简介" aria-label="Permalink to "energyMax-代码简介""></a></h4><p>代码:energyMax 中文释义:能量值 类型:浮点型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认值为0。可以用作炮塔,激光防御和行动的弹药的能量。</p></div><h4 id="energymax-演示例子" tabindex="-1">energyMax-演示例子 <a class="header-anchor" href="#energymax-演示例子" aria-label="Permalink to "energyMax-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">energyMax:5</span></span></code></pre></div><hr><h3 id="energyregen" tabindex="-1">energyRegen <a class="header-anchor" href="#energyregen" aria-label="Permalink to "energyRegen""></a></h3><h4 id="energyregen-代码简介" tabindex="-1">energyRegen-代码简介 <a class="header-anchor" href="#energyregen-代码简介" aria-label="Permalink to "energyRegen-代码简介""></a></h4><p>代码:energyRegen 中文释义:能量恢复速度 类型:浮点型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>能量每帧恢复速度,游戏内一秒为60帧,所以不要写太大。可以写负值。</p></div><h4 id="energyregen-演示例子" tabindex="-1">energyRegen-演示例子 <a class="header-anchor" href="#energyregen-演示例子" aria-label="Permalink to "energyRegen-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">energyRegen:0.4</span></span></code></pre></div><hr><h3 id="energyregenwhenrecharging" tabindex="-1">energyRegenWhenRecharging <a class="header-anchor" href="#energyregenwhenrecharging" aria-label="Permalink to "energyRegenWhenRecharging""></a></h3><h4 id="energyregenwhenrecharging-代码简介" tabindex="-1">energyRegenWhenRecharging-代码简介 <a class="header-anchor" href="#energyregenwhenrecharging-代码简介" aria-label="Permalink to "energyRegenWhenRecharging-代码简介""></a></h4><p>代码:energyRegenWhenRecharging 中文释义:充能时能量恢复速度 类型:浮点型 隶属于:单位统计代码组</p>`,77),D={class:"tip custom-block"},A=e("p",{class:"custom-block-title"},"TIP",-1),P=i(`<h4 id="energyregenwhenrecharging-演示例子" tabindex="-1">energyRegenWhenRecharging-演示例子 <a class="header-anchor" href="#energyregenwhenrecharging-演示例子" aria-label="Permalink to "energyRegenWhenRecharging-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">energyMax:1</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">energyRegenWhenRecharging:0.4</span></span></code></pre></div><hr><h3 id="energyneedstorechargetofull" tabindex="-1">energyNeedsToRechargeToFull <a class="header-anchor" href="#energyneedstorechargetofull" aria-label="Permalink to "energyNeedsToRechargeToFull""></a></h3><h4 id="energyneedstorechargetofull-代码简介" tabindex="-1">energyNeedsToRechargeToFull-代码简介 <a class="header-anchor" href="#energyneedstorechargetofull-代码简介" aria-label="Permalink to "energyNeedsToRechargeToFull-代码简介""></a></h4><p>代码:energyNeedsToRechargeToFull 中文释义:能量需要充满 类型:布尔型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果能量耗尽,则需要完全充能才能进行攻击。</p></div><h4 id="energyneedstorechargetofull-演示例子" tabindex="-1">energyNeedsToRechargeToFull-演示例子 <a class="header-anchor" href="#energyneedstorechargetofull-演示例子" aria-label="Permalink to "energyNeedsToRechargeToFull-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">energyMax:4</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">energyNeedsToRechargeToFull:true</span></span></code></pre></div><hr><h3 id="armour" tabindex="-1">armour <a class="header-anchor" href="#armour" aria-label="Permalink to "armour""></a></h3><h4 id="armour-代码简介" tabindex="-1">armour-代码简介 <a class="header-anchor" href="#armour-代码简介" aria-label="Permalink to "armour-代码简介""></a></h4><p>代码:armour 中文释义:装甲 类型:整型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>抵消敌方攻击所造成的伤害。</p></div><h4 id="armour-演示例子" tabindex="-1">armour-演示例子 <a class="header-anchor" href="#armour-演示例子" aria-label="Permalink to "armour-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">armour:40</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#如果受到40以上的常规攻击,则进行抵消,反之返回1伤害点。</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#例如45伤害,40护甲,那么将获得5点伤害。</span></span></code></pre></div><hr><h3 id="armourmindamagetokeep" tabindex="-1">armourMinDamageToKeep <a class="header-anchor" href="#armourmindamagetokeep" aria-label="Permalink to "armourMinDamageToKeep""></a></h3><h4 id="armourmindamagetokeep-代码简介" tabindex="-1">armourMinDamageToKeep-代码简介 <a class="header-anchor" href="#armourmindamagetokeep-代码简介" aria-label="Permalink to "armourMinDamageToKeep-代码简介""></a></h4><p>代码:armourMinDamageToKeep 中文释义:装甲最低伤害 类型:整型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>至少造成多少点伤害,默认为1.防止护甲太高完全打不动。</p></div><h4 id="armourmindamagetokeep-演示例子" tabindex="-1">armourMinDamageToKeep-演示例子 <a class="header-anchor" href="#armourmindamagetokeep-演示例子" aria-label="Permalink to "armourMinDamageToKeep-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">armour:40</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">armourMinDamageToKeep:2</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#如果受到40以下的常规攻击,则进行最低伤害判定</span></span></code></pre></div><hr><h3 id="borrowresourceswhilealive" tabindex="-1">borrowResourcesWhileAlive <a class="header-anchor" href="#borrowresourceswhilealive" aria-label="Permalink to "borrowResourcesWhileAlive""></a></h3><h4 id="borrowresourceswhilealive-代码简介" tabindex="-1">borrowResourcesWhileAlive-代码简介 <a class="header-anchor" href="#borrowresourceswhilealive-代码简介" aria-label="Permalink to "borrowResourcesWhileAlive-代码简介""></a></h4><p>代码:armour 中文释义:资源活着时借用 类型:Price型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>创建时获取这些资源,删除或销毁时将其返回。 例如用于电力逻辑,负数供电和正数耗电。</p></div><h4 id="borrowresourceswhilealive-演示例子" tabindex="-1">borrowResourcesWhileAlive-演示例子 <a class="header-anchor" href="#borrowresourceswhilealive-演示例子" aria-label="Permalink to "borrowResourcesWhileAlive-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">borrowResourcesWhileAlive:5000</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#单位活着的时候给予5000金币,死亡扣除5000金币</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#一个小型贷款系统,</span></span></code></pre></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-_aYjb" id="tab-pxyWaaK" checked="checked"><label for="tab-pxyWaaK">考考你</label><input type="radio" name="group-_aYjb" id="tab-qiWEJJG"><label for="tab-qiWEJJG">显示答案</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">如果这里要通过这个代码做一个小的贷款系统,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">并经过一段时间让单位死亡。</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">只需要4行代码即可实现,试试看。</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">提示:dieOnZeroEnergy:true</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">(</span><span style="color:#FFCB6B;">无能量时死亡</span><span style="color:#89DDFF;">|</span><span style="color:#FFCB6B;">如果能量值为零,该单位死亡</span><span style="color:#89DDFF;">)</span></span></code></pre></div><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#676E95;font-style:italic;">#参考答案为:</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[</span><span style="color:#A6ACCD;">core</span><span style="color:#89DDFF;">]</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">borrowResourcesWhileAlive:5000</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">energyMax:1</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">energyRegen:-0.4</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">dieOnZeroEnergy:true</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#原理是通过能量为0单位死亡并通过这个代码还钱,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">是很简陋的贷款思路,当然,在后续会有更加高级的思路。</span></span></code></pre></div></div></div><hr><h3 id="generation-resources" tabindex="-1">generation_resources <a class="header-anchor" href="#generation-resources" aria-label="Permalink to "generation_resources""></a></h3><h4 id="generation-resources-代码简介" tabindex="-1">generation_resources-代码简介 <a class="header-anchor" href="#generation-resources-代码简介" aria-label="Permalink to "generation_resources-代码简介""></a></h4><p>代码:generation_resources 中文释义:资源获取 类型:Price型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>单位定时获得的资源,可自定义资源。</p></div><h4 id="generation-resources-演示例子" tabindex="-1">generation_resources-演示例子 <a class="header-anchor" href="#generation-resources-演示例子" aria-label="Permalink to "generation_resources-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_resources:10</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#or</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_resources:</span><span style="color:#F07178;">credits</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">10</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#常规产出10credits/1s游戏资金</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">-----------我是分界线----------</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#自定义资源写法</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_resources:金属=5</span></span></code></pre></div><hr><h3 id="generation-active" tabindex="-1">generation_active <a class="header-anchor" href="#generation-active" aria-label="Permalink to "generation_active""></a></h3><h4 id="generation-active-代码简介" tabindex="-1">generation_active-代码简介 <a class="header-anchor" href="#generation-active-代码简介" aria-label="Permalink to "generation_active-代码简介""></a></h4><p>代码:generation_active 中文释义:资源获取条件 类型:逻辑布尔型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>获取资源条件。可用于受损时无法产出。</p></div><h4 id="generation-active-演示例子" tabindex="-1">generation_active-演示例子 <a class="header-anchor" href="#generation-active-演示例子" aria-label="Permalink to "generation_active-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#1.14写法</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_resources:金属=5</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_active: if not self.hp(</span><span style="color:#F07178;">lessThan</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">100)</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#1.15写法</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_resources:金属=5</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">generation_active: if not self.hp<100</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#效果:单位低于1000血量可以产出资源</span></span></code></pre></div><hr><h3 id="generation-credits" tabindex="-1">generation_credits <a class="header-anchor" href="#generation-credits" aria-label="Permalink to "generation_credits""></a></h3><h4 id="generation-credits-代码简介" tabindex="-1">generation_credits-代码简介 <a class="header-anchor" href="#generation-credits-代码简介" aria-label="Permalink to "generation_credits-代码简介""></a></h4><p>代码:generation_credits 中文释义:资金获取 类型:整型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>生成资源,仅用于默认的资金,也就是铁锈默认的金钱。</p></div><h4 id="generation-credits-演示例子" tabindex="-1">generation_credits-演示例子 <a class="header-anchor" href="#generation-credits-演示例子" aria-label="Permalink to "generation_credits-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#F07178;">generation_credits</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">5</span></span></code></pre></div><h3 id="generation-delay" tabindex="-1">generation_delay <a class="header-anchor" href="#generation-delay" aria-label="Permalink to "generation_delay""></a></h3><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>此代码为老旧代码,作者Luke不推荐使用。</p></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>警告:请勿使用40以外的数值,否则会有视觉Bug。 例如使用30,资金生成3,实际就为6,但是一旦这类单位多了,游戏的资金显示会出问题。</p></div><hr><h4 id="generation-delay-代码简介" tabindex="-1">generation_delay-代码简介 <a class="header-anchor" href="#generation-delay-代码简介" aria-label="Permalink to "generation_delay-代码简介""></a></h4><p>代码:generation_delay 中文释义:资金获取时间 类型:整型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>多久帧添加添加一次资源(generation_credits指定数值)。 默认值为40,一秒为60帧。</p></div><h4 id="generation-delay-演示例子" tabindex="-1">generation_delay-演示例子 <a class="header-anchor" href="#generation-delay-演示例子" aria-label="Permalink to "generation_delay-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#F07178;">generation_delay</span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;">40</span></span></code></pre></div><h2 id="第三类-ui和图形代码" tabindex="-1">第三类-UI和图形代码 <a class="header-anchor" href="#第三类-ui和图形代码" aria-label="Permalink to "第三类-UI和图形代码""></a></h2><h3 id="showineditor" tabindex="-1">showInEditor <a class="header-anchor" href="#showineditor" aria-label="Permalink to "showInEditor""></a></h3><h4 id="showineditor-代码简介" tabindex="-1">showInEditor-代码简介 <a class="header-anchor" href="#showineditor-代码简介" aria-label="Permalink to "showInEditor-代码简介""></a></h4><p>代码:showInEditor 中文释义:沙盒中可见 类型:布尔型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>设置为false可在沙盒编辑器中隐藏单位。(默认为true)</p></div><h4 id="showineditor-演示例子" tabindex="-1">showInEditor-演示例子 <a class="header-anchor" href="#showineditor-演示例子" aria-label="Permalink to "showInEditor-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">showInEditor:false</span></span></code></pre></div><h3 id="displaytext-lang" tabindex="-1">displayText_LANG <a class="header-anchor" href="#displaytext-lang" aria-label="Permalink to "displayText_LANG""></a></h3><h4 id="displaytext-lang-代码简介" tabindex="-1">displayText_{LANG}-代码简介 <a class="header-anchor" href="#displaytext-lang-代码简介" aria-label="Permalink to "displayText_{LANG}-代码简介""></a></h4><p>代码:displayText_{LANG} 中文释义:界面显示文本多语言 类型:字符型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>为单位名称添加多语言支持。此方法并不方便,不如设置游戏内部语言文件,建议催Luke改。有关常见语言代码,请参考下表</p></div><table><thead><tr><th style="text-align:center;">语言代码</th><th style="text-align:center;">所属国家/地区</th><th style="text-align:center;">语言代码</th><th style="text-align:center;">所属国家/地区</th></tr></thead><tbody><tr><td style="text-align:center;">zh</td><td style="text-align:center;">(中文通用)</td><td style="text-align:center;">en(可忽略)</td><td style="text-align:center;">(英语通用)</td></tr><tr><td style="text-align:center;">zh-cn</td><td style="text-align:center;">(简体)</td><td style="text-align:center;">ru</td><td style="text-align:center;">(俄语)</td></tr><tr><td style="text-align:center;">zh-tw</td><td style="text-align:center;">(台湾)</td><td style="text-align:center;">ja</td><td style="text-align:center;">(日语)</td></tr><tr><td style="text-align:center;">zh-hk</td><td style="text-align:center;">中文(香港)</td><td style="text-align:center;">es-ES</td><td style="text-align:center;">(西班牙)</td></tr><tr><td style="text-align:center;">de</td><td style="text-align:center;">(德语)</td><td style="text-align:center;">fr-FR</td><td style="text-align:center;">法语(法国)</td></tr></tbody></table><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>其它自查(此列表并不全),不过你应该不会闲着支持这么多语言。另外英文的语言代码<code>en</code>可以忽略,因为英文在软件里为默认语言,故而无需加<code>en</code>,当然加了也没事。</p></div><p>如果你不想进行多语言化,你应该直接<code>displayText:坦克</code>,而不是<code>displayText_zh:坦克</code>,如果你写了<code>displayText_zh:坦克</code>,<br>你必须再声明一个<code>displayText:Tank</code>,否则,游戏会找不到<code>默认语言缺省值</code>,将会导致<code>mod报错而无法运行</code>。所有可以使用多语言的都有这个检查,还请各位Modder留意。(若有特别的代码,将会在它里面特别提示)</p><h4 id="displaytext-lang-演示例子" tabindex="-1">displayText_{LANG}-演示例子 <a class="header-anchor" href="#displaytext-lang-演示例子" aria-label="Permalink to "displayText_{LANG}-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#English</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayText:Tank</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#Chinese</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayText_zh:坦克</span></span></code></pre></div><hr><h3 id="displaydescription-lang" tabindex="-1">displayDescription_LANG <a class="header-anchor" href="#displaydescription-lang" aria-label="Permalink to "displayDescription_LANG""></a></h3><h4 id="displaydescription-代码简介" tabindex="-1">displayDescription-代码简介 <a class="header-anchor" href="#displaydescription-代码简介" aria-label="Permalink to "displayDescription-代码简介""></a></h4><p>代码:displayDescription_{LANG} 中文释义:界面显示描述 类型:字符型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>单位显示给玩家的单位描述,可以使用多语言,具体使用方法参考在<code>displayText</code>的演示说明,这里不再过多讨论。</p></div><h4 id="displaydescription-演示例子" tabindex="-1">displayDescription-演示例子 <a class="header-anchor" href="#displaydescription-演示例子" aria-label="Permalink to "displayDescription-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayText:坦克</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription:只能对地,弱输出,只能在地上行走。</span></span></code></pre></div><hr><h3 id="displaylocalekey" tabindex="-1">displayLocaleKey <a class="header-anchor" href="#displaylocalekey" aria-label="Permalink to "displayLocaleKey""></a></h3><h4 id="displaylocalekey-代码简介" tabindex="-1">displayLocaleKey-代码简介 <a class="header-anchor" href="#displaylocalekey-代码简介" aria-label="Permalink to "displayLocaleKey-代码简介""></a></h4><p>代码:displayLocaleKey 中文释义:界面显示内部调用 类型:字符型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>调用内部语言文件的单位名称和说明的翻译文件。用处不大,通常是在<code>替换原版单位的同时直接调用它的原始描述</code>。该代码例子需要会拆包,如果你是初学者,该代码了解即可。</p></div><h4 id="displaylocalekey-演示例子" tabindex="-1">displayLocaleKey-演示例子 <a class="header-anchor" href="#displaylocalekey-演示例子" aria-label="Permalink to "displayLocaleKey-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayLocaleKey: units.mechArtillery</span></span></code></pre></div><hr><h3 id="displayradius" tabindex="-1">displayRadius <a class="header-anchor" href="#displayradius" aria-label="Permalink to "displayRadius""></a></h3><h4 id="displayradius-代码简介" tabindex="-1">displayRadius-代码简介 <a class="header-anchor" href="#displayradius-代码简介" aria-label="Permalink to "displayRadius-代码简介""></a></h4><p>代码:displayRadius 中文释义:单位选择时显示圆圈 类型:整形 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>修改选择单位时显示的绿色圆圈,不更改实际碰撞(radius)和可选择范围。</p></div><h4 id="displayradius-演示例子" tabindex="-1">displayRadius-演示例子 <a class="header-anchor" href="#displayradius-演示例子" aria-label="Permalink to "displayRadius-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayRadius:25</span></span></code></pre></div><hr><h3 id="uitargetradius" tabindex="-1">uiTargetRadius <a class="header-anchor" href="#uitargetradius" aria-label="Permalink to "uiTargetRadius""></a></h3><h4 id="uitargetradius-代码简介" tabindex="-1">uiTargetRadius-代码简介 <a class="header-anchor" href="#uitargetradius-代码简介" aria-label="Permalink to "uiTargetRadius-代码简介""></a></h4><p>代码:uiTargetRadius 中文释义:为目标时半径 类型:整形 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认为显示半径值。攻击/回收/等单位时使用的半径</p></div><h4 id="uitargetradius-演示例子" tabindex="-1">uiTargetRadius-演示例子 <a class="header-anchor" href="#uitargetradius-演示例子" aria-label="Permalink to "uiTargetRadius-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">uiTargetRadius:25</span></span></code></pre></div><hr><h3 id="shieldrenderradius" tabindex="-1">shieldRenderRadius <a class="header-anchor" href="#shieldrenderradius" aria-label="Permalink to "shieldRenderRadius""></a></h3><h4 id="shieldrenderradius-代码简介" tabindex="-1">shieldRenderRadius-代码简介 <a class="header-anchor" href="#shieldrenderradius-代码简介" aria-label="Permalink to "shieldRenderRadius-代码简介""></a></h4><p>代码:shieldRenderRadius 中文释义:单位护盾显示半径 类型:整形 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>护盾绘制半径,默认值比半径大一点。 可以设置在单位上显示更大或更小的护盾圈。</p></div><h4 id="shieldrenderradius-演示例子" tabindex="-1">shieldRenderRadius-演示例子 <a class="header-anchor" href="#shieldrenderradius-演示例子" aria-label="Permalink to "shieldRenderRadius-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">shieldRenderRadius:20</span></span></code></pre></div><hr><h3 id="shielddisplayonlydeflection" tabindex="-1">shieldDisplayOnlyDeflection <a class="header-anchor" href="#shielddisplayonlydeflection" aria-label="Permalink to "shieldDisplayOnlyDeflection""></a></h3><h4 id="shielddisplayonlydeflection-代码简介" tabindex="-1">shieldDisplayOnlyDeflection-代码简介 <a class="header-anchor" href="#shielddisplayonlydeflection-代码简介" aria-label="Permalink to "shieldDisplayOnlyDeflection-代码简介""></a></h4><p>代码:shieldDisplayOnlyDeflection 中文释义:护盾只在受攻击时显示 类型:布尔型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>隐藏护盾,只在受到攻击时显示。</p></div><h4 id="shielddisplayonlydeflection-演示例子" tabindex="-1">shieldDisplayOnlyDeflection-演示例子 <a class="header-anchor" href="#shielddisplayonlydeflection-演示例子" aria-label="Permalink to "shieldDisplayOnlyDeflection-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">shieldDisplayOnlyDeflection:true</span></span></code></pre></div><hr><h3 id="shielddeflectiondisplayrate" tabindex="-1">shieldDeflectionDisplayRate <a class="header-anchor" href="#shielddeflectiondisplayrate" aria-label="Permalink to "shieldDeflectionDisplayRate""></a></h3><h4 id="shielddeflectiondisplayrate-代码简介" tabindex="-1">shieldDeflectionDisplayRate-代码简介 <a class="header-anchor" href="#shielddeflectiondisplayrate-代码简介" aria-label="Permalink to "shieldDeflectionDisplayRate-代码简介""></a></h4><p>代码:shieldDeflectionDisplayRate 中文释义:护盾消失速度 类型:浮点型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认值为4。数值越大消失越快。</p></div><h4 id="shielddeflectiondisplayrate-演示例子" tabindex="-1">shieldDeflectionDisplayRate-演示例子 <a class="header-anchor" href="#shielddeflectiondisplayrate-演示例子" aria-label="Permalink to "shieldDeflectionDisplayRate-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">shieldDeflectionDisplayRate:3</span></span></code></pre></div><hr><h3 id="showonminimap" tabindex="-1">showOnMinimap <a class="header-anchor" href="#showonminimap" aria-label="Permalink to "showOnMinimap""></a></h3><h4 id="showonminimap-代码简介" tabindex="-1">showOnMinimap-代码简介 <a class="header-anchor" href="#showonminimap-代码简介" aria-label="Permalink to "showOnMinimap-代码简介""></a></h4><p>代码:showOnMinimap 中文释义:显示在小地图上 类型:布尔型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认为true。如果为false,则在小地图上不显示此单位。</p></div><h4 id="showonminimap-演示例子" tabindex="-1">showOnMinimap-演示例子 <a class="header-anchor" href="#showonminimap-演示例子" aria-label="Permalink to "showOnMinimap-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">showOnMinimap:true</span></span></code></pre></div><hr><h3 id="showonminimaptoenemies" tabindex="-1">showOnMinimapToEnemies <a class="header-anchor" href="#showonminimaptoenemies" aria-label="Permalink to "showOnMinimapToEnemies""></a></h3><h4 id="showonminimaptoenemies-代码简介" tabindex="-1">showOnMinimapToEnemies-代码简介 <a class="header-anchor" href="#showonminimaptoenemies-代码简介" aria-label="Permalink to "showOnMinimapToEnemies-代码简介""></a></h4><p>代码:showOnMinimapToEnemies 中文释义:显示于敌人小地图 类型:布尔型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>是否在敌人小地图上显示。</p></div><h4 id="showonminimaptoenemies-演示例子" tabindex="-1">showOnMinimapToEnemies-演示例子 <a class="header-anchor" href="#showonminimaptoenemies-演示例子" aria-label="Permalink to "showOnMinimapToEnemies-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">showOnMinimapToEnemies:true</span></span></code></pre></div><hr><h3 id="showactionswithmixedselectionifotherunitshavetag" tabindex="-1">showActionsWithMixedSelectionIfOtherUnitsHaveTag <a class="header-anchor" href="#showactionswithmixedselectionifotherunitshavetag" aria-label="Permalink to "showActionsWithMixedSelectionIfOtherUnitsHaveTag""></a></h3><h4 id="showactionswithmixedselectionifotherunitshavetag-代码简介" tabindex="-1">showActionsWithMixedSelectionIfOtherUnitsHaveTag-代码简介 <a class="header-anchor" href="#showactionswithmixedselectionifotherunitshavetag-代码简介" aria-label="Permalink to "showActionsWithMixedSelectionIfOtherUnitsHaveTag-代码简介""></a></h4><p>代码:showActionsWithMixedSelectionIfOtherUnitsHaveTag 中文释义:混合所选单位所显示的行为 类型:标签型 隶属于:UI和图形代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果选择的单位都包含此处使用的标签,则合并“行为(action)”。比如你的步兵通过部署转化成另一个单位,在混合时可以当作同一个单位处理,不再是默认的谁都无法执行操作。例子如红警的盟军大兵在混合选中后依旧可执行部署或解除。</p></div><h4 id="showactionswithmixedselectionifotherunitshavetag-演示例子" tabindex="-1">showActionsWithMixedSelectionIfOtherUnitsHaveTag-演示例子 <a class="header-anchor" href="#showactionswithmixedselectionifotherunitshavetag-演示例子" aria-label="Permalink to "showActionsWithMixedSelectionIfOtherUnitsHaveTag-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">showActionsWithMixedSelectionIfOtherUnitsHaveTag:tag_联系</span></span></code></pre></div><h2 id="第四类-构建代码" tabindex="-1">第四类-构建代码 <a class="header-anchor" href="#第四类-构建代码" aria-label="Permalink to "第四类-构建代码""></a></h2><h3 id="isbuilding" tabindex="-1">isBuilding <a class="header-anchor" href="#isbuilding" aria-label="Permalink to "isBuilding""></a></h3><h4 id="isbuilding-代码简介" tabindex="-1">isBuilding-代码简介 <a class="header-anchor" href="#isbuilding-代码简介" aria-label="Permalink to "isBuilding-代码简介""></a></h4><p>代码:isBuilding 中文释义:是建筑 类型:布尔型 隶属于:构建代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>定义单位是否为建筑物。为true时无论移动方式是什么都会强制为建筑。</p></div><h4 id="isbuilding-演示例子" tabindex="-1">isBuilding-演示例子 <a class="header-anchor" href="#isbuilding-演示例子" aria-label="Permalink to "isBuilding-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">isBuilding:true</span></span></code></pre></div><hr><h3 id="footprint" tabindex="-1">footprint <a class="header-anchor" href="#footprint" aria-label="Permalink to "footprint""></a></h3><h4 id="footprint-代码简介" tabindex="-1">footprint-代码简介 <a class="header-anchor" href="#footprint-代码简介" aria-label="Permalink to "footprint-代码简介""></a></h4><p>代码:footprint 中文释义:建筑碰撞范围 类型:多整型 隶属于:构建代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>填四个数值(左,上,右,下),单位是格子,建筑默认占一格,向左和向上需要填负数,填整数在选择时有偏移。 四个数值可以完全颠倒,这样不会阻碍单位移动。决定建筑单位碰撞体积,此区域内单位不能通过,如果在单位运动途中单位则会绕过。单位实际可选择面积使用的是radius。</p></div><h4 id="footprint-演示例子" tabindex="-1">footprint-演示例子 <a class="header-anchor" href="#footprint-演示例子" aria-label="Permalink to "footprint-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">##(1x1)</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">footprint: 0,0,0,0</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">##(2X2)</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">footprint: 0,0,1,1</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">##(3X3)</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">footprint: -1,-1,1,1</span></span></code></pre></div><hr><h3 id="constructionfootprint" tabindex="-1">constructionFootprint <a class="header-anchor" href="#constructionfootprint" aria-label="Permalink to "constructionFootprint""></a></h3><h4 id="constructionfootprint-代码简介" tabindex="-1">constructionFootprint-代码简介 <a class="header-anchor" href="#constructionfootprint-代码简介" aria-label="Permalink to "constructionFootprint-代码简介""></a></h4><p>代码:constructionFootprint 中文释义:建筑覆盖范围 类型:多整型 隶属于:构建代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>基础规则同上,这个区域内不能建造建筑,但是单位可以通过。<br> 一般需要设定比上一个面积大。<br> 好处是即使建造的密密麻麻,单位也有路可走。</p></div><h4 id="constructionfootprint-演示例子" tabindex="-1">constructionFootprint-演示例子 <a class="header-anchor" href="#constructionfootprint-演示例子" aria-label="Permalink to "constructionFootprint-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">constructionFootprint: -1,-1,1,3</span></span></code></pre></div><hr><h3 id="displayfootprint" tabindex="-1">displayFootprint <a class="header-anchor" href="#displayfootprint" aria-label="Permalink to "displayFootprint""></a></h3><h4 id="displayfootprint-代码简介" tabindex="-1">displayFootprint-代码简介 <a class="header-anchor" href="#displayfootprint-代码简介" aria-label="Permalink to "displayFootprint-代码简介""></a></h4><p>代码:displayFootprint 中文释义:建筑选择UI 类型:多整型 隶属于:构建代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>基础规则同上,用于选择单位时UI显示。不设定则默认为建筑覆盖区域。</p></div><h4 id="displayfootprint-演示例子" tabindex="-1">displayFootprint-演示例子 <a class="header-anchor" href="#displayfootprint-演示例子" aria-label="Permalink to "displayFootprint-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayFootprint: 0,0,1,1</span></span></code></pre></div><hr><h3 id="buildingselectionoffset" tabindex="-1">buildingSelectionOffset <a class="header-anchor" href="#buildingselectionoffset" aria-label="Permalink to "buildingSelectionOffset""></a></h3><h4 id="buildingselectionoffset-代码简介" tabindex="-1">buildingSelectionOffset-代码简介 <a class="header-anchor" href="#buildingselectionoffset-代码简介" aria-label="Permalink to "buildingSelectionOffset-代码简介""></a></h4><p>代码:buildingSelectionOffset 中文释义:建筑UI调整 类型:整型 隶属于:构建代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>基础规则同上,用于选择单位时UI显示。不设定则默认为建筑覆盖区域。</p></div><h4 id="buildingselectionoffset-演示例子" tabindex="-1">buildingSelectionOffset-演示例子 <a class="header-anchor" href="#buildingselectionoffset-演示例子" aria-label="Permalink to "buildingSelectionOffset-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">buildingSelectionOffset: 4</span></span></code></pre></div><hr>`,183);function F(_,T,R,w,B,I){const s=r("font");return c(),o("div",null,[d,e("p",null,[a("主要在"),n(s,{color:"orange"},{default:l(()=>[a("启用多个自定义Mod")]),_:1}),a("进行优先级定义"),h,a(" 以逗号分隔的名称列表。像"),n(s,{color:"orange"},{default:l(()=>[a("名称一样,但优先级较低")]),_:1}),a(",对于"),n(s,{color:"orange"},{default:l(()=>[a("启用多个自定义mod")]),_:1}),a("有用。")]),u,e("div",b,[g,e("p",null,[a("早期是用于在"),n(s,{color:"orange"},{default:l(()=>[a("builtFrom")]),_:1}),a("的代码,并结合科技等级使用。如果工厂的等级低于单位的目标科技等级,则会在工厂里面隐藏该单位。"),m,a("自铁锈1.09后出现"),n(s,{color:"orange"},{default:l(()=>[a("overrideAndReplace")]),_:1}),a("后,该方法则不建议使用。有关于新策略,请参考"),n(s,{color:"orange"},{default:l(()=>[a("overrideAndReplace")]),_:1}),a("代码文档指南。"),y,a(" 设置单位的科技等级,共有3个级别,1级GUI显示为绿色,2、3级显示为黄色。超过3报错。")])]),C,e("div",k,[f,e("p",null,[a("若设置成true,则会在单位死亡时产生血迹,"),q,a(" 图像在"),n(s,{color:"orange"},{default:l(()=>[a("drawable/blood_mark.png"),v,a("当hideScorchMark:true")]),_:1}),a("时可以隐藏非生物则为黑色爆炸效果。")])]),x,e("div",D,[A,e("p",null,[a("能量恢复是持续的,如果你设置了"),n(s,{color:"orange"},{default:l(()=>[a("energyNeedsToRechargeToFull")]),_:1}),a(", 那么攻击时按energyRegen恢复,耗尽时的灰条按此处设定值恢复。")])]),P])}const M=t(p,[["render",F]]);export{E as __pageData,M as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as t,c as o,z as e,a,E as n,B as l,O as i,G as r,o as c}from"./chunks/framework.621e5595.js";const E=JSON.parse('{"title":"[core]组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/core.md","filePath":"src/Unit/core.md"}'),p={name:"src/Unit/core.md"},d=i("",51),h=e("br",null,null,-1),u=i("",20),b={class:"tip custom-block"},g=e("p",{class:"custom-block-title"},"TIP",-1),m=e("br",null,null,-1),y=e("br",null,null,-1),C=i("",13),k={class:"tip custom-block"},f=e("p",{class:"custom-block-title"},"TIP",-1),q=e("br",null,null,-1),v=e("br",null,null,-1),x=i("",77),D={class:"tip custom-block"},A=e("p",{class:"custom-block-title"},"TIP",-1),P=i("",183);function F(_,T,R,w,B,I){const s=r("font");return c(),o("div",null,[d,e("p",null,[a("主要在"),n(s,{color:"orange"},{default:l(()=>[a("启用多个自定义Mod")]),_:1}),a("进行优先级定义"),h,a(" 以逗号分隔的名称列表。像"),n(s,{color:"orange"},{default:l(()=>[a("名称一样,但优先级较低")]),_:1}),a(",对于"),n(s,{color:"orange"},{default:l(()=>[a("启用多个自定义mod")]),_:1}),a("有用。")]),u,e("div",b,[g,e("p",null,[a("早期是用于在"),n(s,{color:"orange"},{default:l(()=>[a("builtFrom")]),_:1}),a("的代码,并结合科技等级使用。如果工厂的等级低于单位的目标科技等级,则会在工厂里面隐藏该单位。"),m,a("自铁锈1.09后出现"),n(s,{color:"orange"},{default:l(()=>[a("overrideAndReplace")]),_:1}),a("后,该方法则不建议使用。有关于新策略,请参考"),n(s,{color:"orange"},{default:l(()=>[a("overrideAndReplace")]),_:1}),a("代码文档指南。"),y,a(" 设置单位的科技等级,共有3个级别,1级GUI显示为绿色,2、3级显示为黄色。超过3报错。")])]),C,e("div",k,[f,e("p",null,[a("若设置成true,则会在单位死亡时产生血迹,"),q,a(" 图像在"),n(s,{color:"orange"},{default:l(()=>[a("drawable/blood_mark.png"),v,a("当hideScorchMark:true")]),_:1}),a("时可以隐藏非生物则为黑色爆炸效果。")])]),x,e("div",D,[A,e("p",null,[a("能量恢复是持续的,如果你设置了"),n(s,{color:"orange"},{default:l(()=>[a("energyNeedsToRechargeToFull")]),_:1}),a(", 那么攻击时按energyRegen恢复,耗尽时的灰条按此处设定值恢复。")])]),P])}const M=t(p,[["render",F]]);export{E as __pageData,M as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{_ as t,c as o,z as e,a,E as n,B as l,O as i,G as r,o as c}from"./chunks/framework.621e5595.js";const E=JSON.parse('{"title":"[core]组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/core.md","filePath":"src/Unit/core.md"}'),p={name:"src/Unit/core.md"},d=i(`<h1 id="core-组" tabindex="-1"><strong>[core]组</strong> <a class="header-anchor" href="#core-组" aria-label="Permalink to "**[core]组**""></a></h1><h2 id="第一类-通用代码组" tabindex="-1">第一类-通用代码组 <a class="header-anchor" href="#第一类-通用代码组" aria-label="Permalink to "第一类-通用代码组""></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>以下的代码为<code>通用代码</code>,多半是必要的代码,如果不包括这些,可能在<code>绝大多数情况下导致错误</code>。</p></div><h3 id="name" tabindex="-1">name <a class="header-anchor" href="#name" aria-label="Permalink to "name""></a></h3><h4 id="name-代码简介" tabindex="-1">name-代码简介 <a class="header-anchor" href="#name-代码简介" aria-label="Permalink to "name-代码简介""></a></h4><p>代码:name 中文释义:名字 类型:字符型 隶属于:通用代码组</p><h4 id="name-要点指示" tabindex="-1">name-要点指示 <a class="header-anchor" href="#name-要点指示" aria-label="Permalink to "name-要点指示""></a></h4><hr><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-nflHR" id="tab-LlL7k2n" checked="checked"><label for="tab-LlL7k2n">JDSALing</label><input type="radio" name="group-nflHR" id="tab-_eBPo-Y"><label for="tab-_eBPo-Y">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">定义单位原始名称,可以是中文。</span></span>
|
||||
import{_ as t,c as o,z as e,a,E as n,B as l,O as i,G as r,o as c}from"./chunks/framework.621e5595.js";const E=JSON.parse('{"title":"[core]组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/core.md","filePath":"src/Unit/core.md"}'),p={name:"src/Unit/core.md"},d=i(`<h1 id="core-组" tabindex="-1"><strong>[core]组</strong> <a class="header-anchor" href="#core-组" aria-label="Permalink to "**[core]组**""></a></h1><h2 id="第一类-通用代码组" tabindex="-1">第一类-通用代码组 <a class="header-anchor" href="#第一类-通用代码组" aria-label="Permalink to "第一类-通用代码组""></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>以下的代码为<code>通用代码</code>,多半是必要的代码,如果不包括这些,可能在<code>绝大多数情况下导致错误</code>。</p></div><h3 id="name" tabindex="-1">name <a class="header-anchor" href="#name" aria-label="Permalink to "name""></a></h3><h4 id="name-代码简介" tabindex="-1">name-代码简介 <a class="header-anchor" href="#name-代码简介" aria-label="Permalink to "name-代码简介""></a></h4><p>代码:name 中文释义:名字 类型:字符型 隶属于:通用代码组</p><h4 id="name-要点指示" tabindex="-1">name-要点指示 <a class="header-anchor" href="#name-要点指示" aria-label="Permalink to "name-要点指示""></a></h4><hr><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-7yOZW" id="tab-RXUrb5n" checked="checked"><label for="tab-RXUrb5n">JDSALing</label><input type="radio" name="group-7yOZW" id="tab-PqN5MwF"><label for="tab-PqN5MwF">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">定义单位原始名称,可以是中文。</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">游戏使用它区分其它单位。</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">如果没有在[displayText或者语言文件设置显示名称],</span></span>
|
||||
|
@ -16,13 +16,13 @@ import{_ as t,c as o,z as e,a,E as n,B as l,O as i,G as r,o as c}from"./chunks/f
|
|||
<span class="line"><span style="color:#A6ACCD;">displayText_zh:中文标题</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription: -English Description</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription_zh:-中文描述</span></span></code></pre></div><hr><h3 id="price" tabindex="-1">price <a class="header-anchor" href="#price" aria-label="Permalink to "price""></a></h3><h4 id="price-代码简介" tabindex="-1">price-代码简介 <a class="header-anchor" href="#price-代码简介" aria-label="Permalink to "price-代码简介""></a></h4><p>代码:price 中文释义:价格 类型:整数 隶属于:通用代码组</p><h4 id="price-要点指示" tabindex="-1">price-要点指示 <a class="header-anchor" href="#price-要点指示" aria-label="Permalink to "price-要点指示""></a></h4><p>定义单位的价格,显示在单位信息中,建造时也以此价格为准。</p><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-EAetT" id="tab-PUt4GNT" checked="checked"><label for="tab-PUt4GNT">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">默认情况下,price只需要填写一个整数,此时使用的是游戏内自带的资金credit;</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription_zh:-中文描述</span></span></code></pre></div><hr><h3 id="price" tabindex="-1">price <a class="header-anchor" href="#price" aria-label="Permalink to "price""></a></h3><h4 id="price-代码简介" tabindex="-1">price-代码简介 <a class="header-anchor" href="#price-代码简介" aria-label="Permalink to "price-代码简介""></a></h4><p>代码:price 中文释义:价格 类型:整数 隶属于:通用代码组</p><h4 id="price-要点指示" tabindex="-1">price-要点指示 <a class="header-anchor" href="#price-要点指示" aria-label="Permalink to "price-要点指示""></a></h4><p>定义单位的价格,显示在单位信息中,建造时也以此价格为准。</p><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-oWdNQ" id="tab-I_adbVa" checked="checked"><label for="tab-I_adbVa">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">默认情况下,price只需要填写一个整数,此时使用的是游戏内自带的资金credit;</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">想要更改资源类型,可以使用:</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">\`</span><span style="color:#FFCB6B;">price:资源1</span><span style="color:#C3E88D;">=数值1,资源2=数值2,资源3=数值3,……</span><span style="color:#89DDFF;">\`</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">的格式</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">(前提是此资源要在使用的单位进行定义)。</span></span></code></pre></div></div></div><h4 id="price-演示例子" tabindex="-1">price-演示例子 <a class="header-anchor" href="#price-演示例子" aria-label="Permalink to "price-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">price:120,石油=80,铁=60</span></span></code></pre></div><hr><h3 id="radius" tabindex="-1">radius <a class="header-anchor" href="#radius" aria-label="Permalink to "radius""></a></h3><h4 id="radius-代码简介" tabindex="-1">radius-代码简介 <a class="header-anchor" href="#radius-代码简介" aria-label="Permalink to "radius-代码简介""></a></h4><p>代码:radius 中文释义:半径 类型:整数 隶属于:通用代码组</p><h4 id="radius-要点指示" tabindex="-1">radius-要点指示 <a class="header-anchor" href="#radius-要点指示" aria-label="Permalink to "radius-要点指示""></a></h4><p>半径定义单位的<code>实际碰撞体积和显示范围</code>,在未设置<code>选择框大小</code>时,半径决定是单位选择框的大小。 半径的单位是像素(px)。</p><h4 id="radius-演示例子" tabindex="-1">radius-演示例子 <a class="header-anchor" href="#radius-演示例子" aria-label="Permalink to "radius-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">radius:20</span></span></code></pre></div><hr><h3 id="mass" tabindex="-1">mass <a class="header-anchor" href="#mass" aria-label="Permalink to "mass""></a></h3><h4 id="mass-代码简介" tabindex="-1">mass-代码简介 <a class="header-anchor" href="#mass-代码简介" aria-label="Permalink to "mass-代码简介""></a></h4><p>代码:mass 中文释义:质量 类型:整数 隶属于:通用代码组</p><h4 id="mass-要点指示" tabindex="-1">mass-要点指示 <a class="header-anchor" href="#mass-要点指示" aria-label="Permalink to "mass-要点指示""></a></h4><p>质量决定单位在各种碰撞时的效果。<code>质量越大,其他单位越难推动</code>。</p><h4 id="mass-演示例子" tabindex="-1">mass-演示例子 <a class="header-anchor" href="#mass-演示例子" aria-label="Permalink to "mass-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">mass:2000</span></span></code></pre></div><hr><h3 id="maxhp" tabindex="-1">maxHp <a class="header-anchor" href="#maxhp" aria-label="Permalink to "maxHp""></a></h3><h4 id="maxhp-代码简介" tabindex="-1">maxHp-代码简介 <a class="header-anchor" href="#maxhp-代码简介" aria-label="Permalink to "maxHp-代码简介""></a></h4><p>代码:maxHp 中文释义:最大生命值 类型:整数 隶属于:通用代码组</p><h4 id="maxhp-要点指示" tabindex="-1">maxHp-要点指示 <a class="header-anchor" href="#maxhp-要点指示" aria-label="Permalink to "maxHp-要点指示""></a></h4><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-2Af9o" id="tab-QZ_mcSg" checked="checked"><label for="tab-QZ_mcSg">tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">最大生命值定义单位在不修改它时最多能够有多少血量,</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">mass:2000</span></span></code></pre></div><hr><h3 id="maxhp" tabindex="-1">maxHp <a class="header-anchor" href="#maxhp" aria-label="Permalink to "maxHp""></a></h3><h4 id="maxhp-代码简介" tabindex="-1">maxHp-代码简介 <a class="header-anchor" href="#maxhp-代码简介" aria-label="Permalink to "maxHp-代码简介""></a></h4><p>代码:maxHp 中文释义:最大生命值 类型:整数 隶属于:通用代码组</p><h4 id="maxhp-要点指示" tabindex="-1">maxHp-要点指示 <a class="header-anchor" href="#maxhp-要点指示" aria-label="Permalink to "maxHp-要点指示""></a></h4><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-skM2g" id="tab-HvFvP-V" checked="checked"><label for="tab-HvFvP-V">tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">最大生命值定义单位在不修改它时最多能够有多少血量,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">单位默认生成时即是这个血量。</span></span>
|
||||
<span class="line"><span style="color:#82AAFF;">maxHp可以通过单位参考.maxHp</span><span style="color:#89DDFF;">()</span><span style="color:#A6ACCD;">来获取,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">也可以通过[action]进行修改。</span></span></code></pre></div></div></div><h4 id="maxhp-演示例子" tabindex="-1">maxHp-演示例子 <a class="header-anchor" href="#maxhp-演示例子" aria-label="Permalink to "maxHp-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
|
@ -61,7 +61,7 @@ import{_ as t,c as o,z as e,a,E as n,B as l,O as i,G as r,o as c}from"./chunks/f
|
|||
<span class="line"><span style="color:#676E95;font-style:italic;">#如果受到40以下的常规攻击,则进行最低伤害判定</span></span></code></pre></div><hr><h3 id="borrowresourceswhilealive" tabindex="-1">borrowResourcesWhileAlive <a class="header-anchor" href="#borrowresourceswhilealive" aria-label="Permalink to "borrowResourcesWhileAlive""></a></h3><h4 id="borrowresourceswhilealive-代码简介" tabindex="-1">borrowResourcesWhileAlive-代码简介 <a class="header-anchor" href="#borrowresourceswhilealive-代码简介" aria-label="Permalink to "borrowResourcesWhileAlive-代码简介""></a></h4><p>代码:armour 中文释义:资源活着时借用 类型:Price型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>创建时获取这些资源,删除或销毁时将其返回。 例如用于电力逻辑,负数供电和正数耗电。</p></div><h4 id="borrowresourceswhilealive-演示例子" tabindex="-1">borrowResourcesWhileAlive-演示例子 <a class="header-anchor" href="#borrowresourceswhilealive-演示例子" aria-label="Permalink to "borrowResourcesWhileAlive-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">borrowResourcesWhileAlive:5000</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#单位活着的时候给予5000金币,死亡扣除5000金币</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#一个小型贷款系统,</span></span></code></pre></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-HrIXm" id="tab-WzxRbPX" checked="checked"><label for="tab-WzxRbPX">考考你</label><input type="radio" name="group-HrIXm" id="tab-angASeW"><label for="tab-angASeW">显示答案</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">如果这里要通过这个代码做一个小的贷款系统,</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#一个小型贷款系统,</span></span></code></pre></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-IwmUu" id="tab-Irr6UjH" checked="checked"><label for="tab-Irr6UjH">考考你</label><input type="radio" name="group-IwmUu" id="tab-Pz_bdSl"><label for="tab-Pz_bdSl">显示答案</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">如果这里要通过这个代码做一个小的贷款系统,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">并经过一段时间让单位死亡。</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">只需要4行代码即可实现,试试看。</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">提示:dieOnZeroEnergy:true</span></span>
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,2 @@
|
|||
import{_ as n,c,E as s,B as l,a as e,z as o,O as t,G as i,o as d}from"./chunks/framework.621e5595.js";const ge=JSON.parse('{"title":"[LogicBoolean] 逻辑序列组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/loginboolean.md","filePath":"src/Unit/loginboolean.md"}'),r={name:"src/Unit/loginboolean.md"},p=t("",4),u=o("code",null,"boolean",-1),h=t("",22),f={class:"tip custom-block"},_=o("p",{class:"custom-block-title"},"TIP",-1),m=t("",6),b={class:"tip custom-block"},g=o("p",{class:"custom-block-title"},"TIP",-1),y=o("br",null,null,-1),T=t("",4),A={class:"tip custom-block"},C=o("p",{class:"custom-block-title"},"TIP",-1),D=o("h4",{id:"非",tabindex:"-1"},[e("非 "),o("a",{class:"header-anchor",href:"#非","aria-label":'Permalink to "非"'},"")],-1),v=o("p",null,[e("代码:not 中文释义:非"),o("br")],-1),q={class:"tip custom-block"},k=o("p",{class:"custom-block-title"},"TIP",-1),F=o("code",null,"true",-1),I=o("code",null,"false",-1),P=o("code",null,"false",-1),O=o("code",null,"true",-1),U={class:"info custom-block"},S=o("p",{class:"custom-block-title"},"INFO",-1),x=o("code",null,"not>and>or",-1),E=o("br",null,null,-1),R=t("",7),N={class:"info custom-block"},V=o("p",{class:"custom-block-title"},"INFO",-1),w=t("",5),B={class:"info custom-block"},W=o("p",{class:"custom-block-title"},"INFO",-1),M=o("br",null,null,-1),Q=t("",22),G={class:"info custom-block"},L=o("p",{class:"custom-block-title"},"INFO",-1),Y=t("",9),z={class:"info custom-block"},$=o("p",{class:"custom-block-title"},"INFO",-1),H=t("",13),J=o("code",null,"self.hasFlag()",-1),j=o("code",null,"self.hasFlag(id=数字)",-1),X={class:"info custom-block"},K=o("p",{class:"custom-block-title"},"INFO",-1),Z=o("br",null,null,-1),ee=t("",10),oe={class:"info custom-block"},ae=o("p",{class:"custom-block-title"},"INFO",-1),se=t("",24),le={class:"danger custom-block"},te=o("p",{class:"custom-block-title"},"DANGER",-1),ne=o("p",null,[o("a",{href:"https://www.bilibili.com/video/BV17v4y1r7dV",target:"_blank",rel:"noreferrer"},"https://www.bilibili.com/video/BV17v4y1r7dV"),e(" (感谢十山月)")],-1),ce=o("iframe",{src:"//player.bilibili.com/player.html?aid=566144438&bvid=BV17v4y1r7dV&cid=988997369&page=1",scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",width:"100%",height:"400"},`
|
||||
`,-1),ie=t("",1),de=t("",2);function re(pe,ue,he,fe,_e,me){const a=i("font");return d(),c("div",null,[p,s(a,{color:"orange"},{default:l(()=>[e("布尔值")]),_:1}),e("表达“真(true)”或“假(false)”的一个状态。在铁锈中,布尔值("),u,e(")被运用于逻辑判断。"),h,o("div",f,[_,o("p",null,[e("请注意,铁锈中等于的符号为"),s(a,{color:"orange"},{default:l(()=>[e("==")]),_:1}),e(","),s(a,{color:"orange"},{default:l(()=>[e("=")]),_:1}),e("在铁锈中用于赋值或参数。")])]),m,o("div",b,[g,s(a,{color:"orange"},{default:l(()=>[e("and")]),_:1}),e("用于连接两个逻辑判断,只有在这两个逻辑判断的值都为"),s(a,{color:"orange"},{default:l(()=>[e("true")]),_:1}),e("时,"),s(a,{color:"orange"},{default:l(()=>[e("and")]),_:1}),e("的值才为true。"),y]),T,o("div",A,[C,s(a,{color:"orange"},{default:l(()=>[e("or")]),_:1}),e("用于连接两个逻辑判断,只要这两个逻辑判断的值有一个为"),s(a,{color:"orange"},{default:l(()=>[e("true")]),_:1}),e("时,"),s(a,{color:"orange"},{default:l(()=>[e("or")]),_:1}),e("的值就为true。")]),D,v,o("div",q,[k,s(a,{color:"orange"},{default:l(()=>[e("not")]),_:1}),e("用于将某个逻辑判断的值取反,即"),F,e("变"),I,e(","),P,e("变"),O,e("。")]),o("div",U,[S,o("p",null,[e("多个逻辑运算符同时使用时,优先级为"),x,e(",同时"),s(a,{color:"orange"},{default:l(()=>[e("支持使用括号改变运算优先级")]),_:1}),e("。 "),E,e("推荐"),s(a,{color:"orange"},{default:l(()=>[e("在不确定优先级时打括号")]),_:1}),e("。")])]),R,o("div",N,[V,o("p",null,[e("不同数据类型通常"),s(a,{color:"orange"},{default:l(()=>[e("不能直接进行算数运算")]),_:1}),e(",但在部分情况下,"),s(a,{color:"orange"},{default:l(()=>[e("number")]),_:1}),e("和"),s(a,{color:"orange"},{default:l(()=>[e("float")]),_:1}),e("类型可以混用(建议"),s(a,{color:"orange"},{default:l(()=>[e("所有数值全部使用float")]),_:1}),e("来避免混淆)。")])]),w,o("div",B,[W,o("p",null,[e("对于"),s(a,{color:"orange"},{default:l(()=>[e("不满足交换律的运算符")]),_:1}),e(",需要注意"),s(a,{color:"orange"},{default:l(()=>[e("运算优先级")]),_:1}),e("是否正确。由于铁锈本身bug,"),s(a,{color:"orange"},{default:l(()=>[e("在数学上正确的优先级不一定在铁锈中正确")]),_:1}),e(",因此可能出现减法顺序混乱等问题。 "),M,e("为了避免可能的问题,请尽量在任何"),s(a,{color:"orange"},{default:l(()=>[e("不满足交换律的运算符")]),_:1}),e("两边打上括号。")])]),Q,o("div",G,[L,o("p",null,[e("引用资源时,请确保"),s(a,{color:"orange"},{default:l(()=>[e("这个资源在这个单位定义过")]),_:1}),e(",否则会报错。")])]),Y,o("div",z,[$,o("p",null,[e("单位计时部分能返回到最小时间精度为"),s(a,{color:"orange"},{default:l(()=>[e("0.1秒")]),_:1}),e("。")])]),H,o("p",null,[J,e("用于获取自身是否有"),s(a,{color:"orange"},{default:l(()=>[e("标志")]),_:1}),e(",格式为"),j,e("。")]),o("div",X,[K,o("p",null,[e("不同于"),s(a,{color:"orange"},{default:l(()=>[e("标签(tag)")]),_:1}),e(","),s(a,{color:"orange"},{default:l(()=>[e("标志(flag)")]),_:1}),e("是内置的一些"),s(a,{color:"orange"},{default:l(()=>[e("布尔值")]),_:1}),e(",无需定义即可直接使用。"),Z]),o("blockquote",null,[o("p",null,[e("标签的添加方法为"),s(a,{color:"orange"},{default:l(()=>[e("[action]addResource:flag=1,3-7,13")]),_:1}),e(",且只支持"),s(a,{color:"orange"},{default:l(()=>[e("0-31")]),_:1}),e(",标签的移除方法与之相反。")])])]),ee,o("div",oe,[ae,o("p",null,[e("路径点类型可以是"),s(a,{color:"orange"},{default:l(()=>[e("move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget")]),_:1}),e("。")])]),se,o("div",le,[te,o("p",null,[e("在"),s(a,{color:"orange"},{default:l(()=>[e("跨单位读取数组")]),_:1}),e("时,如果下标使用了逻辑,无论逻辑值都会返回第零项,")]),s(a,{color:"orange"},{default:l(()=>[e("为游戏bug")]),_:1}),e(",解决方法可以参考:"),ne,ce,ie]),de])}const ye=n(r,[["render",re]]);export{ge as __pageData,ye as default};
|
||||
import{_ as n,c,E as s,B as l,a as e,z as o,O as t,G as i,o as d}from"./chunks/framework.621e5595.js";const ge=JSON.parse('{"title":"[LogicBoolean] 逻辑序列组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/loginboolean.md","filePath":"src/Unit/loginboolean.md"}'),r={name:"src/Unit/loginboolean.md"},p=t("",4),u=o("code",null,"boolean",-1),h=t("",22),f={class:"tip custom-block"},_=o("p",{class:"custom-block-title"},"TIP",-1),b=t("",6),m={class:"tip custom-block"},g=o("p",{class:"custom-block-title"},"TIP",-1),y=o("br",null,null,-1),T=t("",4),A={class:"tip custom-block"},C=o("p",{class:"custom-block-title"},"TIP",-1),D=o("h4",{id:"非",tabindex:"-1"},[e("非 "),o("a",{class:"header-anchor",href:"#非","aria-label":'Permalink to "非"'},"")],-1),v=o("p",null,[e("代码:not 中文释义:非"),o("br")],-1),q={class:"tip custom-block"},k=o("p",{class:"custom-block-title"},"TIP",-1),F=o("code",null,"true",-1),I=o("code",null,"false",-1),P=o("code",null,"false",-1),U=o("code",null,"true",-1),O={class:"info custom-block"},S=o("p",{class:"custom-block-title"},"INFO",-1),x=o("code",null,"not>and>or",-1),E=o("br",null,null,-1),R=t("",7),N={class:"info custom-block"},V=o("p",{class:"custom-block-title"},"INFO",-1),w=t("",5),B={class:"info custom-block"},W=o("p",{class:"custom-block-title"},"INFO",-1),M=o("br",null,null,-1),Q=t("",22),G={class:"info custom-block"},L=o("p",{class:"custom-block-title"},"INFO",-1),Y=t("",9),X={class:"info custom-block"},$=o("p",{class:"custom-block-title"},"INFO",-1),z=t("",13),H=o("code",null,"self.hasFlag()",-1),j=o("code",null,"self.hasFlag(id=数字)",-1),J={class:"info custom-block"},K=o("p",{class:"custom-block-title"},"INFO",-1),Z=o("br",null,null,-1),ee=t("",10),oe={class:"info custom-block"},ae=o("p",{class:"custom-block-title"},"INFO",-1),se=t("",24),le={class:"danger custom-block"},te=o("p",{class:"custom-block-title"},"DANGER",-1),ne=o("p",null,[o("a",{href:"https://www.bilibili.com/video/BV17v4y1r7dV",target:"_blank",rel:"noreferrer"},"https://www.bilibili.com/video/BV17v4y1r7dV"),e(" (感谢十山月)")],-1),ce=o("iframe",{src:"//player.bilibili.com/player.html?aid=566144438&bvid=BV17v4y1r7dV&cid=988997369&page=1",scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",width:"100%",height:"400"},`
|
||||
`,-1),ie=t("",1),de=t("",2);function re(pe,ue,he,fe,_e,be){const a=i("font");return d(),c("div",null,[p,s(a,{color:"orange"},{default:l(()=>[e("布尔值")]),_:1}),e("表达“真(true)”或“假(false)”的一个状态。在铁锈中,布尔值("),u,e(")被运用于逻辑判断。"),h,o("div",f,[_,o("p",null,[e("请注意,铁锈中等于的符号为"),s(a,{color:"orange"},{default:l(()=>[e("==")]),_:1}),e(","),s(a,{color:"orange"},{default:l(()=>[e("=")]),_:1}),e("在铁锈中用于赋值或参数。")])]),b,o("div",m,[g,s(a,{color:"orange"},{default:l(()=>[e("and")]),_:1}),e("用于连接两个逻辑判断,只有在这两个逻辑判断的值都为"),s(a,{color:"orange"},{default:l(()=>[e("true")]),_:1}),e("时,"),s(a,{color:"orange"},{default:l(()=>[e("and")]),_:1}),e("的值才为true。"),y]),T,o("div",A,[C,s(a,{color:"orange"},{default:l(()=>[e("or")]),_:1}),e("用于连接两个逻辑判断,只要这两个逻辑判断的值有一个为"),s(a,{color:"orange"},{default:l(()=>[e("true")]),_:1}),e("时,"),s(a,{color:"orange"},{default:l(()=>[e("or")]),_:1}),e("的值就为true。")]),D,v,o("div",q,[k,s(a,{color:"orange"},{default:l(()=>[e("not")]),_:1}),e("用于将某个逻辑判断的值取反,即"),F,e("变"),I,e(","),P,e("变"),U,e("。")]),o("div",O,[S,o("p",null,[e("多个逻辑运算符同时使用时,优先级为"),x,e(",同时"),s(a,{color:"orange"},{default:l(()=>[e("支持使用括号改变运算优先级")]),_:1}),e("。 "),E,e("推荐"),s(a,{color:"orange"},{default:l(()=>[e("在不确定优先级时打括号")]),_:1}),e("。")])]),R,o("div",N,[V,o("p",null,[e("不同数据类型通常"),s(a,{color:"orange"},{default:l(()=>[e("不能直接进行算数运算")]),_:1}),e(",但在部分情况下,"),s(a,{color:"orange"},{default:l(()=>[e("number")]),_:1}),e("和"),s(a,{color:"orange"},{default:l(()=>[e("float")]),_:1}),e("类型可以混用(建议"),s(a,{color:"orange"},{default:l(()=>[e("所有数值全部使用float")]),_:1}),e("来避免混淆)。")])]),w,o("div",B,[W,o("p",null,[e("对于"),s(a,{color:"orange"},{default:l(()=>[e("不满足交换律的运算符")]),_:1}),e(",需要注意"),s(a,{color:"orange"},{default:l(()=>[e("运算优先级")]),_:1}),e("是否正确。由于铁锈本身bug,"),s(a,{color:"orange"},{default:l(()=>[e("在数学上正确的优先级不一定在铁锈中正确")]),_:1}),e(",因此可能出现减法顺序混乱等问题。 "),M,e("为了避免可能的问题,请尽量在任何"),s(a,{color:"orange"},{default:l(()=>[e("不满足交换律的运算符")]),_:1}),e("两边打上括号。")])]),Q,o("div",G,[L,o("p",null,[e("引用资源时,请确保"),s(a,{color:"orange"},{default:l(()=>[e("这个资源在这个单位定义过")]),_:1}),e(",否则会报错。")])]),Y,o("div",X,[$,o("p",null,[e("单位计时部分能返回到最小时间精度为"),s(a,{color:"orange"},{default:l(()=>[e("0.1秒")]),_:1}),e("。")])]),z,o("p",null,[H,e("用于获取自身是否有"),s(a,{color:"orange"},{default:l(()=>[e("标志")]),_:1}),e(",格式为"),j,e("。")]),o("div",J,[K,o("p",null,[e("不同于"),s(a,{color:"orange"},{default:l(()=>[e("标签(tag)")]),_:1}),e(","),s(a,{color:"orange"},{default:l(()=>[e("标志(flag)")]),_:1}),e("是内置的一些"),s(a,{color:"orange"},{default:l(()=>[e("布尔值")]),_:1}),e(",无需定义即可直接使用。"),Z]),o("blockquote",null,[o("p",null,[e("标签的添加方法为"),s(a,{color:"orange"},{default:l(()=>[e("[action]addResource:flag=1,3-7,13")]),_:1}),e(",且只支持"),s(a,{color:"orange"},{default:l(()=>[e("0-31")]),_:1}),e(",标签的移除方法与之相反。")])])]),ee,o("div",oe,[ae,o("p",null,[e("路径点类型可以是"),s(a,{color:"orange"},{default:l(()=>[e("move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget")]),_:1}),e("。")])]),se,o("div",le,[te,o("p",null,[e("在"),s(a,{color:"orange"},{default:l(()=>[e("跨单位读取数组")]),_:1}),e("时,如果下标使用了逻辑,无论逻辑值都会返回第零项,")]),s(a,{color:"orange"},{default:l(()=>[e("为游戏bug")]),_:1}),e(",解决方法可以参考:"),ne,ce,ie]),de])}const ye=n(r,[["render",re]]);export{ge as __pageData,ye as default};
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
import{_ as n,c,E as s,B as l,a as e,z as o,O as t,G as i,o as d}from"./chunks/framework.621e5595.js";const ge=JSON.parse('{"title":"[LogicBoolean] 逻辑序列组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/loginboolean.md","filePath":"src/Unit/loginboolean.md"}'),r={name:"src/Unit/loginboolean.md"},p=t("",4),u=o("code",null,"boolean",-1),h=t("",22),f={class:"tip custom-block"},_=o("p",{class:"custom-block-title"},"TIP",-1),m=t("",6),b={class:"tip custom-block"},g=o("p",{class:"custom-block-title"},"TIP",-1),y=o("br",null,null,-1),T=t("",4),A={class:"tip custom-block"},C=o("p",{class:"custom-block-title"},"TIP",-1),D=o("h4",{id:"非",tabindex:"-1"},[e("非 "),o("a",{class:"header-anchor",href:"#非","aria-label":'Permalink to "非"'},"")],-1),v=o("p",null,[e("代码:not 中文释义:非"),o("br")],-1),q={class:"tip custom-block"},k=o("p",{class:"custom-block-title"},"TIP",-1),I=o("code",null,"true",-1),F=o("code",null,"false",-1),P=o("code",null,"false",-1),U=o("code",null,"true",-1),O={class:"info custom-block"},S=o("p",{class:"custom-block-title"},"INFO",-1),x=o("code",null,"not>and>or",-1),E=o("br",null,null,-1),R=t("",7),N={class:"info custom-block"},V=o("p",{class:"custom-block-title"},"INFO",-1),w=t("",5),B={class:"info custom-block"},M=o("p",{class:"custom-block-title"},"INFO",-1),W=o("br",null,null,-1),Q=t("",22),G={class:"info custom-block"},L=o("p",{class:"custom-block-title"},"INFO",-1),z=t("",9),H={class:"info custom-block"},$=o("p",{class:"custom-block-title"},"INFO",-1),Y=t("",13),Z=o("code",null,"self.hasFlag()",-1),J=o("code",null,"self.hasFlag(id=数字)",-1),j={class:"info custom-block"},K=o("p",{class:"custom-block-title"},"INFO",-1),X=o("br",null,null,-1),ee=t("",10),oe={class:"info custom-block"},ae=o("p",{class:"custom-block-title"},"INFO",-1),se=t("",24),le={class:"danger custom-block"},te=o("p",{class:"custom-block-title"},"DANGER",-1),ne=o("p",null,[o("a",{href:"https://www.bilibili.com/video/BV17v4y1r7dV",target:"_blank",rel:"noreferrer"},"https://www.bilibili.com/video/BV17v4y1r7dV"),e(" (感谢十山月)")],-1),ce=o("iframe",{src:"//player.bilibili.com/player.html?aid=566144438&bvid=BV17v4y1r7dV&cid=988997369&page=1",scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",width:"100%",height:"400"},`
|
||||
`,-1),ie=t("",1),de=t("",2);function re(pe,ue,he,fe,_e,me){const a=i("font");return d(),c("div",null,[p,s(a,{color:"orange"},{default:l(()=>[e("布尔值")]),_:1}),e("表达“真(true)”或“假(false)”的一个状态。在铁锈中,布尔值("),u,e(")被运用于逻辑判断。"),h,o("div",f,[_,o("p",null,[e("请注意,铁锈中等于的符号为"),s(a,{color:"orange"},{default:l(()=>[e("==")]),_:1}),e(","),s(a,{color:"orange"},{default:l(()=>[e("=")]),_:1}),e("在铁锈中用于赋值或参数。")])]),m,o("div",b,[g,s(a,{color:"orange"},{default:l(()=>[e("and")]),_:1}),e("用于连接两个逻辑判断,只有在这两个逻辑判断的值都为"),s(a,{color:"orange"},{default:l(()=>[e("true")]),_:1}),e("时,"),s(a,{color:"orange"},{default:l(()=>[e("and")]),_:1}),e("的值才为true。"),y]),T,o("div",A,[C,s(a,{color:"orange"},{default:l(()=>[e("or")]),_:1}),e("用于连接两个逻辑判断,只要这两个逻辑判断的值有一个为"),s(a,{color:"orange"},{default:l(()=>[e("true")]),_:1}),e("时,"),s(a,{color:"orange"},{default:l(()=>[e("or")]),_:1}),e("的值就为true。")]),D,v,o("div",q,[k,s(a,{color:"orange"},{default:l(()=>[e("not")]),_:1}),e("用于将某个逻辑判断的值取反,即"),I,e("变"),F,e(","),P,e("变"),U,e("。")]),o("div",O,[S,o("p",null,[e("多个逻辑运算符同时使用时,优先级为"),x,e(",同时"),s(a,{color:"orange"},{default:l(()=>[e("支持使用括号改变运算优先级")]),_:1}),e("。 "),E,e("推荐"),s(a,{color:"orange"},{default:l(()=>[e("在不确定优先级时打括号")]),_:1}),e("。")])]),R,o("div",N,[V,o("p",null,[e("不同数据类型通常"),s(a,{color:"orange"},{default:l(()=>[e("不能直接进行算数运算")]),_:1}),e(",但在部分情况下,"),s(a,{color:"orange"},{default:l(()=>[e("number")]),_:1}),e("和"),s(a,{color:"orange"},{default:l(()=>[e("float")]),_:1}),e("类型可以混用(建议"),s(a,{color:"orange"},{default:l(()=>[e("所有数值全部使用float")]),_:1}),e("来避免混淆)。")])]),w,o("div",B,[M,o("p",null,[e("对于"),s(a,{color:"orange"},{default:l(()=>[e("不满足交换律的运算符")]),_:1}),e(",需要注意"),s(a,{color:"orange"},{default:l(()=>[e("运算优先级")]),_:1}),e("是否正确。由于铁锈本身bug,"),s(a,{color:"orange"},{default:l(()=>[e("在数学上正确的优先级不一定在铁锈中正确")]),_:1}),e(",因此可能出现减法顺序混乱等问题。 "),W,e("为了避免可能的问题,请尽量在任何"),s(a,{color:"orange"},{default:l(()=>[e("不满足交换律的运算符")]),_:1}),e("两边打上括号。")])]),Q,o("div",G,[L,o("p",null,[e("引用资源时,请确保"),s(a,{color:"orange"},{default:l(()=>[e("这个资源在这个单位定义过")]),_:1}),e(",否则会报错。")])]),z,o("div",H,[$,o("p",null,[e("单位计时部分能返回到最小时间精度为"),s(a,{color:"orange"},{default:l(()=>[e("0.1秒")]),_:1}),e("。")])]),Y,o("p",null,[Z,e("用于获取自身是否有"),s(a,{color:"orange"},{default:l(()=>[e("标志")]),_:1}),e(",格式为"),J,e("。")]),o("div",j,[K,o("p",null,[e("不同于"),s(a,{color:"orange"},{default:l(()=>[e("标签(tag)")]),_:1}),e(","),s(a,{color:"orange"},{default:l(()=>[e("标志(flag)")]),_:1}),e("是内置的一些"),s(a,{color:"orange"},{default:l(()=>[e("布尔值")]),_:1}),e(",无需定义即可直接使用。"),X]),o("blockquote",null,[o("p",null,[e("标签的添加方法为"),s(a,{color:"orange"},{default:l(()=>[e("[action]addResource:flag=1,3-7,13")]),_:1}),e(",且只支持"),s(a,{color:"orange"},{default:l(()=>[e("0-31")]),_:1}),e(",标签的移除方法与之相反。")])])]),ee,o("div",oe,[ae,o("p",null,[e("路径点类型可以是"),s(a,{color:"orange"},{default:l(()=>[e("move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget")]),_:1}),e("。")])]),se,o("div",le,[te,o("p",null,[e("在"),s(a,{color:"orange"},{default:l(()=>[e("跨单位读取数组")]),_:1}),e("时,如果下标使用了逻辑,无论逻辑值都会返回第零项,")]),s(a,{color:"orange"},{default:l(()=>[e("为游戏bug")]),_:1}),e(",解决方法可以参考:"),ne,ce,ie]),de])}const ye=n(r,[["render",re]]);export{ge as __pageData,ye as default};
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"src_unit_graphics.md":"6130445c","src_debug_test.md":"b63dafe9","src_map_tsada.md":"c9825e13","index.md":"4e0bfaa0","src_unit_loginboolean.md":"74600993","src_unit_canbuild.md":"cc382e6d","api-dev.md":"92651df8","src_unit_core.md":"5c3035e8"}
|
||||
{"api-dev.md":"92651df8","index.md":"4e0bfaa0","src_debug_test.md":"b63dafe9","src_unit_canbuild.md":"8fab0ddd","src_unit_graphics.md":"6130445c","src_map_tsada.md":"c9825e13","src_unit_loginboolean.md":"112192cb","src_unit_core.md":"8c56c8fe"}
|
||||
|
|
12
index.html
12
index.html
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user